[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DataGrid,DataList, Repeater and xml/xsl

Posted on 2004-09-28
8
Medium Priority
?
401 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
  • 2
  • 2
5 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 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