BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Dim val as object = gdbg(rowIndex, binder.NameToColIndex("FIELD_NAME")).CellValue
But if the cell is being edited, then the above code would give you the old value member, and not the currently editing value.
Does this not work for you?
>Dim val as object = gdbg(rowIndex, binder.NameToColIndex("FIELD_NAME")).CellValue
>
>
>But if the cell is being edited, then the above code would give you the old value member, and not the currently editing value.
>
>Does this not work for you?
>
>
GridHierarchyLevel hlRoot = gridDataBoundGrid1.Binder.RootHierarchyLevel;
hlRoot.LayoutColumns(new string[] { "Col2","Col0","combo"});
GridStyleInfo style = hlRoot.GridBoundColumns["combo"].StyleInfo;
style.CellType = "ComboBox";
style.DataSource = dt;
style.DisplayMember = "displayMem";
style.ValueMember = "valueMem";
Exactly what is the type of gdbg1? If you are getting that no indexer error, then I suspect it is typed as a GridControlBase. You would need to either cast it as a GridDataBoundGrid to use the indexer, or use gdbg1.Model and index that.
But I do not think it will make a difference as using GetCellStyleInfo worked for me in the sample.
Exactly where are you trying to use this code? (You reference e.RowIndex which suggests it might be in some event. This might be playing a role in the problem depending upon the event.)
If you can post a sample showing the problem, we can try to spot something here.
>GridHierarchyLevel hlRoot = gridDataBoundGrid1.Binder.RootHierarchyLevel;
>hlRoot.LayoutColumns(new string[] { "Col2","Col0","combo"});
>GridStyleInfo style = hlRoot.GridBoundColumns["combo"].StyleInfo;
>style.CellType = "ComboBox";
>style.DataSource = dt;
>style.DisplayMember = "displayMem";
>style.ValueMember = "valueMem";
>
>
>Exactly what is the type of gdbg1? If you are getting that no indexer error, then I suspect it is typed as a GridControlBase. You would need to either cast it as a GridDataBoundGrid to use the indexer, or use gdbg1.Model and index that.
>
>But I do not think it will make a difference as using GetCellStyleInfo worked for me in the sample.
>
>Exactly where are you trying to use this code? (You reference e.RowIndex which suggests it might be in some event. This might be playing a role in the problem depending upon the event.)
>
>If you can post a sample showing the problem, we can try to spot something here.
ReplayComboBoxGDBG_7714.zip