Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > MXDataGrid Sorting Probelms

Thread Tools

MXDataGrid Sorting Probelms

Steve Bishop
Posts: n/a
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"
Assembly="Microsoft.Matrix.Framework, Version=, 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=Rang ers;")
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")

End Sub

<h3><font color="#000040">Bring in AR1 </font>
<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"
<FooterStyle backcolor="Navy"></FooterStyle>
<HeaderStyle forecolor="White"
<wmx:BoundField DataField="CustomerNumber"
HeaderText="Customer No."></wmx:BoundField>
<wmx:BoundField DataField="CustomerName"
HeaderText="Customer Name"></wmx:BoundField>
<wmx:BoundField DataField="PhoneNumber"
<wmx:BoundField DataField="EmailAddress"
<!-- Insert content here -->

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
post & put probelms with restclient Andrew Nisbet Ruby 0 02-24-2009 11:58 PM
Probelms Converting a Cisco 7940 from SCCP to SIP Big Phil UK VOIP 3 05-22-2007 04:28 PM
X-Privat Posting Probelms. ~misfit~ NZ Computing 15 05-05-2007 11:43 PM
E-mail Probelms angela stirland Computer Support 3 02-09-2004 11:31 PM
hiperlink in a mxdatagrid Cristhian Massa Medina ASP .Net 0 01-07-2004 06:05 PM