I'm creating a number of dropgrids inside a loop. I'm having trouble attaching a filter bar to these grids. If I try to wire it in this loop, the form won't display, and if I try to wire during the currentcellshowingdrop down I get an error saying the col index is out of range.
GridDataBoundGrid dropGrid = new GridDataBoundGrid();
dropGrid.DataSource = valueTable;
dropGrid.ThemesEnabled = true;
dropGrid.EnableAddNew = false;
dropGrid.EnableEdit = false;
// Create and register dropdown grid cells
DropDownGridCellModel cellModel = new DropDownGridCellModel(this.gridAttributes.Model);
cellModel.EmbeddedGrid = dropGrid;
string name = "Grid" + gridrow + "DropCell";
this.gridAttributes[gridrow,2].CellType = name;
ADAdministrator Syncfusion Team August 26, 2003 11:58 AM
Is gridAttributes a GridControl or a GridDataBoundGrid? If it is a GridDataBoundGrid, then you cannot use indexers ( this.gridAttributes[gridrow,2].CellType) to set cell properties other than Text or CellValue.
Are things working OK without the GridFilterBar?
I would probably try wiring things in CurrentCellShowingDropDown. Can you post the code you were trying to use? If the colindex was out of range, what value did it have? Were you getting it from grid.CurrentCell.ColIndex?