Edit mode using EditFormInplace
When editformshowing
To the first drop-down box filling data
And add events
RepositoryItemComboBox riCombo=new RepositoryItemComboBox ();
RiCombo. Items. AddRange (new string [] {" discipline ", "post illegal crime", "other crime"});
GridControl1. RepositoryItems. Add (riCombo);
ColType. ColumnEdit=riCombo;
ColType. ColumnEdit. EditValueChanging +=new DevExpress. XtraEditors. Controls. ChangingEventHandler (level1);
Execute when the event, I want to make the second drop-down box filled with dynamic data
Private void level1 (object sender, ChangingEventArgs e)
{
The switch (e.N ewValue. ToString ())
{
Case "discipline" :
RepositoryItemComboBox riCombo1=new RepositoryItemComboBox ();
RiCombo1. Items. AddRange (new string [] {" 111111 ", "11111", "11111"});
GridControl1. RepositoryItems. Add (riCombo1);
ColClass1Type. ColumnEdit=riCombo1;
break;
Case "post illegal crime" :
RepositoryItemComboBox riCombo2=new RepositoryItemComboBox ();
RiCombo2. Items. AddRange (new string [] {" 2222 ", "22222", "22222", "22222," 22222 ", "22222"});
GridControl1. RepositoryItems. Add (riCombo2);
ColClass1Type. ColumnEdit=riCombo2;
break;
In case of "other crime" :
RepositoryItemComboBox riCombo3=new RepositoryItemComboBox ();
RiCombo3. Items. AddRange (new string [] {" 3333 ", "33333", "33333", "33333", "33333"});
GridControl1. RepositoryItems. Add (riCombo3);
ColClass1Type. ColumnEdit=riCombo3;
break;
Default:
break;
}
}
But there is no update editform interface ~ ~ ~
Where's bosses are also need to set???????
CodePudding user response:
No debug? At the very least, make sure you have entered the level1 ~ this eventCodePudding user response: