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

How to automatically create event in code behind

1 Answer 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hazzard
Top achievements
Rank 1
Hazzard asked on 23 Dec 2008, 10:02 PM
I want to create an RowDataBound event handler in the c# code behind.
I was hoping just double clicking on the empty OnRowDataBound property text box under the lightning bolt icon under ClientSettings/ClientEvents would automagically create the template for that event.
Double Clicking however has no effect.
How does one create a template for an event in the code behind?
Thank you,
Greg

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Dec 2008, 05:38 AM
Hi  Greg Hazzard,

RowDataBound event is available with asp.net GridView. You can use ItemDataBound event in RadGrid similar to the RowDataBound event. You can create the ItemDataBound event in the code behind as shown below.

CS:
   RadGrid1.ItemDataBound+=new GridItemEventHandler(RadGrid1_ItemDataBound);

  protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
 
    } 


Shinu
Tags
Grid
Asked by
Hazzard
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or