iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
How can I catch the column click event of webgrid in the clientside, and I set the webgrid "AllowSorting=No"
regards
<LayoutSettings AllowSelectColumns="Yes" AllowColumnMove="Yes" > <ClientSideEvents OnColumnMove="WebGrid1_OnColumnMove" /> </LayoutSettings> //Get the column which you are moving function WebGrid1_OnColumnMove(controlId, tblName, sourceIndex, targetIndex, sourceColumn, targetColumn) { alert("the Move Column Name is:" + sourceColumn.Name); }
May be, the Way you will use later
Hello,
You can still perform column clicking even when AllowSorting is set to No.
Using Listener.Add(), you can implement click function on the column's header without having to activate sorting in WebGrid.
Here is the following code:
window.onload = function () { var WebGrid1 = ISGetObject("WebGrid1"); var ColumnHeaderElement = WebGrid1.GetRootTable().GetElement(WG40.COLHEADER, WG40.HTMLTABLE); Listener.Add(ColumnHeaderElement, "onclick", DoClick); } function DoClick() { alert("Implement column click here."); }
hi
Thanks for your reply, Now when I click the column header, it will execute the click event. but I just want my Columns response the event.and I also want to know which column is clicked.
And if the DoClick function like this, how can I pass the parameter.
function DoClick(columnIndex) { alert("Implement column click here.");}
You can pass the parameter using event.srcElement. Please refer to the following code:
function DoClick() { var SelectedColumn = event.srcElement.innerText; alert(SelectedColumn); }
Hope this helps. Thank you.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname