automatically load this event in the code in C#?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Actually, I am a vb.net developer, but right now, I need to use C# to write
some web application(some dll provide sample on C#). I am using
VisualStudio.net 2003 as IDE.
I found I need to manually add event in C# for a control, for example, I
have a grdPerson datagrid control, I need to add this function

private void grdPerson_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
grdPerson.CurrentPageIndex = e.NewPageIndex;
BindBugGrid();
}

and also I need to add this line into the InitializeComponent function

this.grdPerson.PageIndexChanged += new
System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.grdPerson_PageIndexChanged);

Actually in VB.net ,that is automatically in the code when I select
PageIndexChanged this event.....

I would like ask how I can automatically load this event in the code?

Thanks.

Yezanxiong
 
Hi,

You have to select the datagrid, goto the properties window, click on the
ray icon, and double click on the event that you want.

Pablo
 
Thanks a lot, that it what I want!!!

Pablo Galiano said:
Hi,

You have to select the datagrid, goto the properties window, click on the
ray icon, and double click on the event that you want.

Pablo
 
Back
Top