Home All Groups Group Topic Archive Search About
Author
28 Dec 2005 3:59 PM
Holysmoke
I just wonder how to capture datagrid (which is created programmatically)
events.

I say,

Dim oGrid as new DataGrid

I want to process some work on ItemDataBound event of oGrid. Not sure how to
do it :(

I appreciate your help,

TIA,
Holy

Author
29 Dec 2005 10:03 PM
Paul Yanzick
I'm guessing you are using VB, but in C# you would be doing something like:
Grid.ItemDataBound += new DataGridItemEventHandler(this.Test);

From there, you would define the event handler and do what you want in it...
Simply put, you are just adding to the messaging of the event:
public void Test(Object sender, DataGridItemEventArgs e)

{

//Do whatever

}


Thanks
Paul

DataGrid.
Show quoteHide quote
"Holysmoke" <Holysm***@discussions.microsoft.com> wrote in message
news:F36ECA97-C793-4ADA-A5D0-F8F0A9E9C6F8@microsoft.com...
>I just wonder how to capture datagrid (which is created programmatically)
> events.
>
> I say,
>
> Dim oGrid as new DataGrid
>
> I want to process some work on ItemDataBound event of oGrid. Not sure how
> to
> do it :(
>
> I appreciate your help,
>
> TIA,
> Holy