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.
Hi,
I'm having problems with the filter bar when I
want to add an unbound column, like a check box
in the front. I block the filter on this column
with GridFilterBarCreatingColumnHeader and an
e.Cancel then I get an error from SetCellInfo of
GridModel.cs: "Specified argument was out of the
range of valid values." line ~4582
Basically I'm combining the GDBGwithdropgrids
and filterbargrid examples. It works fine if
every colmn is bound, but when there's an
unbound column it gets pretty tricky.
It has something to do with styleinfo's...
anyway has anyone done this before to show an
example?
TIA!
Colin
Hey Colin,
I had this same feature.... Basically making it look like a bit like the listview control eh?! Here is what I did:
Since the filterbar doesn't play well with Dataviews at the moment. I got my datatable, filtered it, sorted it, with a dataview. Then added those records to a datatable such as.
this.filteredAppointments.Columns.Add("Checked",Type.GetType("System.Boolean") );
this.filteredAppointments.Columns.Add("AppointmentTime",Type.GetType("System.String") );
this.filteredAppointments.Columns.Add("AppointmentDate", Type.GetType("System.String"));
this.filteredAppointments.Columns.Add("StartTime",Type.GetType("System.String") );
this.filteredAppointments.Columns.Add("Guest", Type.GetType("System.String"));
this.filteredAppointments.Columns.Add("Student", Type.GetType("System.String"));
this.filteredAppointments.Columns.Add("StudentID", Type.GetType("System.Int32"));
this.filteredAppointments.Columns.Add("AppointmentID", Type.GetType("System.Int32"));
Notice the first column is the only one not in my original dataview.
In order to have it function more like a listview I also made the checkbox column the only column that can be entered and changed. Like so...
this.grdAppointments.Binder.InternalColumns[0].StyleInfo.ReadOnly = false;
this.grdAppointments.Binder.InternalColumns[0].StyleInfo.CellType = "CheckBox";
All other columns:
this.grdAppointments.Binder.InternalColumns[1].StyleInfo.CellType = "Static";
CLColin LamarreNovember 20, 2003 10:57 AM UTC
Hi Jim,
ok I guess I can go that route.
Thanks,
Colin