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,
I need to remove "Is Between" filter for date column from Intersoft WebGrid.
When i used the below code to remove "Is Between" filter then "Is Between" filter removed successfully from webGrid but a new filter "Contains" is also added into the filter list on Date column.
function WebGrid1_OnAfterInitialize(controlId){
{
wg_Global.FilterType = new Array(["NotSet", 0],["GTET", 1],["GT", 2],["ET", 3],["NET", 9],["LTET", 4],["LT", 5],["Like", 6],["NotLike", 11],["IsNull", 12],["NotIsNull", 13],["IsEmpty", 14],["NotIsEmpty", 15],["Contain ", 16],["NotContain", 17]);
}
I want to remove only "Is Between" filter from Intersoft grid, not to add a new filter "Contains" into the filter list.
Please give me the suggestion to resolve this issue.
Thanks
Sachin
Please try to modify the array of FilterType property into the following.
function ChangeFilter() { wg_Global.FilterType = new Array(["NotSet", 0], ["GTET", 1], ["GT", 2], ["ET", 3], ["NET", 9], ["LTET", 4], ["LT", 5], ["Like", 6], ["NotLike", 11], ["NotContain", 17], ["NotBetween", 10], ["IsNull", 12], ["NotIsNull", 13], ["IsEmpty", 14], ["NotIsEmpty", 15]); }
The script will remove the “IsBetween” and not add the “Contains” from WebGrid filter list. Should you need to remove the “Not Between” and “Not Contain” from the filter list as well, the following script will suit your need.
function ChangeFilter() { wg_Global.FilterType = new Array(["NotSet", 0], ["GTET", 1], ["GT", 2], ["ET", 3], ["NET", 9], ["LTET", 4], ["LT", 5], ["Like", 6], ["NotLike", 11], ["IsNull", 12], ["NotIsNull", 13], ["IsEmpty", 14], ["NotIsEmpty", 15]); }
Please let us know whether this helps or not.
Thanks Yudi,
Yes, I need to remove "Is Between" and "NotBetween" filter from Date column only. As per your suggestion, If I use your given filter array, It will remove contains from Date column and other string column also.
wg_Global.FilterType = new Array(["NotSet", 0], ["GTET", 1], ["GT", 2], ["ET", 3], ["NET", 9], ["LTET", 4], ["LT", 5], ["Like", 6], ["NotLike", 11], ["IsNull", 12], ["NotIsNull", 13], ["IsEmpty", 14], ["NotIsEmpty", 15]);
My requirement is that Contains filter should be added on other column except Date type so this array will not work.
Please give me another solution.
Unfortunately, it is not possible to customize the filter type option per column. The filter type customization will be applied globally, means all columns will have the same filter type.
Should you need to implement this feature, you can submit this as feature request to the WebGrid development team.
Hope this helps.
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