Victor Charles
asked on
Help with disabling displaying field in combobox if exist in an xml file
Hi,
I'm using the code below to display data from a DataGrid in a combobox:
ComboBox2.DataSource = (From col As C1.Win.C1TrueDBGrid.C1Data Column In C1Data.Columns Select col.Caption).ToList()
How do I modify the code to display data in the combobox only if the field name in C1Data exist in an xmlmfile?
For example if Main.xml contains the following data elements (NSC,FIF,AGD,UVN) in C1Data contains the following columns((NSC,FIF,NAS, PCS,NMN) I want the dropdown list to only contain (NSC,FIF)
Thanks,
Victor
I'm using the code below to display data from a DataGrid in a combobox:
ComboBox2.DataSource = (From col As C1.Win.C1TrueDBGrid.C1Data
How do I modify the code to display data in the combobox only if the field name in C1Data exist in an xmlmfile?
For example if Main.xml contains the following data elements (NSC,FIF,AGD,UVN) in C1Data contains the following columns((NSC,FIF,NAS, PCS,NMN) I want the dropdown list to only contain (NSC,FIF)
Thanks,
Victor
ASKER
Hi Fernando,
The XML format file is in the following format:
<Root>
<Fields>
<NSC></NSC>
<FIF></FIF>
<AGD></AGD>
<UVN></UVN>
</Fields
</Root>
Thanks,
victor
The XML format file is in the following format:
<Root>
<Fields>
<NSC></NSC>
<FIF></FIF>
<AGD></AGD>
<UVN></UVN>
</Fields
</Root>
Thanks,
victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Fernando,
It works. Thank You.
Is it possible to modify the code using multiple xml files? For example I want to load the combobox with values in the Grid matching fields in both Main.xml and Sub.xml. Other option is to create one xml file from Main and Sub.xml and use the existing code.
If necessary I can open a new issue.
Victor
It works. Thank You.
Is it possible to modify the code using multiple xml files? For example I want to load the combobox with values in the Grid matching fields in both Main.xml and Sub.xml. Other option is to create one xml file from Main and Sub.xml and use the existing code.
If necessary I can open a new issue.
Victor
ASKER
Please see my last comments.
Hi Victory;
I believe you would be better off using one XML file because you will then need to read in two or more XML files then query both and then combine the results into one list.
I believe you would be better off using one XML file because you will then need to read in two or more XML files then query both and then combine the results into one list.
And what does the schema/structure of the XML look like?