Cxgrid How do I dynamically create items in the editor for items?

Source: Internet
Author: User

Cxgrid How do I dynamically create items in the editor for items?
The Cxgrid column has an attribute, and its edit box can specify Combobox,spinedit and so on. At design time, you can think
Add items to the items in the ComboBox. Can I create it dynamically? (added by program when Run-time)

Solve:
Var
A:tdatasource:
B:tcxlookupcomboboxproperties;
Begin
A:=tdatasource.create (self);
B:=tcxlookupcomboboxproperties.create (self);
a.dataset:=dic_ry_xb;//Specify the data source here.
b.listdource:=a;//here indicates the Listsource property of the field.
B.keyfieldnames:= ' a '; The key fields of the field are indicated here
B.listfieldnames:= ' B '; The return value of the field is indicated here.
b.listcolumns.items[0].caption:= ' x; The default here is to create a field, but the displayed header is name, so here it appears as if it were the noon you want.
Cxgrid1dbtableview1c1_sex_code. Properties:=b; The field is indicated here.
End This is the initialized code,

Cxgrid How do I dynamically create items in the editor for items?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.