Strange RadGrid binding Issue

2 posts, 0 answers
  1. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 23 Apr 2010 Link to this post

    I'm getting the following error on SOME rows. I have a repeater and when I click on a link a RadWindow opens with data from the querystring. The page in the RadWindow has a Radgrid. On some rows in the repeater (not all) I get the following error from the RadWindow page from the RadGrid - Both DataSource and DataSourceID are defined on 'rgResults'.  Remove one definition.

    I only have one datasource and its in code behind.

    This is my grid Markup..
         <telerik:RadGrid   
            ID="rgResults"   
            runat="server"   
            AllowSorting="false" 
            AutoGenerateColumns="False"   
            GridLines="None" EnableEmbeddedSkins="false" Skin="MAU">  
                  
            <HeaderContextMenu EnableAutoScroll="True" EnableEmbeddedSkins="False"></HeaderContextMenu> 
           
            <MasterTableView DataKeyNames="PatientID">  
                        <Columns> 
                            REMOVED  
                        </Columns> 
            </MasterTableView> 
     
        </telerik:RadGrid> 

    And this is how I bind the data:-
                Dim objWebService As New Search.QueryWebService  
                Dim XMLNodeObject As XmlNode = objWebService.Search(p1, p2, p3, p4)  
     
                Dim xmlDoc As New XmlDocument()  
                xmlDoc.AppendChild(xmlDoc.ImportNode(XMLNodeObject, True))  
     
                Dim ds As New DataSet  
                ds.ReadXml(New StringReader(xmlDoc.OuterXml))  
     
                rgResults.DataSource = ds 
                rgResults.DataBind() 

    What is going on?

    ANdy
  2. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 26 Apr 2010 Link to this post

    I think you can ignore this for now. The problem appears to happen when the Webservice returns no records, and if you look at my code, it is not being handled.

    Andy
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top