edComboList set index

Hi,

I need to set the index of a combobox in my advcolumngrid. I can select manually when i run the program, but i need to set a value in a cell's combolist.

I tried the following, but no success..

 AGvhf.ComboIndex[4,4] := 2;   

 Hoped this would select the index of the combolist in this cell, and change the text in the cell to the string related to the index, like a standard combobox.

Also tried this:

<!--if gte mso 9>
<w:Word>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:Trackatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfInvalid>false</w:SaveIfInvalid>
<w:IgnoreMixed>false</w:IgnoreMixed>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DonotPromoteQF/>
<w:LidThemeOther>NL</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplex>X-NONE</w:LidThemeComplex>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndark/>
<w:EnableKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="&#45;-"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:Word>


We have seen this issue. It was specific to TAdvColumnGrid and in the next update this will be fixed. Workaround with the current version is to implement OnGetEditorProp like:


procedure TForm4.AdvColumnGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
begin
  if AdvColumnGrid1.Columns.Count > ACol then
  begin
    AdvColumnGrid1.ComboBox.Items.Assign(TGridColumnItem(AdvColumnGrid1.Columns[ACol]).ComboItems);
  end;
end;

Please post VCL grid related question in the VCL grid forum and not in the IntraWeb forum

Ok, Thanks for your quick response!

I will try this workaround.

Grts, Ruud.

PS, I will try to choose the right forum ;-)