Question : asp.net Gridview Sorting

I have a column in my gridview which is a field derived from an object field in the datasource.  Here is the markup.
            <asp:TemplateField HeaderText="Status" SortExpression="State" Visible="False" ItemStyle-HorizontalAlign="Left">
              <EditItemTemplate>
                <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("StatusOfJob.State") %>'></asp:TextBox>
              </EditItemTemplate>
              <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Bind("StatusOfJob.State") %>'></asp:Label>
              </ItemTemplate>
              <ItemStyle HorizontalAlign="Left"></ItemStyle>
            </asp:TemplateField>

This seems to work, but does hot hold when paging through the rows.

Any thoughts?

Here is my pager markup:
        <PagerSettings FirstPageImageUrl="~/images/MiniIcons/action_back.gif" LastPageImageUrl="~/images/MiniIcons/action_forward.gif"
                                NextPageImageUrl="~/images/MiniIcons/arrow_right.gif" PreviousPageImageUrl="~/images/MiniIcons/arrow_left.gif"
                                Mode="NextPreviousFirstLast" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />

and my gridview markup
      <asp:GridView ID="gvJobs" runat="server"
          AutoGenerateColumns="False" DataKeyNames="JId"
          DataSourceID="ldsJobs"
          AllowPaging="True" CellPadding="4"
          ForeColor="#333333" GridLines="None"
          Font-Size="Small" PageSize="12"
          OnRowCommand="gvJobs_RowCommand"
          onrowcreated="gvJobs_RowCreated"
          AllowSorting="True"
          Width="100%"
          EmptyDataText="No Results Found">

Answer : asp.net Gridview Sorting

start menu -> control panel -> add or remove programs -> ensure "show update" is checked at top center of window. locate "Java(TM) Update 20" and select remove.

If you do not have the earlier versions of Java installed you will have to go to their website, and get it.

When a Java tries to update a little orange icon will appear on your toolbar near the clock.  Right click on it, and you should be able to find outupdate options there.

Use this link to get whatever version of Java you need...if necessary: http://java.sun.com/products/archive/

Hope that helps

FDM
Random Solutions  
 
programming4us programming4us