Forms Data Controls :: Paged Sortable Lists And Efficiency?
Jan 13, 2010
I need to make a large Ebay-style list of listings (think of the page that comes up when you search for something in Ebay, with a photo, title, one-line description, price, that's paged, and sortable). My limited experience with DataGrids in the past always resulted in what felt like a sluggish page to me, but I'm not sure if it would have been faster if I had pieced it together with a data reader instead.So I'm wondering before I even get started, what is the fastest / most efficient way to retrieve and manage this data.Is it more efficient at runtime to use a DataGrid, or to write the paging and sorting in more manually and use a DataReader, or another way?Ebay manages to get thousands of listings to display very quickly, but they've obviously got a lot of manpower to squeeze every last bit of performance they can out of the site, and good high-powered servers.
I've already searched to no avail for an answer to this question:is it possible to dynamically alter the page size in a paged gridview based on data in a particular column?In other words,let's say I get data from a table that lists students enrolled in a particular course.If there are 10 students in Course "A," then I want page 1 in my gridview to show 10 records.
If there are 15 students in Course "B," then I want page 2 in my gridview to show those 15 records,and so on.I imagine that this could probably be done with a master-detail kind of set up,but let's say for the sake of argument that I don't want to go that route.
how to make a gridview's header fixed and sortable. All the solutions I've seen do one or the other, but not both. If I put the header in a separate table, I don't know how to make it sort. None of the CSS options I've seen work either.
My gridview isn't anything special, but it is databound via a data accessor in c#.
I have stumbled into a problem in which Im having a hard time solving. I have a linq data setup(based on a mssql) where a Purchase Order contains a number Equipments - each equipment has a price. I have a gridview that shows the summed price of the equipments that are included in a Purchase Order. This sum is currently being calculated on RowDataBound through a "listOfEq.Sum(Eq => Eq.PurchaseOrderPrice);" expression which works without any problems. My problem is that I want to be able to sort the gridview based on this summed value, which I cannot do with a normal sortexpression. My next thought was to create a function in my database to calculate the sum instead and then use this is my data basis for the summed column. I have created a function like this:
[Code]....
I want to create a sortable column based on this data. My thought is something like this:
[Code]....
Displaying the correct information is not a problem, however creating the sorting is. Im not sure what to put in the SortExpression. Anybody got an idea of what to do? Perhaps I am forced to use a computed column for this however I dont know to create this column when its based on another table. If this is the case, any idea about how to do create a computed column thats based on data from another table?
The website I am working on has a section where users can search for content they have digitally subscribed to. way to cross-check both data sets, the first being content that matches the search criteria, the second being the content the user has subscribed to. What's making this is a mess is how the data is structured. Here is an example...
We store all of our content in a "Content" table in our database. A piece of content, a "journal", for example, and all of its child records (volumes, issues, and articles) are all stored as records in the "Content" table, each with a ParentId of its corresponding parent record. So, A journal can have n volumes. Each volume can have n issues. Each issue can have n articles. A user can have a subscription to any of these, which would implicitly give them access to all child records. For example, if a user was subscribed to a journal, they would have access to all of its volumes, issues, and articles. If the user was subscribed to an issue, they would have access to all of its articles, but not the parent volume or journal.
Some users own over 30,000 records, and we have over 100,000 content records in the database. The Content table has relationships with several other tables that are used for the search. This leaves me with an expensive query to find what the user has access to, and another expensive query to search through all of the records to find search criteria matches. Some of our searches take 20-30 seconds and I would like to speed it up to a max of 5sec per search.
I tried running a query to get the ContentIds of everything the user owned when they first visited the search page, and then caching it to eliminate further database hits, but when I passed the list of ints into the query via a linq .Contains statement, I hit the SQL parameter limit of 2100, since apparently .Contains() splits them all out.
I have a number of dropdown lists which are populated from a database. They load depending on what the previous dropdown selection was so for example if the system was car based and I had chosen Ford then the next dropdown list would populate all cars made only by Ford. What I'm wanting to do is add a select all to one of the dropdown lists. Does anyone know how this would be done?
I have 2 drop downlists 1 gets the User hits my sql database and pulls back all my users in the database. I have post back on. The second drop down brings back all the account numbers for the user that is selected in the first drop downlist I have that post back on also.
My gridview then uses those 2 dropdownlists to populate for that user and that account number selected.
Now for the problem.
User Albert is in the drop down when page is loaded because its sorts by name the first account number for albert is in the 2nd drop down and the gridview works on page load for albert and account number 1 i can select account number 2 and the gridview changes.
I then switch user to Bill and it populates the 2nd drop down with Bill's account numbers however my gridview at this point is still showing alberts account information. I have to take drop down 2 and select another account say account 2 then my gridview displays bill's account 2 information i can then switch back to account 1 for bill and see that account information.
What do I need to do so that my gridview will populate when the first dropdown is changed to match the 2 new values?
I'm trying to create a page with multiple fields to be used as parameters for filtering a GridView. I'm using a combination of two asp:dropdown lists and two check boxes. When I select a value in one ddl, I want to clear the value in the other ddl. I was trying to use the event "onTextChanged" but that doesn't seem to fire off on the client side and I cannot seem to find any event for an asp:ddl or asp:checkbox or asp:radio button that fires off on the client side.
Are there events, like onClientClick for asp:button, that fire on the client side for these controls when a selected value is changed or when the user clicks on them? or do I need to use html controls instead?
I'm using VWD with a database back end. I have a list of teams which are marked off by league, level, division, teamid and then using gridview for the list of players per teams.I've got the drop downs working correctly but running into a little snag and that is on the auto postback.When I only have one option come up in a list, i obviously don't change that list and thus it doesn't change the next drop down because there is no post back. is there a way to use a "header" value?
I am using a dataset control and I have 5 dropdown lists in which their content depends on what item is selected in each dropdown list.
I know I can populate the lists with 5 different queries taking the variables from each list but I am thinking there must be a better way.
Is there a way to populate each list with one query that takes the distinct items from each column returned without looping through the entire recordset?
i have Successfully binded the Schedular from Objects and its looking Good and the Following code has done that.i am using the Telerik Grid , but the implementation to the grid is the same as the Gridview. What i need is a guidance on how to bind hierachy grids from ojects or lists
[Code]....
Now with the same results i want to bind a Hierachy Grid as it Shows in my attached image. I am using EAE that means the is no Fixed Column name, so the Binding of the Grid Should be Dynamically.
Since the NEXT button is not working, I thought of Adding the DataSet to a Properties. The and getting it back.So I did something like
public DataSet dsFISIItems[code]....
Even this doesn't work.
In simple terms, > After the 3 input fields are filled out, when a "Search" Button is hit, it should go and pick the list of items based on that criteria
> The result dataset needs to be binded to the ListView
> Next, the DataPager control should be paging. But it is not paging.
When I hit the next, it lists only the first 10 items repeatedly.
I need to develop a custom data-bound control which will contain, few text-boxes, drop-down lists, labels, and other standard web-server controls. And, I want to be able to load this control from a web page on button click. When the user enters any data to any of its child controls, i should be able to save, and also retrieve when the data-bound control is loaded again. Also, the data in the child control should retain their value on postback. What approach should i follow?
There's an issue I'm having in several areas of my ASP.NET site, but am using the following as an example. If I can get it solved, then I'm reasonably sure it has applications elsewhere.Let's say I have a gridview based on the aspnet_membership table. Its LINQ datasource is aspnet_membership, which exists in my datacontext.By itself, it works GREAT in the grid.However, showing UserId in and of itself doesn't have much meaning; I wanted to include UserName.So, in my Public Partial Class, I created a read-only property UserName:
[Code]....
This retrieves and displays the correct data, no problem there.However, I'm not able to sort on that new column. When I attempt to do so, I get the following error: The member 'aspnet_Membership.UserName' has no supported translation to SQL.A workaround is, of course, to use a Sql datasource. But as I'm learning more about LINQ and the partial classes, I want to learn how to do it the correct way.
i am stucked in Checkbox Filteration issue... My problem is If first checkbox list is checked and user clicks on second checkbox list then i want to compare both checkboxes and populate result based on both checkboxes. using System;
using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; using System.Data.SqlClient;
I'm working on a project in which the client has required a lot of things to happen on a single page, and this has resulted in a rather large blob of HTML being rendered out to the client browser.
The main issue is with input tags (where runat="server" attribute is set), these tend to cause a drastic increase in markup size due to validation, updatepanel triggers, viewstate, and the control markup itself. I've done what I can to reduce the amount of triggers I'm using, I'm compressing the viewstate (to something like 8% of the original viewstate size), I've gotten rid of a lot of ASP.NET Validators and rolled my own, and and I've been using ClientIdMode to reduce the length of the ID attributes of many asp.net elements. All of these combined significantly reduces the amount of HTML being sent to the client, (for example going from 2 megabytes for a request down to 500-600 kb - these are HUGE pages, mind you).
In ASP.net when we perform paging over Gridview or DetailsView than the Gridview fetch all rows from the Database each time.
Suppose our Database contains 100 rows and we have configured Paging in Gridview with page size of 10 records per page.But whenever we click on the the pager control of gridview for any particular page no. then GridView should fetch only particular 10 rows from database.
If we click on page no 3 then it should query only rows 21-30 but it fetches all rows and neglect the remaining .which is simply a wastage of resources.