ADAdministrator Syncfusion Team April 27, 2005 12:14 PM
Did you already check the samples? You''ll find in the Quick Start section the GridListControlSample. Or the GDBGwithDropGrids in the DataBound section.
>How can I add a MCCB in a grid ? I suppose that it exists an exemple (but not found :) )
ADAdministrator Syncfusion Team April 28, 2005 03:56 AM
But I search for a MCCB with the possibility to choice the column in an object implementing IList and also the order and the width of the column.
ADAdministrator Syncfusion Team April 28, 2005 04:02 AM
I can precise that I have already a MCCB (in fact the same data are presented item by item on a form and also an a grid) as a separate control but I cannot how I can link it to a column in the GDBG or link the same "dropdowngrid" to the grid.
ADAdministrator Syncfusion Team April 28, 2005 05:09 PM
the dropdown column listbox will display all columns that are in your datasource. But you could create a wrapper call around your underlying datasource and there override ITypedList.GetItemProperties and return only those columns you want to show up.
Another options would be to handle QueryColWidth of the DropDownListBox part.
You can do this by getting the renderer for the GridListControl cell. From there, you can get renderer.ListBoxPart which is teh GridListControl, and from there you get the Grid member.
Here is code you might use to subscribe to the event.
private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
GridDropDownGridListControlCellRenderer cr = this.gridControl1.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;
if(cr != null)
GridDropDownGridListControlPart list = (GridDropDownGridListControlPart)cr.ListControlPart;
list.Grid.Model.QueryColWidth += ... }
In the QueryColWidth event you could then set e.Size = 0 and e.Handled = true for those columns that you want to hide.
>I can precise that I have already a MCCB (in fact the same data are presented item by item on a form and also an a grid) as a separate control but I cannot how I can link it to a column in the GDBG or link the same "dropdowngrid" to the grid.