I have a grid with grouping enabled and also integrates a context menu to access editing and deleting of items. However, when the records are grouped, the index being returned is incorrect as it takes into account the grouping header rows. After a lot of research, I notice that all the examples in the forums use a different javascript method for the context menu than what is given in the Q1 2009 ASP.NET AJAX examples. The biggest difference is that the row index is retrieved using eventargs.get_itemIndexHierarchial(); So, I tried to implement this method to no avail. When implemented, that line of code actually errors and kicks the user out of the method.
I'm getting a bit frustrated by this and would love anyone's help.
Thanks
| Function RowContextMenu(sender, e) |
| { |
| var index = e.get_itemIndexHierarchical(); |
| document.getElementById("hdnGridClickedRowIndex").value = index; |
| var menu = <%= rmuContextMenu.ClientID %>; |
| menu.Show(e); |
| e.cancelBubble = true; |
| e.returnValue = false; |
| if (e.stopPropagation) |
| { |
| e.stopPropagation(); |
| e.preventDefault(); |
| } |
| this.SelectRow(this.Rows[index].Control, true); |
| } |
I'm getting a bit frustrated by this and would love anyone's help.
Thanks