DataGrid inside WebCustom control

Discussion in 'ASP .Net Web Controls' started by Mircea Pleteriu, Jun 23, 2004.

  1. Hi,

    I am implemention a composite web custom control.
    The control only contains to 2 controls: a DataGrid and an ImageButton
    control.

    I create the child controls within CreateChildControls method of the web
    custom control.
    Within this method also I register the interest in the Click event of the
    ImageButton and SortCommand event of the DataGrid.

    Now I host the control within an ASPX page.
    When the ImageButton is clicked the page is postbacked and its associated
    event handler method within the custom controls is executed.

    What I do not figure out is that the event hadler of the DataGrid's
    SortCommand event is not fired when the user selectes an item on the grid.
    The page is postbacked only.

    Do you have any idea to have it fired?
     
    Mircea Pleteriu, Jun 23, 2004
    #1
    1. Advertising

  2. Sorry, it is about the SelectedIndexChanged event of the Datagrid and not
    SortCommand.


    "Mircea Pleteriu" <> wrote in message
    news:%23$...
    > Hi,
    >
    > I am implemention a composite web custom control.
    > The control only contains to 2 controls: a DataGrid and an ImageButton
    > control.
    >
    > I create the child controls within CreateChildControls method of the web
    > custom control.
    > Within this method also I register the interest in the Click event of the
    > ImageButton and SortCommand event of the DataGrid.
    >
    > Now I host the control within an ASPX page.
    > When the ImageButton is clicked the page is postbacked and its associated
    > event handler method within the custom controls is executed.
    >
    > What I do not figure out is that the event hadler of the DataGrid's
    > SortCommand event is not fired when the user selectes an item on the grid.
    > The page is postbacked only.
    >
    > Do you have any idea to have it fired?
    >
    >
     
    Mircea Pleteriu, Jun 23, 2004
    #2
    1. Advertising

  3. Mircea Pleteriu

    Omar T. Guest

    Have you implemented the interface INamingContainer ?

    "Mircea Pleteriu" <> wrote in message
    news:%...
    > Sorry, it is about the SelectedIndexChanged event of the Datagrid and not
    > SortCommand.
    >
    >
    > "Mircea Pleteriu" <> wrote in message
    > news:%23$...
    > > Hi,
    > >
    > > I am implemention a composite web custom control.
    > > The control only contains to 2 controls: a DataGrid and an ImageButton
    > > control.
    > >
    > > I create the child controls within CreateChildControls method of the web
    > > custom control.
    > > Within this method also I register the interest in the Click event of

    the
    > > ImageButton and SortCommand event of the DataGrid.
    > >
    > > Now I host the control within an ASPX page.
    > > When the ImageButton is clicked the page is postbacked and its

    associated
    > > event handler method within the custom controls is executed.
    > >
    > > What I do not figure out is that the event hadler of the DataGrid's
    > > SortCommand event is not fired when the user selectes an item on the

    grid.
    > > The page is postbacked only.
    > >
    > > Do you have any idea to have it fired?
    > >
    > >

    >
    >
     
    Omar T., Jun 24, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Eshtry
    Replies:
    0
    Views:
    637
    Andy Eshtry
    Mar 1, 2004
  2. DC Gringo
    Replies:
    4
    Views:
    4,853
    mfreidge
    Dec 17, 2007
  3. nail
    Replies:
    0
    Views:
    1,564
  4. DC Gringo
    Replies:
    3
    Views:
    221
    DC Gringo
    Sep 14, 2004
  5. Kiran More
    Replies:
    2
    Views:
    328
    Kiran More
    Nov 14, 2006
Loading...

Share This Page