Hello
I try to link some controls to the grid cells, but this does not work pretty good.
My task is to have a readonly Grid, with the only one Active/Selected Row that will be represented in the editing controls.
Once user changes the active Row, the values are reflected in the controls. Once the controls are modified, the modifications are reflected in the grid.
Each control (usually UltraWInCombo) should have a visible Text, and invisible Value members.
Similar, each grid cell should have a Value, and Text members. When user changes the text from combo, the respective combo Value is set into the grid Cell Value, and that cell Text is updated accordingly.
I attached a sample project that I try to simulate.
Actually, my sample seems to work, but the problem is when the user selects a already filled row, the values are not displayed correctly in the controls.
Here is the code
private void ActiveRowToControls() { var r = myGrid.ActiveRow; if (r == null) return; txtNick.Text = r.Cells[Cols.Nick].OriginalValue.ToString(); cmbCountry.Value = r.Cells[Cols.Country].OriginalValue; cmbCity.Value = r.Cells[Cols.City].OriginalValue; txtBirthDate.Text = r.Cells[Cols.BirthDate].OriginalValue.ToString(); }
I tried with Value, but this is worse - controls texts dissapears.
PS.
! As I use v6.3 of the library, I have no RowEditTemplate and the ControlContainerEditor.
Hi,
I tried running your sample, but there does not appear to be any data in the grid, so I'm not sure what to do with it.
If you want the grid cell value to match up to the UltraCombo value, then the grid column and the UltraCombo would need to be populated with the same list. Otherwise, the Value in the grid cell which is translated into the DisplayText will not be valid for the UltraCombo.
there is no data. the data must be filled in in controls, then "+" added and so on.
In fact, I resolved the problem by using the hidden columns for the real values, and text columns for the real ones.
Thank you anyway for help )