?
Solved

DataGrid,DataList, Repeater and xml/xsl

Posted on 2004-09-28
8
Medium Priority
?
395 Views
Last Modified: 2012-08-14
Hi
I have a crucial problem deciding the concept.

Requirement :

I have the following requirements.
I have xpathdocument want to display in table format
sorting columns
paging
any column may have link(Anchor).

performence is the main issue.

i could not decide using datagrid,datalist or datarepeater with custom sorting and paging or xml/xsl.
when we compare server control and xml/xsl which is efficient.

i want to display the data in table format with all boue funtionality and performence is main criteria.

Please help me which is efficient performence technique.Any option is open only thing is data is in xml format.
this site may have more than millon hits.

Thanks
Ravi




0
Comment
Question by:pprasadravi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 Comments
 
LVL 33

Expert Comment

by:raterus
ID: 12171522
If you easily want to enable paging and sorting, then you have to use the DataGrid.  The other two data controls don't support this. This doesn't mean you can't do it though!, you just have to create your own interface that handles this, the PagedDataSource class helps with the paging part too.

Honestly though, if you want the absolute best performance, then I wouldn't use any of them.  I read an article once that showed how much slower these controls are when you compare it to just doing it yourself.  They save you a ton of time programming, but they do have overhead for all the features you don't use in them.

0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12171617
Agreed, the datagrid is the most efficient to code, the others offer more control, but require more overhead.

Regards,

Aeros
0
 

Author Comment

by:pprasadravi
ID: 12172145
Hi Raterus

I agree what you daid.But All options are open ,So please suggest me the best technique to implement  with my requirements.

I have simple class will do the sorting here is the code:
Even i am not sure  wheather it is efficient way of sorting or not.

XPathDocument xpathDoc = new XPathDocument(Server.MapPath("XMLFile3.xml"));
                  XPathNavigator nav = xpathDoc.CreateNavigator();

                  XPathExpression expr;
                  //expr = nav.Compile("UPS/Summary/SummaryInformation[@PickUpRecord=6481802191]/Details/DetailInformation");
                  expr = nav.Compile("Persons/person");
                  string nameee="FirstName";
                  expr.AddSort(nameee, XmlSortOrder.Ascending, XmlCaseOrder.None, "", XmlDataType.Text);
                  XPathNodeIterator iterator = nav.Select(expr);
                  int i=0;
                  while(iterator.MoveNext())
                  {
                  
                        Response.Write(iterator.Current.Value+"<Br>");
                  }

Thanks
Ravi
0
 
LVL 33

Accepted Solution

by:
raterus earned 2000 total points
ID: 12172408
Could you possibly load this xml file into a Dataset, using the DataSet's "ReadXML" method?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataDataSetClassReadXmlTopic.asp

If you can get it into a DataSet, you have much more control over the final appearance.  I would concentrate on using the Datagrid too.  You probably can also bind to the xml iterator you have shown in your example, I've never done this, so I couldn't even tell you how to start, but it probably implements ienumerable, which means you can bind that directly to the datagrid as well.
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12365754
raterus should have the points

Aeros
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question