GridView Extending

Discussion in 'ASP .Net Building Controls' started by Chuck P, Apr 19, 2007.

  1. Chuck P

    Chuck P Guest

    Is their a way to extend or mess with the GridView control.
    My goal is to add a column that has editing button (delete update, save,
    cancel).

    I did this with a template column and a little helper class. The class has
    method that adds the column with all the controls, but, it happens at runtime.

    What I would really like to just have is a property on the control that says
    AddEditingFunctionality. If true at design time the column would get added
    and the user could do stuff the template column like changing
    CausesValidation and stuff on the buttons in the template column.

    Is this possible.
     
    Chuck P, Apr 19, 2007
    #1
    1. Advertisements

  2. Hi Chuck,

    Regarding on this GridView extending issue, I have also replied your
    another thread "GridView ITemplate Columns", are they concerning the same
    issue?

    For your scenario, if you want to add a customized column(field) in
    GridView which will have flexible setting to let user define in design-time
    (aspx tempalte or through code), I think you can consider creating a custom
    DataControlField class completely. Thus, you can use it as built-in
    Gridview colums(such as BoundField) and add some properties in aspx markup
    to control the runtime behavior. e.g.

    <Columns>
    <cc1:MyColumn property1="xxx" property2="xxxx" />
    .....
    </Columns>

    here are some former threads that have discussed on creating custom
    column/field for Gridview:

    http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.data
    gridcontrol/browse_thread/thread/85afe393d428cf73/299bbf4c24815e8b?

    http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webc
    ontrols/browse_thread/thread/652359e1358ecf6c/834ed1c6afdaa69b

    and an additional MSDN article about customizing GridView:

    http://msdn.microsoft.com/msdnmag/issues/06/05/CuttingEdge/

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================



    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], Apr 19, 2007
    #2
    1. Advertisements

  3. Hi Chuck,

    How are you doing? Have you got any progress on this issue? If you have any
    further questions or anything else we can help, please feel free to post
    here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], Apr 23, 2007
    #3
  4. Chuck P

    Chuck P Guest

    thanks,
    I'll try making the custom column type.
     
    Chuck P, Apr 23, 2007
    #4
  5. Thanks for your reply Chuck,

    If you need any further help on this, please don't hesitate to post here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], Apr 24, 2007
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.