I have an OnInitializeRow method associated with a WebDataGrid:
protected void wdgKB_OnInitializeRow( object sender, Infragistics.Web.UI.GridControls.RowEventArgs e ) { e.Row.CssClass = "IG_RowStyle UnderlineOnHover"; e.Row.Attributes.Add( "onclick", "alert( 'Got here' );" ); } The code executes, I've stepped through it with the debugger and the CssClass is rendered, but when I check the source of the rendered page there is no onclick attribute. Note: I've trivialized this example; obviously I need it to do something else besides pop up an alert; I need it to call a client-side javascript function with attributes. I know how to do all of that, I just need to get it to render. Any help would be appreciated. JP
e.Row.CssClass = "IG_RowStyle UnderlineOnHover"; e.Row.Attributes.Add( "onclick", "alert( 'Got here' );" ); }
e.Row.CssClass = "IG_RowStyle UnderlineOnHover";
The code executes, I've stepped through it with the debugger and the CssClass is rendered, but when I check the source of the rendered page there is no onclick attribute.
Note: I've trivialized this example; obviously I need it to do something else besides pop up an alert; I need it to call a client-side javascript function with attributes. I know how to do all of that, I just need to get it to render.
Any help would be appreciated.
JP
Sorry, my first post; didn't realize it wouldn't wrap:
toolsmythe said: I have an OnInitializeRow method associated with a WebDataGrid: protected void wdgKB_OnInitializeRow( object sender, Infragistics.Web.UI.GridControls.RowEventArgs e ) { e.Row.CssClass = "IG_RowStyle UnderlineOnHover"; e.Row.Attributes.Add( "onclick", "alert( 'Got here' );" ); } The code executes, I've stepped through it with the debugger and the CssClass is rendered, but when I check the source of the rendered page there is no onclick attribute. Note: I've trivialized this example; obviously I need it to do something else besides pop up an alert; I need it to call a client-side javascript function with attributes. I know how to do all of that, I just need to get it to render. Any help would be appreciated. JP
protected void wdgKB_OnInitializeRow( object sender, Infragistics.Web.UI.GridControls.RowEventArgs e ) { e.Row.CssClass = "IG_RowStyle UnderlineOnHover";
e.Row.Attributes.Add( "onclick", "alert( 'Got here' );" ); }