Thx it works fine ! There was a little mistake here : e.Item.Attributes.Add("onclick", "javascript__doPostBack('DataGrid1:_ctl" + (e.Item.ItemIndex + 2) + ":_ctl0','" + e.Item.ItemIndex + "')"); And the right piece of code : e.Item.Attributes.Add("onclick", "javascript:__doPostBack('DataGrid1$_ctl" + (e.Item.ItemIndex + 2) + "$_ctl0','')"); Anyway thanx a lot for your help. See U. Jeff
jeff37
Posts
-
ASP .Net - C# - Datagrid : selecting a row by clicking it (no button) -
ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)minhpc_bk wrote: Am I correct in thinking that you have a datagrid displaying data, now instead of placing an Edit button(or link) in each row so that the user can click to select a particular row for editing, you might want the user to simply click on the row(or on any cells of the row) to select the row? When the user clicks on the row, the page should go back to the server and you want to get the information bound to the row. Yep you're right. It's what I'd like to do. Possible ? Thx.
-
ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)Hi, Well I tried your solution and I think I badly explain what I really want to do. In fact I'd like when I click on a row to get the information from this particular row. The information could be on a array or whatever ... Is it possible ? Thx 4 your help. Jeff
-
ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)Nope just by clicking the any cells from the row.
-
ASP .Net - C# - Datagrid : selecting a row by clicking it (no button)Hello, I'd like to be able to edit a row from a datagrid just by cliking on it. Without using buttons. Is it possible and how ? If by any chance you know a free web user control I could used I'll appreciated ;-) Thx for your help. Jeff