Solved

gridview

Posted on 2006-06-13
1
325 Views
Last Modified: 2010-04-16
Hello experts,

I am trying to use the gridview control, I'm not completely versed on how it works or behaves,

But I have the following;
<asp:GridView ID="searchresults" Runat="server" DataSourceID="ObjectDataSource3" AutoGenerateColumns="False"
        AllowPaging="True" AllowSorting="True" DataKeyNames="VEHICLEID">
        <Columns>
          <asp:CommandField ShowEditButton="False" />
          <asp:BoundField HeaderText="Make" DataField="make" SortExpression="make" ReadOnly="true" />
          <asp:BoundField HeaderText="Model" DataField="model" SortExpression="model" />
          <asp:BoundField HeaderText="Mileage" DataField="MILEAGE" SortExpression="MILEAGE" />
              <asp:BoundField HeaderText="Engine Size" DataField="ENGINESIZE" SortExpression="ENGINESIZE" />
              <asp:BoundField HeaderText="Fuel" DataField="TRANSMISSION" SortExpression="TRANSMISSION" />
        </Columns>
      </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource3" Runat="server" TypeName="AuctionsDB"
        SelectMethod="GetVehiclesBySearchCriteria" OldValuesParameterFormatString="{0}">
      </asp:ObjectDataSource>

it displays the data, but it does not do any sorting or paging. Also users need to be able to click to go to a details page, how do I acheive this.

0
Comment
Question by:claracruz
1 Comment
 
LVL 10

Accepted Solution

by:
SystemExpert earned 500 total points
ID: 16893368
Hi ,
This is link you will find the code for sorting and  paging
plz find it

http://www.developerfusion.co.uk/show/4686/

http://www.dotnetjohn.com/articles.aspx?articleid=108

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
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…

948 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

18 Experts available now in Live!

Get 1:1 Help Now