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. 2 CRM 讲师与学生,highcharts应用

    一.讲师与学生简介 1 初始化 course_record,studyrecord, 2 考勤 3 录入成绩 4 显示成绩 ajax 查询 5 上传作业(os模块) 6 下载作业 二. 初始化 ,st ...

  2. 5249: [2018多省省队联测]IIIDX

    5249: [2018多省省队联测]IIIDX 链接 分析: 贪心. 将给定的权值从大到小排序,从第一个往后挨个赋值,考虑第i个位置可以赋值那些树.首先满足前面必须至少有siz[i]个权值没选,如果存 ...

  3. opencv-Drawing Functions in OpenCV

    1.opencv简单画图形 # coding = utf-8 # 画线.长方形.圆等 import numpy as np import cv2 # 返回一个数组 img = np.zeros((51 ...

  4. Ansible详解(一)基础安装和配置

    ansible 是一款轻量级自动化运维工具,由的 Python 语言开发,结合了多种自动化运维工具的特性,实现了批量系统配置,批量程序部署,批量命令执行等功能; ansible 是基于模块化实现批量操 ...

  5. MongoDB中设置expire过期自动删除

    关键词: expireAfterSeconds.TTL TTL Time to Live 类似Redis中的expire机制,MongoDB也可以设置过期自动删除的表. MongoDB的过期设置依赖索 ...

  6. 学习java常见dos命令

    在java基础学习阶段时一般会在dos命令行下操作文件,这里列出一些常用命令. 打开DOS控制台的方式 按win+r 再输入 cmd 然后回车. 常用DOS命令 d: 回车 盘符切换 (盘符加冒号) ...

  7. OpenGL(2)-窗口

    写在前面 通过本节,你可以毫不费力的--->创建一个窗口 OpenGL中窗口,即载体 导入头文件 #include <glad/glad.h> #include <GLFW/g ...

  8. phpcms 容许英文目录有空格

    在PHPCMS添加栏目里面,有个选项是 英文目录,这里目录可以用作伪静态功能.这么英文不能有空格等特殊字符.但是如果页面中需要引用包含空格的字符呢,例如,关于我们页面,我要显示英文about us.那 ...

  9. 从零开始的Python学习Episode 20——面向对象(3)

    面向对象之封装 封装,即隐藏对象的属性和实现细节,仅对外公开接口,控制在程序中属性的读和修改的访问级别:将抽象得到的数据和行为(或功能)相结合,形成一个有机的整体. 隐藏 在python中用双下划线开 ...

  10. PHP处理表单数据的一个安全回顾(记录教训)

    曾经看过一个安全文章中写过这么一条 表单输入数据要做 htmlspecialchars_decode 表单输出数据要做htmlspecialchars 当时还不是很理解为什么,自己也没遇到问题,所以就 ...