How to Access properties of dataGrid control

Last post 10-22-2004 6:21 PM by llangleyben. 7 replies.

Sort Posts:

  • How to Access properties of dataGrid control

    10-22-2004, 3:27 PM
    • All-Star
      23,606 point All-Star
    • azamsharp
    • Member since 06-11-2003, 9:36 AM
    • Houston,Texas
    • Posts 4,519
    • TrustedFriends-MVPs
    HI,

    If I inherit my control from the DataGrid controls how can I access all the properites, methods and events of the DataGrid control ?


    HighOnCoding
    Get high on ASP.NET articles, videos, podcasts and more!
  • Re: How to Access properties of dataGrid control

    10-22-2004, 3:51 PM
    • Star
      8,315 point Star
    • llangleyben
    • Member since 06-25-2004, 12:30 PM
    • Israel
    • Posts 1,660
    • TrustedFriends-MVPs
    Hi,
    Like in any other case of inheritance: You can access directly any public or protected members of base class (DataGrid in your case). You can not access private or internal members.

    Leon Langleyben

    MCSD, ASP.NET MVP

    Blog
  • Re: How to Access properties of dataGrid control

    10-22-2004, 3:59 PM
    • All-Star
      23,606 point All-Star
    • azamsharp
    • Member since 06-11-2003, 9:36 AM
    • Houston,Texas
    • Posts 4,519
    • TrustedFriends-MVPs
    So you mean I have to make all the Event Handlers and All the Paging properties.

    Can you give like a small example ??
    HighOnCoding
    Get high on ASP.NET articles, videos, podcasts and more!
  • Re: How to Access properties of dataGrid control

    10-22-2004, 4:10 PM
    • Star
      8,315 point Star
    • llangleyben
    • Member since 06-25-2004, 12:30 PM
    • Israel
    • Posts 1,660
    • TrustedFriends-MVPs
    Do you mean access from hosting page? In this case you don't have to do nothing. Inherited control absorbs all base class public properties.

    Leon Langleyben

    MCSD, ASP.NET MVP

    Blog
  • Re: How to Access properties of dataGrid control

    10-22-2004, 4:12 PM
    • All-Star
      23,606 point All-Star
    • azamsharp
    • Member since 06-11-2003, 9:36 AM
    • Houston,Texas
    • Posts 4,519
    • TrustedFriends-MVPs
    NO i mean accessing properties from the Server controls.

    HighOnCoding
    Get high on ASP.NET articles, videos, podcasts and more!
  • Re: How to Access properties of dataGrid control

    10-22-2004, 6:06 PM
    • Star
      8,315 point Star
    • llangleyben
    • Member since 06-25-2004, 12:30 PM
    • Israel
    • Posts 1,660
    • TrustedFriends-MVPs

    public class ExtendedGrid : DataGrid
    {
    public ExtendedGrid()
    {
    AllowPaging = true; // set property of base class. I, personally, prefer base.AllowPaging syntax
    }
    }

    Is this what are you looking for?
    Leon Langleyben

    MCSD, ASP.NET MVP

    Blog
  • Re: How to Access properties of dataGrid control

    10-22-2004, 6:08 PM
    • All-Star
      23,606 point All-Star
    • azamsharp
    • Member since 06-11-2003, 9:36 AM
    • Houston,Texas
    • Posts 4,519
    • TrustedFriends-MVPs
    thanks a lot yup thats what I was looking for :D

    HighOnCoding
    Get high on ASP.NET articles, videos, podcasts and more!
  • Re: How to Access properties of dataGrid control

    10-22-2004, 6:21 PM
    • Star
      8,315 point Star
    • llangleyben
    • Member since 06-25-2004, 12:30 PM
    • Israel
    • Posts 1,660
    • TrustedFriends-MVPs
    Any time
    Leon Langleyben

    MCSD, ASP.NET MVP

    Blog
Page 1 of 1 (8 items)