MXDataGrid Sorting Probelms

Discussion in 'ASP .Net Datagrid Control' started by Steve Bishop, Mar 4, 2004.

  1. Steve Bishop

    Steve Bishop Guest

    My mxDataGrid doesn't sort, even if I set the properties to sort. When I
    drag a SQL table onto my form, it works fine, but I'm working with ODBC
    databases and it's not working. Paging works good, but not sorting. Can
    someone put me in the right direction? Thanks.

    <%@ Page Language="vb" %>
    <%@ Register TagPrefix="wmx"
    Namespace="Microsoft.Matrix.Framework.Web.UI"
    Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral,
    PublicKeyToken=6f763c9966660626" %>
    <%@ import Namespace="System.Data" %>
    <%@ import Namespace="Microsoft.Data.ODBC" %>
    <script runat="server">

    Sub Page_Load(source As Object, E As EventArgs)

    Dim cn as OdbcConnection
    cn = New
    OdbcConnection("dsn=SOTAMAS90AUTO;uid=sys;pwd=Rangers;")
    Dim mystring As String = "Select * FROM AR1_CustomerMaster"

    Dim ObjAdapter As New OdbcDataAdapter(mystring, cn)

    Dim ObjDataSet As New DataSet()

    ObjAdapter.Fill(objDataSet, "dtAR1")

    dgAR1.DataSource = objDataSet.Tables("dtAR1")
    dgAR1.DataBind()

    End Sub

    </script>
    <html>
    <head>
    </head>
    <body>
    <h3><font color="#000040">Bring in AR1 </font>
    </h3>
    <p>
    </p>
    <form runat="server">
    <wmx:MxDataGrid id="dgAR1" runat="server" Width="700px"
    AutoGenerateFields="False" Height="50px" HorizontalAlign="Center"
    ForeColor="Navy" CellPadding="5" ShowFooter="True" BackColor="AliceBlue"
    AllowSorting="True" AllowPaging="True">
    <AlternatingItemStyle forecolor="White"
    backcolor="Navy"></AlternatingItemStyle>
    <FooterStyle backcolor="Navy"></FooterStyle>
    <HeaderStyle forecolor="White"
    backcolor="Navy"></HeaderStyle>
    <Fields>
    <wmx:BoundField DataField="CustomerNumber"
    HeaderText="Customer No."></wmx:BoundField>
    <wmx:BoundField DataField="CustomerName"
    HeaderText="Customer Name"></wmx:BoundField>
    <wmx:BoundField DataField="PhoneNumber"
    HeaderText="Phone"></wmx:BoundField>
    <wmx:BoundField DataField="EmailAddress"
    HeaderText="Email"></wmx:BoundField>
    </Fields>
    </wmx:MxDataGrid>
    <!-- Insert content here -->
    </form>
    </body>
    </html>




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Steve Bishop, Mar 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cristhian Massa Medina

    hiperlink in a mxdatagrid

    Cristhian Massa Medina, Jan 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    335
    Cristhian Massa Medina
    Jan 7, 2004
  2. Blue

    MXdatagrid

    Blue, Jan 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    807
  3. Iham Sheen
    Replies:
    0
    Views:
    445
    Iham Sheen
    Jul 1, 2004
  4. RockNRoll

    NEWBIE - Column Totals in Footer of mxDataGrid

    RockNRoll, Aug 12, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    153
    Alvin Bruney [MVP]
    Aug 13, 2004
  5. Andrew Nisbet

    post & put probelms with restclient

    Andrew Nisbet, Feb 24, 2009, in forum: Ruby
    Replies:
    0
    Views:
    204
    Andrew Nisbet
    Feb 24, 2009
Loading...

Share This Page