This is a migrated thread and some comments may be shown as answers.

Sorting Issue

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
smith spd
Top achievements
Rank 1
smith spd asked on 16 Jun 2010, 11:56 PM
Description: Calling this class to load into a userControl on the page.

Xml Structure:

<Products> 
    <Product> 
        <items> 
            <ProdID>123</ProdID> 
            <ProdNo>89415F</ProdNo> 
            <ProdName>OTBuild</ProdName> 
        </items> 
    </Product> 
</Products> 
Class:
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

Referred most of the blogs: One , Two .... and many

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Jun 2010, 11:32 AM
Hello Smith,

Please switch to advance binding with NeedDataSource event handling using the same code without the DataBind() call and let me know how it goes.

All the best,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
smith spd
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or