Hi all,
I use Checkbox in WebDataTree as below:
this.webDataTree1.Nodes.Clear(); this.webDataTree1.DataSource = tb.DataSet;
DataTreeNodeBinding binding = new DataTreeNodeBinding(); binding.ValueField = tb.Columns["id"].ColumnName; binding.TextField = tb.Columns["name"].ColumnName;
this.webDataTree1.DataBindings.Add(binding);
this.webDataTree1.DataMember = tb.TableName; this.webDataTree1.DataBind(); this.webDataTree1.CheckBoxMode = Infragistics.Web.UI.CheckBoxMode.BiState;But it got issue as picture below:
Please help me find solution for this issue.Thanks you very much.Ly
Hi Ly,
Thank you for your feedback.
I am glad to hear that you have resolved your issue. Please let us know if you have any additional questions.
Hi Plamena,Thanks for your help.Currently, my application works fine. Because webDataTree only support 2 type binding data as HierarchicalDataSource and Xml Data Source. Code example as below:
WebDataTree.Nodes.Clear(); Infragistics.Web.UI.DataSourceControls.DataView dtView = new Infragistics.Web.UI.DataSourceControls.DataView(); dtView.ID = "default"; dtView.DataMember = tb.TableName; dtView.DataSource = tb.DataSet;
Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource webDS = new Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource(); webDS.DataViews.Add(dtView);
DataTreeNodeBinding dataNode = new DataTreeNodeBinding(); dataNode.DataMember = "default"; dataNode.TextField = "name"; dataNode.KeyField = "id";WebDataTree.DataBindings.Add(dataNode);
WebDataTree.DataSource = webDS;WebDataTree.DataBind();
Thanks,Ly Ngo
You should set the DataMember on the DataTreeNodeBinding instead on the tree itself:
binding.DataMember = tb.TableName;
Please let me know if you need further assistance regarding this matter.
I will investigate this issue further and will get back to you later today.
Hello Everyone,
I needs this issue to be fixed urgently because it's critical to my project. I am stuck on this one. Could anyone please give me some ideas? I dont know why it renders the statement (infragistics.web.ui.framework.data.datasetnode) but my checkbox list data.
Thank you and really appreciate your answer!
Ly