Solved

DataGrid,DataList, Repeater and xml/xsl

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now