This is a migrated thread and some comments may be shown as answers.

Can I get a server side notification of a row selection

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 17 Jun 2011, 05:23 PM
Hi

I just cann't seem to wire up my grid to issue a server side event on a row selection.

I see there is a client side event.

Do I have to use that and then issue a post-back myself?

TIA

1 Answer, 1 is accepted

Sort by
0
Casey
Top achievements
Rank 1
answered on 17 Jun 2011, 05:50 PM
Hi Tim,

If you add the ClientSettings below to the definition of your RadGrid then you will be able to see an event occur in the ItemCommand event of the RadGrid.

I hope this helps!
Casey

<telerik:RadGrid ID="RadGrid1" runat="server" OnItemCommand="RadGrid1_ItemCommand">
    <ClientSettings EnablePostBackOnRowClick="true" Selecting-AllowRowSelect="true">
    </ClientSettings>
    <MasterTableView>
        <Columns>
             
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "RowClick")
        {
            //your code here
        }
    }

Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Casey
Top achievements
Rank 1
Share this question
or