Rank: Newbie Groups: Member
Joined: 6/23/2012 Posts: 6
|
When Make Column Sort in Web Grid Runining Mode on Server, it make unlimited refresh and not stop.
Desgin Code ========== <eo:StaticColumn DataField="RequestNo" HeaderText="Request No" Name="RequestNo" AllowSort="true" meta:resourcekey="RequestNo"> </eo:StaticColumn>
VB.net Code ========= Protected Sub gridMails_ColumnSort(ByVal sender As Object, ByVal e As EO.Web.GridColumnEventArgs) Handles gridMails.ColumnSort hdnSortColumn.Value = e.Column.DataField If e.Column.SortOrder = EO.Web.SortOrder.Ascending Then hdnSortType.Value = "ASC" Else hdnSortType.Value = "DESC" End If
Dim ds As New Data.DataSet() = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(ConnectionString, _ "SearchRequestsInbox")
ClsRequest.GridLoadData(gridMails, ds, gridMails.CurrentPage, gridMails.PageSize, hdnSortColumn.Value, hdnSortType.Value) End Sub
Public Sub GridLoadData(ByRef Grid1 As EO.Web.Grid, ByVal ds As Data.DataSet, Optional ByVal intPI As Integer = -1, Optional ByVal intPC As Integer = 0, Optional ByVal SortColumn As String = "", Optional ByVal SortType As String = "ASC") ds.Tables(0).TableName = "tab2"
If intPI > -1 And intPC > 0 Then Dim intIndex As Integer = (intPI * intPC) Dim intCount As Integer = Math.Min((intPI * intPC) + intPC, ds.Tables(0).Rows.Count)
Dim dataView As New DataView(ds.Tables(0)) If SortColumn <> "" Then dataView.Sort = SortColumn & " " & SortType End If Dim tmpTable As DataTable = dataView.ToTable()
'Dim tmpTable As Data.DataTable = ds.Tables(0).Clone() Dim i As Integer = intIndex
While i < intCount
Dim newR As Data.DataRow = tmpTable.NewRow() For j As Integer = 0 To tmpTable.Columns.Count - 1 newR(j) = ds.Tables(0).Rows(i)(j) Next tmpTable.Rows.Add(newR)
i += 1 End While
Grid1.DataSource = tmpTable Else Grid1.DataSource = ds.Tables(0) End If
Grid1.RecordCount = ds.Tables(0).Rows.Count Grid1.DataBind()
End Sub
Result ==========
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, Your code by itself looks fine. So the problem must be somewhere else. You can try to compare our sample code with your code to see if you can find out what triggered the problem. If that does not reveal anything, you can try to isolate the problem into a test project and send the test project to us. Once we have that we will be happy to take a look. See here for details about sending test project to us: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have looked into the sample code you sent to us and have confirmed this to be a bug. We will fix it and post an update as soon as possible.
Thanks!
|