Thursday, October 22, 2009

Adding Items to combo box& Check box Column using DevExpress in Edit Form

We had requirement to Create ComboBox column and add items onl fly, and creating CheckBox using Devexpress ASPXGridview

GridViewDataComboBoxColumn colddl = new GridViewDataComboBoxColumn();
colddl.Caption = "ComboBoxColumn";
colddl.FieldName = " ComboBoxColumn ";
colddl.Settings.AllowSort = DevExpress.Web.ASPxClasses.DefaultBoolean.False;
colddl.PropertiesComboBox.Items.Add("JACK");
colddl.PropertiesComboBox.Items.Add("BEN");
gridview.Columns.Add(colddl);
Similary you can also create Checkbox column using GridViewDataCheckColumn.

These controls will be added in ASPXGrid viewEdit form(Edit Button).
GridViewDataCheckColumn colddlActive = new GridViewDataCheckColumn();
colddlActive.Caption = "Active";
colddlActive.FieldName = "Active";
colddlActive.Settings.AllowSort = DevExpress.Web.ASPxClasses.DefaultBoolean.False;
gvSubstitutions.Columns.Add(colddlActive);

Explore ....

No comments: