| <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

I need to add the below functionality to all my grids
1. If the cell is empty, I need to append a value.
2. I need to get the Grid column width. (width is dynamic. I dint set any width specifically.)
I have inherited the RadGrid control and it executes both ItemDatabound/PreRender handler.
If I add the string, all the strings left empty. I tried the below code
protected override void OnPreRender(EventArgs e)
{
ControlHelper.RegisterScriptFile("~/App/script/NCRadGrid.js");
foreach (GridItem item in MasterTableView.Items)
{
foreach (TableCell cell in item.Cells)
{
cell.Text += " ";
}
}
