Trapping Double Click Event



We have an issue when trying to trap the double click event on the grid. So far we have tried to insert the grid in an ASCX control, and are trying to insert the control dynamicaly into the page. We have the following error on the cell double click:

Error :

Object not set to an instance of an object.


[NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.]
   Aspose.Grid.Web.GridWeb.(String ) +140
   Aspose.Grid.Web.GridWeb.ী(String, NameValueCollection ূ) +208
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +718
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4526
Any help would be greatly appriciated
Thanks in advance,


Hi Vincent,

I did some test about ascx but did not find any problems. How did you insert the user control dynamicaly into the page? Could you please post your source file here?



Here's an example of the code I've used to insert the grid into an ascx (we've called it WebUserControlGantt). To make this, I did a drag and drop of the aspose grid into the ASCX. It may also help you to know that we use in parallel your icalendar control in ASCX. We've noticed that all the control (ms and yours) produce an error when there's an event.

Hope this helps, Thanks in advance,


public partial class _Default : System.Web.UI.Page


protected void Page_Load(object sender, EventArgs e)


WebUserControlGantt uc1 = LoadControl("WebUserControl.ascx") as WebUserControlGantt;

if (uc1 != null)






You can't insert a control into to top-level control collection of a Page object. You may create a placeholder object on the page an insert your user control into it.

Here is a sample:

protected void Page_Load(object sender, EventArgs e)
WebUserControl uc1 = (WebUserControl)Page.LoadControl("WebUserControl.ascx");
uc1.ID = "uc1";