Hi,
In ultragrid cant bind valuelist.Code is below.Please help.Grid not show this valuelist.
public void besGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e) {
ValueList vl2 = new ValueList(); vl2.ValueListItems.Add(1, ">"); vl2.ValueListItems.Add(2, "<"); vl2.ValueListItems.Add(3, "=");
e.Layout.Bands[0].Columns[1].Style = ColumnStyle.DropDownList; e.Layout.Bands[0].Columns[1].CellActivation = Activation.AllowEdit; e.Layout.Bands[0].Columns[1].ValueList = vl2; } }
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
Hello Boris
If there is not any mistake in code May be I did mistake in design time?On Ultragrid control.I created data schema .set datamember bind[0] and datasource default datasource1.any idea?
Thanks in advance.
Hello,
What are you seeing exactly if it is not a dropdown - just a regular cell? Can you paste here this code you are talking about, I would have to see either a code sample or a small project in order to be able to help you on this.
Borisov could you check this code?It works ,But cant check checkbox.It is not active.Despite I activated.And check column datatype is boolean.
private void besGrid2_InitializeLayout(object sender, InitializeLayoutEventArgs e) { DataTable dtb = new DataTable(); dtb.Columns.Add("ID", typeof(Int32)); dtb.Columns.Add("Text", typeof(string)); dtb.Columns.Add("Check",typeof(bool)); dtb.Rows.Add(new object[] { 1, "A" }); dtb.Rows.Add(new object[] { 2, "B" }); e.Layout.Bands[0].Columns[2].Style = ColumnStyle.CheckBox; e.Layout.Bands[0].Columns[2].CellActivation = Activation.AllowEdit; e.Layout.Bands[0].Columns[2].CellClickAction = CellClickAction.Edit; this.besGrid2.DataSource = dtb; }
I can see that you are already discussing this with Georgi, can you please keep the conversation there: http://ko.infragistics.com/community/forums/p/78560/396907.aspx#396907? Thank you.