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
I have a grid and I execute the following code when the document is loaded in JavaScript. This code sets filters passed in from another web page.
var grid = ISGetObject("grdInvoiceLink");var newFilter;
var oMyObject = window.dialogArguments;
if (oMyObject.vendor != "") { newFilter = new WebGridFilter() newFilter.ColumnMember = "vendor" newFilter.FilterType = oMyObject.vendorFilterType; newFilter.FilterText = oMyObject.vendor grid.RootTable.FilteredColumns.Add(newFilter); grid.RootTable.UpdateUI();}
if (oMyObject.accountNumber != "") { newFilter = new WebGridFilter() newFilter.ColumnMember = "account_nbr" newFilter.FilterType = oMyObject.accountNumberFilterType; newFilter.FilterText = oMyObject.accountNumber grid.RootTable.FilteredColumns.Add(newFilter); grid.RootTable.UpdateUI();}
if (oMyObject.btn != "") { newFilter = new WebGridFilter() newFilter.ColumnMember = "btn" newFilter.FilterType = oMyObject.btnFilterType; newFilter.FilterText = oMyObject.btn grid.RootTable.FilteredColumns.Add(newFilter); grid.RootTable.UpdateUI();}
if (oMyObject.invoicedate != "") { newFilter = new WebGridFilter() newFilter.ColumnMember = "invoice_date" newFilter.FilterType = oMyObject.invoicedateFilterType; newFilter.FilterText = oMyObject.invoicedate grid.RootTable.FilteredColumns.Add(newFilter); grid.RootTable.UpdateUI();}
grid.Refresh();
This code works. The problem is that if you attempt to click on the filter icon on the filter row, you get a script error exception saying something to the effect of:
'undefined' is null or not an object
The URL listed is http://localhost/AnchorPoint/ISRes.axd?G/WebGrid_Context.js/707200403
If I click on any of the other non-filtered columns, I get the standard list of filtering options. I just want to filter the grid but still keep the filtering options for each column if the user needs to change them...
Nevermind, I didn't include the code that set the FilterType values.
The issues was on my FilterTypes, I was using the value LIKE or LESSTHAN (all uppercase). Changing it to use mixed case Like or LessThan fixed the issue.
I made a simple sample based on the information from your previous post in order to reproduce the issue in my local test, but my efforts was not successful – everything worked smoothly and no script error exception happen when attempt to click on the filter icon on the filter row.
The sample was made using WebGrid 7.0 build 405 and WebUI.NET Framework 3.0 build 756; and viewed in IE 8 browser. For more detail information about the sample, please check the attached sample file on this post.
You may make any necessary changes to my sample file so that it reproduce the issue and please let us hear your response.
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