P
planet
Hi,
I wish I can solve this problem not having recode the sub. Here is
goes: I got this error' specified cast is not valid' at the second
line. from the code
Sub ChkDelete_OnCheckedChanged(ByVal sender As Object, ByVal e As
EventArgs)
DataGrid1_DeleteCommand(sender, e)
What I was trying to do is in the checkbox oncheckChanges event calls
the datagrid's deleteCommand. The linkbutton is set visible =false.
So the user click the checkbox, the linkbutton is triggered. But I
think the problem is the 'sender' I put at the second line. Because
the first argument in the DataGrid1_deleteCommand is (ByVal source As
Object,)
How to cast it? I think is the question. If anyone knows, please help!
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
Query.Query.ChkDelete_OnCheckedChanged(Object sender, EventArgs e)
in c:\inetpub\wwwroot\Query\stock1.aspx.vb:475
System.Web.UI.WebControls.CheckBox.OnCheckedChanged(EventArgs e)
System.Web.UI.WebControls.CheckBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()
I wish I can solve this problem not having recode the sub. Here is
goes: I got this error' specified cast is not valid' at the second
line. from the code
Sub ChkDelete_OnCheckedChanged(ByVal sender As Object, ByVal e As
EventArgs)
DataGrid1_DeleteCommand(sender, e)
What I was trying to do is in the checkbox oncheckChanges event calls
the datagrid's deleteCommand. The linkbutton is set visible =false.
So the user click the checkbox, the linkbutton is triggered. But I
think the problem is the 'sender' I put at the second line. Because
the first argument in the DataGrid1_deleteCommand is (ByVal source As
Object,)
How to cast it? I think is the question. If anyone knows, please help!
Stack Trace:
[InvalidCastException: Specified cast is not valid.]
Query.Query.ChkDelete_OnCheckedChanged(Object sender, EventArgs e)
in c:\inetpub\wwwroot\Query\stock1.aspx.vb:475
System.Web.UI.WebControls.CheckBox.OnCheckedChanged(EventArgs e)
System.Web.UI.WebControls.CheckBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()