cxVerticalGrid can't get values

procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
lvName, lvValue: string;
begin
for i := to cxVerticalGrid1.Rows.Count - do
begin
if cxVerticalGrid1.Rows.Items[i] is TcxEditorRow then
begin
lvName := cxVerticalGrid1.Rows.Items[i].Name;
if cxVerticalGrid1.Rows.Items[i].Focused then
lvValue := VarToStr(cxVerticalGrid1.InplaceEditor.EditValue)
else
lvValue := VarToStr(TcxEditorRow(cxVerticalGrid1.Rows.Items[i]).Properties.Value);
Memo1.Lines.Add(lvName + ':' + lvValue);
end;
end;
end;

How to work with an in-place CheckComboBox in VerticalGrid

function TForm1.GetComboChecks(cxCheckComboBoxProperties: TcxCheckComboBoxProperties; vValues: Variant; sDelim: string = ','): string;
Var
i: Integer;
ACheckStates: TcxCheckStates;
begin
with cxCheckComboBoxProperties do
begin
items.BeginUpdate;
try CalculateCheckStates(vValues, items, EditValueFormat, ACheckStates); for I := to items.Count - do
if ACheckStates[i] = cbsChecked then
result := items[i].Description + sDelim + result; if result <> '' then //получаем 101,12,1024,
Delete(result, Length(result), );//удаляем последнюю запятую finally
items.EndUpdate;
end;//try
end;//with
end; procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
v: variant;
begin
ShowMessage(GetComboChecks(cxVerticalGrid1EditorRow1.Properties.EditProperties as TcxCheckComboBoxProperties, v));
ShowMessage(VarToStr(v));
end;

Copy text from VerticalGrid row to TcxRichEdit

<cxRichEdit>.EditValue :=
<cxVerticalGrid>.DataController.Values[<RecordIndex>, <ItemIndex>];

TcxVerticalGrid - Retrieve Values at Runtime

var
I: Integer;
V: Variant;
...
with cxVerticalGrid1.Rows do
for I := to Count - do
if Items[] is TcxEditorRow then
V := TcxEditorRow(Items[]).Properties.Value;

cxVerticalGrid Actual value

procedure TForm1.TestEditPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
with TForm2.Create(Self) do
try
if ShowModal = mrOK then
begin
(Sender as TcxButtonEdit).EditValue := ID;
(Sender as TcxButtonEdit).PostEditValue;
end;
...

cxVerticalGrid的更多相关文章

  1. cxVerticalGrid赋值是实时更新

    procedure TForm1.cxVerticalGrid1Edited(Sender: TObject; ARowProperties: TcxCustomEditorRowProperties ...

随机推荐

  1. Kali-linux本地权限提升

    上一节介绍了窃取目标系统令牌,现在来介绍窃取令牌后如何提升在目标系统上的权限.提升本地权限可以使用户访问目标系统,并且进行其他的操作,如创建用户和组等.本节将介绍本地权限提升. 同样的实现本地权限提升 ...

  2. 【python3】爬取简书评论生成词云

    一.起因: 昨天在简书上看到这么一篇文章<中国的父母,大都有毛病>,看完之后个人是比较认同作者的观点. 不过,翻了下评论,发现评论区争议颇大,基本两极化.好奇,想看看整体的评论是个什么样, ...

  3. mfc 形式参数初始化

    初始化函数形参 int add(int a,int b) { return a+b; } add(,); ,,char*s=NULL) { printf("a=%d,b=%d,c=%d\n& ...

  4. 人脸检测——MTCNN

    人脸检测——MTCNN .

  5. 【CQOI2017】小Q的棋盘

    题面 题解 根据题意,不回头是最好的(显然法) \(dfs\)找到最长链,设长度为\(\mathrm{L}\),然后分类讨论: 如果\(\mathrm{L} > m\),答案就是\(m + 1\ ...

  6. 在ns2.35下完成柯老师lab18实验

    说明:柯志亨老师<ns2仿真实验-----多媒体和无线网络通信>这本书lab18实验为“无线网络封包传输遗失模型”的实验.该无线传输遗失模型是柯老师自己开发的,原始的ns-allinone ...

  7. jsp 中 , jq 获取当前所点击的 select 的 id 值的注意事项

    因为是使用的 jstl 的 foreach ,所以每个 select 的 id 值都不同,要想在 change 方法中获取到 当前所点击的 select 的 id 值,需要注意的地方有: 1. 得到  ...

  8. form提交方式Get与Post详解

    form作为Html的一个元素,它就是为了客户端提交数据而产生的,它有两个很重要的属性action和method,action属性指明了处理提交的数据的应用程序的URL,而method有两个值:POS ...

  9. anaconda 及python pip安装 类库等问题收集

    在win7下 通过anaconda安装jieba 报如下错误: 问题1:TypeError: parse() got an unexpected keyword argument 'transport ...

  10. 人在囧途——Java程序猿学习Python

    引言 LZ之前其实一直对python都很好奇,只是苦于平时没有时间去了解它,因此趁着51假期这个机会,便迫不及待的开始了自己的探索.作为一个标准的Java程序猿,在了解python的过程当中,LZ遇到 ...