Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Multi-Select Dropdown Combo for the WinGrid
posted

hi

i used the following link to create multi select drop down for ultra win grid:

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7698

but i have a problem: after i create the grid for certain cell, and define its datasource, i want to define part of my column as read only but i cant, when checking i see that the grid has 0 rows inside it, athough the datasource has rows in it. only when user click on the cell that is connected to that grid, and the drop down is opened the grid contains the data i binded to it.

why is this happening? how can i solve it

this is the code i wrote:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DropDownEditorButton

 

buttonConfiguration = new DropDownEditorButton(); //Dropdown Editor Button

 

UltraGrid theMultiSelectGridConfiguration = new UltraGrid();

theMultiSelectGridConfiguration.BeginUpdate();

theMultiSelectGridConfiguration.UpdateMode =

UpdateMode.OnCellChangeOrLostFocus;

buttonConfiguration.Control = theMultiSelectGridConfiguration;

//The Multi Select "Combo"

 

UltraTextEditor UltraTextEditorConfiguration = new UltraTextEditor();

UltraTextEditorConfiguration.AfterEditorButtonCloseUp += HandleEditorCloseUp;

UltraTextEditorConfiguration.ButtonsRight.Add(buttonConfiguration);

//add the button to the editor control

 

DataTable dtConfiguration = new DataTable();

dtConfiguration.Columns.Add(

" ", Type.GetType("System.Boolean"));

dtConfiguration.Columns.Add(

"possible values", type);

 

foreach (var value in testConfiguration.Select(p => GetMyMthod(parameterName, p)).Distinct().ToList())

{

 

var row = dtConfiguration.NewRow();

row[0] =

false;

row[1] = value;

dtConfiguration.Rows.Add(row);

}

theMultiSelectGridConfiguration.DataSource = dtConfiguration;

//Fill the "Combo" with Data

theMultiSelectGridConfiguration.DataMember =

"";

theMultiSelectGridConfiguration.DataBind();

theMultiSelectGridConfiguration.EndUpdate();

 

----> when tring to access theMultiSelectGridConfiguration rows i see there are no rows. only after user will click on the grid cell and the grid will open i will see rows.

what can i do?

Parents Reply Children