Can someone please tell me why the clickcell button works and I get error meesages on the other two?
Many thanks
Lynn
private void BillingSheetGrid_DblClick(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { }private void BillingSheetGrid_Click(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) {
}
Hello Lynn,
Thanks for writing. It is really hard to tell without seeing the exact error messages you get first. Could you please copy/paste the error message and better yet, the complete stack trace of the error here - this will certainly provide additional clues.
Thanks.
Sure -
This is how I am wiring up the three events in the Page Load method
this.BillingSheetGrid.ClickCellButton +=new ClickCellButtonEventHandler(BillingSheetGrid_ClickCellButton);this.BillingSheetGrid.Click +=new ClickEventHandler(BillingSheetGrid_Click);this.BillingSheetGrid.DblClick +=new ClickEventHandler(BillingSheetGrid_DblClick);
These are the two error messages:
No overload for 'BillingSheetGrid_Click' matches delegate 'Infragistics.WebUI.UltraWebGrid.ClickEventHandler' C:\Development\PFM Contracter AP\CAPS Project\CAPSProject\BillingSheet.aspx.cs 25 43 CAPSProject
No overload for 'BillingSheetGrid_DblClick' matches delegate 'Infragistics.WebUI.UltraWebGrid.ClickEventHandler' C:\Development\PFM Contracter AP\CAPS Project\CAPSProject\BillingSheet.aspx.cs 26 46 CAPSProject
There is no error message for the CellButtonClick even though the structures look identical to me.
Thanks for the help,
Any change someone could show this code using VB.Net?
Thanks!
Thanks for asking the question.
It turns out that I should have had ClickEvents instead of CellEvents.
Everything works now.
Regards,
This is very weird, I have just tried the following in my projects:
protected override void OnInit(EventArgs e) { base.OnInit(e); UltraWebGrid1.Click += new Infragistics.WebUI.UltraWebGrid.ClickEventHandler(UltraWebGrid1_Click); UltraWebGrid1.DblClick += new Infragistics.WebUI.UltraWebGrid.ClickEventHandler(UltraWebGrid1_DblClick); UltraWebGrid1.ClickCellButton += new Infragistics.WebUI.UltraWebGrid.ClickCellButtonEventHandler(UltraWebGrid1_ClickCellButton); } void UltraWebGrid1_DblClick(object sender, Infragistics.WebUI.UltraWebGrid.ClickEventArgs e) { throw new NotImplementedException(); } void UltraWebGrid1_ClickCellButton(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { throw new NotImplementedException(); } void UltraWebGrid1_Click(object sender, Infragistics.WebUI.UltraWebGrid.ClickEventArgs e) { throw new NotImplementedException(); }
and it worked without any issues - the project was able to compile successfully. Can you please check if the event handlers signature is that same to what I have? You can also try to generate event handlers automatically in code if you press Tab twice after writing "+=" for events - this will generate the correct signature automatically.