The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have developed some databound grid with a filter bar on it. Everything is ok.
For some reason I need to place the datagrid on a panel. If I do that the Filter bar will not work... I get the following error:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: colIndex
I used the samples to create the filter bar and my code looks like this:
dsStock = new DataSet();
this.adptStock.Fill(this.dsStock);
this.Cursor = Cursors.WaitCursor;
this.dgStock.BeginUpdate();
this.dgStock.DataSource = dsStock.Tables[0];
this.dgStock.Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.NoShrinkSize);
this.dgFilterBar = new GridFilterBar();
this.dgFilterBar.WireGrid(this.dgStock);
this.dgStock.EndUpdate();
this.Cursor = Cursors.Arrow;
The debugger highlights this line when the error strikes:
this.dgStock.EndUpdate();
Again without the panel everything is perfect. The filter bar does the job.
ADAdministrator Syncfusion Team July 6, 2003 04:01 PM UTC
The grid inherits its binding context from its parent so try setting the grid's BindingContext to the BindingContext of the form to see if that makes things work.
this.dgStock.BindingContext = this.BindingContext;