I'm having an usercontrol(.ascx) where I need to double click on a grid and it needs to open up another usercontrol.
I do the following: in .ascx
<
script type="text/javascript">
function RowDoubleClick(index)
{
__doPostBack(
"<%= this.UniqueID %>", "RowDblClicked:" + this.Rows[index].ItemIndex);
}
</script>
in client events I do,
<ClientEvents OnRowDblClick="RowDoubleClick"></ClientEvents>
and in ascx.cs file, I do this,
public partial class CPackageMainUserControl : BaseUserControl, IPostBackEventHandler
{
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{
string[] postBackEventArgumentData = eventArgument.Split(':');
switch (postBackEventArgumentData[0])
{
case "RowDblClicked":
m_ctlPackageGroupMultiView.SetActiveView(m_ctlPackageSetUpView);
m_ctlPackageSetupUserCtrl.LoadNonDocPredefinedReports();
break;
}
}
}
(because in my cause when i dbl click on a row in a radgrid , I need to setactiveview to openup another view).
But when i do all this and try to run , I get a javascript message :
Microsoft JScript runtime error: 'this.Rows' is null or not an object.
Pls help me and correct my code and let me know what to do .
Thanks,
ZR