or
Hello, I'm trying to switch cell is being edited based on selection in the current cell.
the current cell is a combobox column, if a paticular selection is made I'd like to put another cell in the same row into edit mode.
The code below seems to do that, however the selected value of the first cell is not persisted.
I'm assuming that's because the edit sequence did not complete for the initial cell.
Is there a better way to do this?
| If TypeOf sender Is Telerik.WinControls.UI.GridComboBoxCellElement Then |
| cell = RadGridView1.CurrentView.CurrentCell |
| If RadGridView1.ActiveEditor.Value.ToString().ToLower() = "customexpression" Then |
| ex_cell = cell.RowInfo.Cells("Expression") |
| ex_cell.BeginEdit() |
| End If |
| End If |
Thanks
|
Profile |
Test |
Sample |
Prepared Sample |
Container |
|
Blood Group |
Blood Group |
|
Serum |
Plain Tube |
|
Rh Type |
||||
|
CBCESR |
Hb |
|||
|
RBC |
||||
|
PCV |
||||
|
MCV |
||||
|
MCH |
||||
|
MCHC |
| var sortedByLft = from c in network | |
| where (c.Rgt - c.Lft) == 1 | |
| orderby c.Name ascending | |
| select c; | |
| var checkNetwork = new List<Network>(); | |
| //display the unique items in the gridview | |
| foreach (var item in sortedByLft) | |
| { | |
| Application.DoEvents(); | |
| //check if item is already added | |
| var check = checkNetwork.Find(p => p.Adserver_id == item.Adserver_id); | |
| if (check != null) continue; | |
| checkNetwork.Add(item); | |
| Application.DoEvents(); | |
| rgvAdlPositions.MasterGridViewTemplate.Rows.Add(new object[] { item.Adserver_id, item.Name }); | |
| var template = rgvAdlPositions.MasterGridViewTemplate.ChildGridViewTemplates[0]; | |
| foreach(var position in item.Positions) | |
| { | |
| Application.DoEvents(); | |
| //get the method as string | |
| var method = Enums.GetMethod(position.Method); | |
| //add to row | |
| template.Rows.Add(new object[] | |
| { | |
| item.Adserver_id, position.PosId, | |
| ownFunctions.ConcatStrings(new List<string> | |
| { | |
| position.Name, | |
| position.Width.ToString(), | |
| "x", | |
| position.Height.ToString() | |
| }), | |
| method | |
| }); | |
| var templateAd = template.ChildGridViewTemplates[0]; | |
| foreach(var adPos in position.adserverPositions) | |
| { | |
| //add adserved position to row | |
| templateAd.Rows.Add(new object[] { item.Adserver_id, position.PosId, adPos.name }); | |
| } | |
| } | |
| } |