Description: Calling this class to load into a userControl on the page.
Xml Structure:
Class:
Xml Structure:
<Products> |
<Product> |
<items> |
<ProdID>123</ProdID> |
<ProdNo>89415F</ProdNo> |
<ProdName>OTBuild</ProdName> |
</items> |
</Product> |
</Products> |
Dim RadGrid1 as New RadGrid() |
Dim root as new xmldocument() |
Public Sub GetData(ByRef Placeholder1 as Control) |
CustBinding() |
root.load(Server.mappath("test.xml")) |
Dim ndlist As XmlNodeList = root.SelectNodes("//Products/Product") |
Dim xDoc As New XmlDocument() |
For Each cNode As XmlNode In ndlist |
Dim subNode As XmlNode = xDoc.ImportNode(cNode, True) |
xDoc.InnerXml = subNode.OuterXml |
Dim chNode As XmlNode = nDoc.SelectSingleNode("//Product") |
dS.ReadXml(New XmlNodeReader(chNode)) |
Next |
RadGrid1.datasource=dS |
CustControl() |
RadGrid1.DataBind() |
Placeholder1.controls.add(RadGrid1) |
End Sub |
Public Sub CustBinding() |
RadGrid1.Skin = "Default" |
RadGrid1.ItemStyle.Font.Name = "sans-serif" |
RadGrid1.PagerStyle.Mode = 2 |
RadGrid1.ShowGroupPanel = False |
'RadGrid1.AutoGenerateColumns = True |
RadGrid1.AutoGenerateHierarchy = True |
RadGrid1.AllowPaging = True |
RadGrid1.AllowSorting = True |
End sub |
Public Sub CustControl() |
RadGrid1.Skin = "Default" |
RadGrid1.ItemStyle.Font.Name = "sans-serif" |
RadGrid1.PagerStyle.Mode = 2 |
RadGrid1.ShowGroupPanel = False |
'RadGrid1.AutoGenerateColumns = True |
RadGrid1.AutoGenerateHierarchy = True |
RadGrid1.AllowPaging = True |
End Sub |
Issues:
1) Clicking on one column sorts the next column, the column on the right.(Even for Basic Sorting)
2) Same is issue with MultiColumnSorting.
3) rgStatus Class with div's causes improper align of PagerStyle