Solved

DataGrid,DataList, Repeater and xml/xsl

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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