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

Strange RadGrid binding Issue

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 23 Apr 2010, 03:54 PM
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

1 Answer, 1 is accepted

Sort by
0
Andy Green
Top achievements
Rank 1
answered on 26 Apr 2010, 03:05 PM
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
Tags
Grid
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Andy Green
Top achievements
Rank 1
Share this question
or