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

How to handle ItemCommand event on DetailTable

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lei
Top achievements
Rank 2
Lei asked on 05 Jul 2008, 09:08 AM
Hi,

     May I know how to handle ItemCommand event on DetailTable. I tried to mark a break point to both Page_Load event & RadGrid_ItemCommand event. When I click the ButtonColumn (on the DetailTable), the web form post back and stopped at Page_Load event but never stopped at ItemCommand event. That's seems I cannot implement our code if the user clicked on the ButtonColumn on the DetailTable?

Thanks & Regadrs,
Louis

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jul 2008, 05:57 AM
Hi Louis,

I tried this on my end and it is working as expected. Have you set the CommandName property for the GridButtonColumn? Here is the code I tried:

ASPX:
 <telerik:GridButtonColumn HeaderText="ButtonCol" CommandName="CustomCommand" Text="Click" UniqueName="ButtonCol"    ></telerik:GridButtonColumn> 


CS:
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "CustomCommand") 
        {  
         
        } 
   } 


Thanks
Shinu.
Tags
Grid
Asked by
Lei
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or