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. vba 语法

    VBA语言基础 第一节 标识符 一.定义 标识符是一种标识变量.常量.过程.函数.类等语言构成单位的符号,利用它可以完成对变量.常量.过程.函数.类等的引用. 二.命名规则 1) 字母打头,由字母.数 ...

  2. 北京Uber优步司机奖励政策(4月20日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  3. python基础学习1-计数器实例

    #!/usr/bin/env python # -*- coding:utf-8 -*- import time as t class MyTimer: def __init__(self):#重写初 ...

  4. 【BZOJ1046】[HAOI2007]上升序列

    [BZOJ1046][HAOI2007]上升序列 题面 bzoj 洛谷 题解 \(dp\)完之后随便搞一下即可,注意不要看错题 代码 #include <iostream> #includ ...

  5. P5231 [JSOI2012]玄武密码

    P5231 [JSOI2012]玄武密码 链接 分析: 首先对所有询问串建立AC自动机,然后扫描一遍母串,在AC自动机上走,没走到一个点,标记这个点走过了,并且它的fail树上的祖先节点也可以访问到( ...

  6. Gitlab+Jenkins学习之路(七)之发布PHP项目

    使用git+jenkins实现持续集成 Step1:构建一个自由风格的php-deploy Step2:Gernal配置,丢弃旧的构建,防止jenkins构建较多之后变臃肿 Step3:源码管理:这里 ...

  7. mysql好用的函数

    FIND_IN_SET 用法示意: INSERT INTO `test` VALUES (1, 'name', 'daodao,xiaohu,xiaoqin'); INSERT INTO `test` ...

  8. 使用web api开发微信公众号,调用图灵机器人接口(一)

    此文将分两篇讲解,主要分为以下几步 签名校验; 首次提交验证申请; 接收消息; 被动响应消息(返回XML); 映射图灵消息及微信消息; 其实图灵机器人搭载微信公众号很简单,只需要把图灵的地址配到公众后 ...

  9. python的字符串格式化

    1.python到底有那几种字符串格式化模块? python有3种格式化字符串的方法: 传统的%字符串格式符 str.format函数 字符串模版template 新的python 3.6+还提供了新 ...

  10. python 拾遗

    三引号 可以当做多行字符串使用.在类或者方法中用的时候,可以当做docstrings来使用.具体的规则为: 该文档字符串所约定的是一串多行字符串,其中第一行以某一大写字母开始,以句号结束.第二行为空行 ...