Solved

DataGrid,DataList, Repeater and xml/xsl

Posted on 2004-09-28
8
392 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 500 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

728 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