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

[Solved] GridView bind with xml

5 Answers 166 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chirag
Top achievements
Rank 1
Chirag asked on 02 Jun 2011, 01:25 PM
hi to all 
can any one give me a sample example for bind RadGridView with XML data source, 
my xml data source is dynamic no column is specified or no data type is defined
i am making one example but in this shorting, grouping, filter will not work. 

5 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 02 Jun 2011, 02:15 PM
Hi Chirag,

I have prepared an example project for you. Please, refer to it an let me know if this approach meets your requirements. As for the sorting and filtering features, the column types should be correctly initialized and the properties of your data source should be of type that implements IComparable and IEquatable.

Kind regards,
Ivan Ivanov
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
0
Chirag
Top achievements
Rank 1
answered on 02 Jun 2011, 02:41 PM
hi Ivan 

thanks for the reply 

but your example is not meet my requirement  because of in example you are createing a Attribute Name  statically
let me describe 
My WCFService Method execute stored procedure it return a DataSet and Service method return a string  DataSet.GetXml();
in stored procedure table column is selected dynamically  so no any track to find out datatype and Data Column 

i am also post this type of question with my example in this forum
http://www.telerik.com/community/forums/silverlight/gridview/filter-and-grouping-not-working-on-gridview.aspx
  

0
Ivan Ivanov
Telerik team
answered on 08 Jun 2011, 06:33 AM
Hi Chirag,

You may try setting the desired data types on the AutogeneratingColumn event, when you should have already determined them. In this way you would be able to maintain dynamic data and have full support of filtering and sorting.

Greetings,
Ivan Ivanov
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
0
Chirag
Top achievements
Rank 1
answered on 13 Jun 2011, 11:18 AM
hi Ivan

Thanks for the replay,

but i am confuse about how can i set datatype of grid column because of xml provide me a typeless data  then how can i determine the type of data 
suppose xml provide me a 1 column data 
1 columns 1 row's data = 2  so it is string or int? 
1 columns 2 rows data = hello  then it's a string 

if it is possible then please give me a some kind of example 
i am totally confuse about this issue 

0
Ivan Ivanov
Telerik team
answered on 16 Jun 2011, 03:00 PM
Hi Chirag,

Please, refer to this article and this forum thread from Microsoft's support forums. They might prove useful.

Kind regards,
Ivan Ivanov
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
GridView
Asked by
Chirag
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Chirag
Top achievements
Rank 1
Share this question
or