I've been looking at RadGridView for a couple of hours now and don't yet see where to start on this issue. Here's what I want to do...
I have a grid that I am using to display objects in a BindingList. My view is watching the BindingList and creating grid rows as required. There are 7 objects in the list with 4 text fields on each. Right now, the values display as text in the grid with 7 rows x 4 columns. I need to add a special row to the top of the list that will be frozen, i.e., will not be scrolled when the user scrolls the records vertically. This row will have all comboboxes that will have a fixed number of items and will be presented as a drop list and not be editable. (As soon as I get this row in, I will have to add a second special row with all comboboxes but they will be edtiable.) The grid then should show 8 rows - my special row and the 7 rows for the items.
This all has to be done programmatically. Consider the concrete example: The program will read a delimited file and determine the number of columns that it has. It creates a new GridViewDataColumn for each. It will add the special row with each combobox having the options { int, double, string, DateTime }. And then it read the lines from the delimited file and displays them in the grid.
What I was hoping to see was a GridViewComoboxCell class so I could create a new GridViewRow and add GridViewComoboxCell(s) to the row.Items list. Alas, no such class. Also, I have set binding through the column definition as follows:
When I try to create the special row (that I cannot get to display), I get the following error when adding the row to the grid:
Indexer with specified arguments cannot be found on type GridViewRow
Parameter name: indexerArguments
This indicates that it is using the defined column binding on my new cells - and that won't work.
Suggestions on how to approach this problem would be very much appreciated.
I have a grid that I am using to display objects in a BindingList. My view is watching the BindingList and creating grid rows as required. There are 7 objects in the list with 4 text fields on each. Right now, the values display as text in the grid with 7 rows x 4 columns. I need to add a special row to the top of the list that will be frozen, i.e., will not be scrolled when the user scrolls the records vertically. This row will have all comboboxes that will have a fixed number of items and will be presented as a drop list and not be editable. (As soon as I get this row in, I will have to add a second special row with all comboboxes but they will be edtiable.) The grid then should show 8 rows - my special row and the 7 rows for the items.
This all has to be done programmatically. Consider the concrete example: The program will read a delimited file and determine the number of columns that it has. It creates a new GridViewDataColumn for each. It will add the special row with each combobox having the options { int, double, string, DateTime }. And then it read the lines from the delimited file and displays them in the grid.
What I was hoping to see was a GridViewComoboxCell class so I could create a new GridViewRow and add GridViewComoboxCell(s) to the row.Items list. Alas, no such class. Also, I have set binding through the column definition as follows:
gridViewColumn.DataMemberBinding =
new
Binding(
string
.Format(
"[{0}]"
, i));
When I try to create the special row (that I cannot get to display), I get the following error when adding the row to the grid:
Indexer with specified arguments cannot be found on type GridViewRow
Parameter name: indexerArguments
This indicates that it is using the defined column binding on my new cells - and that won't work.
Suggestions on how to approach this problem would be very much appreciated.