Sort works fine. The initial use of the filter works fine. If I try to do just about anything after setting a filter (clear the filter, filter another column, sort filtered data) I get a Client side error of [NullReferenceException at Infragistis.Web.UI.GridControls.Filtering.SaveClientObjects(ArrayListpropertyObjectList) ...
Anybody else with better luck doing so?
I have attached the HTML and C# code.
Can someone pls confirm if this issue has been resolved in latest release?
Hi Team,
I am trying enable filtering mode on a button click event for a grid with AutoGenerateColumns set to true. Is there a way to achieve this?
Any help will be highly appreciated.
Thanks & regards,
Assyst
FYI. Even with that page load code (mine is attached) and EnableDataViewState always off, the filtering still does not show the correct records after the first filter action unless you sort the column in between. I am not trying to be a pain, I just want you to know the results I am seeing so you can either correct me or you will have the correct info for the next guy.
Rebuilding the DataTable on every postback is not an option for the true page anyway. It would take too long.
Thanks Olga.
It is all fixed in the next service release. But since the workaround for now was to turn off EnableDataViewState, you have to keep re-assigning the whole datasource to the grid on every postback. so your binding code should look like this (based on the sample you gave me), this way you should see filtering and sorting working as you expect. Once the new service release comes out you can go back to your original databindg code and turn on EnableDataViewState again.
e) {
{
//if (IsPostBack)
//{
// // Load the Vendor Result datatable from viewstate to the WebDataGrid.
// if (ViewState["dtVendorResults"] != null)
// {
// wdgVendorsByMiles.DataSource = (DataTable)ViewState["dtVendorResults"];
// wdgVendorsByMiles.DataBind();
// }
//}
//else
);
myDataColumn; myDataColumn =
myDataColumn =
(); myDataColumn.DataType =
myDataColumn.DataType =
); myDataColumn.ColumnName =
myDataColumn.ColumnName =
; myDataTable.Columns.Add(myDataColumn);
myDataTable.Columns.Add(myDataColumn);
row1, row2; row1 = myDataTable.NewRow(); row1[
row1 = myDataTable.NewRow();
row1[
; myDataTable.Rows.Add(row1); row2 = myDataTable.NewRow(); row2[
myDataTable.Rows.Add(row1);
row2 = myDataTable.NewRow();
row2[
; myDataTable.Rows.Add(row2); wdgVendorsByMiles.DataSource = myDataTable; wdgVendorsByMiles.DataBind();
myDataTable.Rows.Add(row2);
wdgVendorsByMiles.DataSource = myDataTable;
wdgVendorsByMiles.DataBind();
//wdgVendorsByMiles.EnableDataViewState = false;
//if (ViewState["dtVendorResults"] == null)
// ViewState.Add("dtVendorResults", myDataTable);
// else
// ViewState["dtVendorResults"] = myDataTable;
}
Good day Olga.
Setting the EnableDataViewState always to false does solve the exception.
Filtering still does not behave as advertised though as shown below.
Filter with Begins with 'P'.
Works as you see the Programmer record.
Filter with Begins with 'I'.
Does not work as you see no records rather than the Infragistics Expert record.
Does not work as you see no records rather than the Programmer record.
Sort Trade column.
Both records disappear.
You probably already know this, I just want to make sure this is addressed in the new release rather than just the Exception.