System.Windows.Forms.DataGridViewCellFormattingEventArgs' does not contain a constructor that takes 1 arguments
i keep getting following error message when compile code:
error 1 'system.windows.forms.datagridviewcellformattingeventargs' not contain constructor takes 1 arguments
causing - code far:
form1.designer.cs
this.datagridview1.cellclick += new system.windows.forms.datagridviewcellformattingeventargs(this.datagridview1_cellclick);
form1.cs
private void datagridview1_cellclick(object sender, datagridviewcellformattingeventargs e)
{
if (this.datagridview1.columns[e.columnindex].name == "driverno")
{
messagebox.show("hello");
}
}
error 1 'system.windows.forms.datagridviewcellformattingeventargs' not contain constructor takes 1 arguments
causing - code far:
form1.designer.cs
this.datagridview1.cellclick += new system.windows.forms.datagridviewcellformattingeventargs(this.datagridview1_cellclick);
form1.cs
private void datagridview1_cellclick(object sender, datagridviewcellformattingeventargs e)
{
if (this.datagridview1.columns[e.columnindex].name == "driverno")
{
messagebox.show("hello");
}
}
hi methuselah90,
try this:
this.datagridview1.cellclick += new system.windows.forms.datagridviewcelleventhandler(this.datagridview1_cellclick);
private void datagridview1_cellclick(object sender, datagridviewcelleventargs e) { if (this.datagridview1.columns[e.columnindex].name == "driverno") { messagebox.show("hello"); } }thanks
we trying better understand customer views on social support experience, participation in interview project appreciated if have time. helping make community forums great place.
click here participate survey.
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment