display XML data in datagrid with checkbox column <template column>

i can set the datagrid.datasource = myXmlDataset, but anyone know how i can hook an unbound column (template column with a checkbox) to one of my XML fields ???

i was thinking of creating a datatable from scratch, cycling thru the items in the XML document and wring them into the table, then filling myXmlDataset, then binding that dataset to my datagrid. but this has proved to be more of a challenge than i thought.
anyone tried doing this before ??? is it even feasible ???
"If it is secrect enough, you alone know it."
0
kevinaich
6/2/2004 10:06:13 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
847 Views

Similar Articles

[PageSpeed] 53

I might be missing something but why don't you read your xml into a dataset and then just do the usual binding and unbound column stuff?


' Invoke the XML Web service method to get user types data in XML format.
Dim strXml As String = myAdmin.GetUserTypes
Dim myDS As New DataSet
' Read the XML data into the local DataSet.
Dim sr As System.IO.StringReader = New System.IO.StringReader(strXml)
myDS.ReadXml(sr)
myDS.AcceptChanges()
ddlUser_types.DataSource = myDS
ddlUser_types.DataValueField = "user_type_id"
ddlUser_types.DataTextField = "descr"
ddlUser_types.DataBind()

Would that work?
James Cornell
www.CornellEnterprise.com
0
JamesXML
6/3/2004 12:16:34 AM
well...

1st) its a datagrid, not a DDL
2nd) i use template columns which are unbound
i can load the XML into a dataset, but it only links 2 of the 4 fields i need... thanks though!

"If it is secrect enough, you alone know it."
0
kevinaich
6/4/2004 8:22:41 PM
Reply: