It seems that WebDataGrid does not support the double click event on a row? Am I missing something? Is this feature scheduled for a future release?
Regards,
Arthur
Thats great thanks Alex
Hi Rumen
This might be a silly question, but is there a way to set this on all rows without looping through them all and adding the ondblclick function?
Thanks
Andy
Hello,
Yes -- I see. I have tested that and it works for me, but I guess my page is small and pageLoad gets executed after initializing the grid. I have found a general way to do that -- there is a Initialize event for the grid which I think is exacty what you need (in this sample we attach double click to the first row)
<script language="javascript"> function initGrid() { var grid = $find("<%= WebDataGrid1.ClientID %>"); var gridRow = grid.get_rows().get_row(0); gridRow.get_element().ondblclick = function() { alert("Double click"); } } </script> <ig:WebDataGrid runat="server" ID="WebDataGrid1" DataSourceID="AccessDataSource1"> <ClientEvents Initialize="initGrid" /> </ig:WebDataGrid> <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" SelectCommand="SELECT [EmployeeID], [LastName], [FirstName] FROM [Employees]"> </asp:AccessDataSource>
Hi
Thanks for your Reply.
I have put the above code in pageLoad function.Bt it not working.I need to the solution for when i double click any row i getting the cell value.How can i raise the double click event and how can i assign that event to webdatagrid?