Hi, I am currently using WebDataGrid v10.3.2120 build.
I have to perform some special sorting for my grid which I am now doing in the Grid Clientside MouseUp event for the column header by posting the grid back to server and perform the sorting in the code-behind. When implementing the MouseUp event, I realized that out-of-box ColumnFixing on the grid no longer works as the postback happens via the MouseUp event before the ColumFixing event can even fire.My MouseUp code looks as below...function GridMouseUp(sender, eventArgs){ var item = eventArgs.get_item(); var type = eventArgs.get_type(); if (item != null && eventArgs.get_type() == "header") { __doPostBack("Sort", item.get_column().get_key()); }}I can attach another condition to the "If" criteria to skip the postback during the MouseUp if I can figure out the click was originated from the FixButton. But when I look at the sender parameter, it shows the event was originated from the WebDataGrid and does not give any specific component details e.g. the FixButton id etc. Can someone help me identify how to intercept this FixButton click and isolate it from the MouseUp event? Thanks
Hi a105019,
Off of the event args, you can get the actual browser event that happened for the mouse up. There it will have the target. If the target is the image for the fix button, you'll want to do nothing. Use the following code:
var browsEvent = eventArgs.get_browserEvent();
var target = browsEvent ? browsEvent.target : null;
var isFixBtn = target && target.getAttribute && target.getAttribute('mkr') == "fixBtn";
regards,David Young
Thanks David. That was exactly what I was looking for...worked great. Thanks.