Grid button click event
-
Hi, U need to write button code in DataGrid_ItemDataBound() event; In that event, 1st find that button and then write code like this. private void DataGrid_ItemDataBound() { Button btn = (Button)e.Item.FindControl("Button1"); btn.Attributes.Add("OnClick","window.open ('ss.aspx','sample');"); } I hope this will helps u. bye Pessi.
-
Hi, U need to write button code in DataGrid_ItemDataBound() event; In that event, 1st find that button and then write code like this. private void DataGrid_ItemDataBound() { Button btn = (Button)e.Item.FindControl("Button1"); btn.Attributes.Add("OnClick","window.open ('ss.aspx','sample');"); } I hope this will helps u. bye Pessi.
Nope its not working Private Sub wgQCLinked_ItemDataBound(ByVal sender As Object, ByVal e As C1.Web.C1WebGrid.C1ItemEventArgs) Handles wgQCLinked.ItemDataBound Dim btnRem As Button btnRem = e.FindControl("btnRemarks") btnRem.Attributes.Add("onclick", "window.showModalDialog('frmCustomerRemarks.aspx','BaseWork','dialogWidth:400px;dialogHeight:400px;center:no;');") End Sub btnRemaraks is bound column of datagrid Any guesssss
-
Nope its not working Private Sub wgQCLinked_ItemDataBound(ByVal sender As Object, ByVal e As C1.Web.C1WebGrid.C1ItemEventArgs) Handles wgQCLinked.ItemDataBound Dim btnRem As Button btnRem = e.FindControl("btnRemarks") btnRem.Attributes.Add("onclick", "window.showModalDialog('frmCustomerRemarks.aspx','BaseWork','dialogWidth:400px;dialogHeight:400px;center:no;');") End Sub btnRemaraks is bound column of datagrid Any guesssss
Hi, Try like this. btnRem.Attributes.Add("onclick", "window.showModalDialog('frmCustomerRemarks.aspx','BaseWork','dialogWidth:400px;dialogHeight:400px;center:no;');") bye Pessi.
-
Hi, Try like this. btnRem.Attributes.Add("onclick", "window.showModalDialog('frmCustomerRemarks.aspx','BaseWork','dialogWidth:400px;dialogHeight:400px;center:no;');") bye Pessi.