Welcome Guest Search | Active Topics | Sign In | Register

TextboxColumn & CustomColumn client side sorting giving problem Options
Vinny
Posted: Tuesday, July 29, 2008 3:12:52 PM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Hi,

I am using client side sorting and the grid has the following columns:

1. Textbox
2. Custom
3. Date
4. Static
5. Checkbox

I am checking the rows that have been checked and updating the database.

The problem arises when I sort on Textbox & Custom columns. When I sort on Textbox & Custom then in the debug mode I found different value for other cells on the same row. However these values are totally different from the ones in the grid. In the grid it is just showing it right.

Also, if I sort on Date & Static then there is no problem.

I'd appreciate if this can be answered.

Thanks,

Vinny
Quote:
eo_support
Posted: Tuesday, July 29, 2008 3:33:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi,

It makes sense for a CustomColumn's value and text to be different, but we can't think of any case where a TextBoxColumn value and text are different. Can you create a sample page that demonstrates the problem? You may want to use a few rows of fake data so that it runs without your database.

Thanks
Vinny
Posted: Tuesday, July 29, 2008 3:36:01 PM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Thanks for the response.

I'll make the dummy code and send it to you.

Vinny
Vinny
Posted: Wednesday, July 30, 2008 8:39:31 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Hi,

Please find the dummy code. And, I believe the problem is if the column is having EMPTY values

Step:1
Once you get the grid then sort column "Name". You will get top 4 rows empty for "Name" column. I made them empty intentionally. You can change the code.

Step:2
Select the checkbox on row having ID 50

Step:3
Click "Display sort name" button

Result:
You will get a different ID instead of ID 50. But, if you sort ID then you always get correct ID.

ASPX:

<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="TestEO.aspx.vb" Inherits="TestEO" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title></title>
</head>
<body>
<form id="Form3" runat=server>
<asp:Button ID="tstbtn" runat="server" width=200 text="Display sort name" />
<eo:CallbackPanel runat="server" id="CallbackPanel1"
Triggers="{ControlID:tstbtn;Parameter:}" Width="100%"

>
<asp:label id="lblDisplay" runat="server" width=300></asp:label><br />


<eo:Grid runat="server" id="Grid1"
BorderColor="#828790"
BorderWidth="0px"
GridLines=Both
FixedColumnCount="0"
ColumnHeaderDescImage="00050205"
GridLineColor="240, 240, 240"
Width="100%"
ColumnHeaderAscImage="00050204"
ColumnHeaderHeight="40"
Font-Size="10pt" Font-Names="Tahoma"
ColumnHeaderDividerImage="../images/header_divider.gif"
EnableTheming="true"
EnableKeyboardNavigation="True"
FullRowMode="false"
height="400"
ScrollBars=both
GoToBoxVisible="true"
GoToLabelText="Page:"

PageSize=10
AllowPaging="false"
AllowColumnReorder="False"
ItemHeight=22
IsCallbackByMe="False"
RunningMode=client>
<Columns>
<eo:CheckBoxColumn HeaderText="<input type='checkbox' id='column1_checkbox' />" Width="30"></eo:CheckBoxColumn>
<eo:StaticColumn AllowResize="False" AllowSort="True" HeaderText="ID" Width="50" DataField="ID"></eo:StaticColumn>
<eo:TextBoxColumn AllowResize="False" AllowSort="True" HeaderText="Name" Width="170" DataField="Name"></eo:TextBoxColumn>
</Columns>
</eo:Grid>
</eo:CallbackPanel></form></body></html>

VB:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not CallbackPanel1.IsCallbackByMe Then
Filldatagridonload()
End If

End Sub

Private Sub Filldatagridonload()


Dim dt As New DataTable
Dim dr As DataRow
Dim i As Int16

dt.Columns.Add(New DataColumn("ID", GetType(String)))
dt.Columns.Add(New DataColumn("Name", GetType(String)))

For i = 0 To 100
dr = dt.NewRow()

dr(0) = i

If i = 20 Or i = 30 Or i = 40 Or i = 50 Then
dr(1) = Nothing
Else
dr(1) = "A " & i
End If


dt.Rows.Add(dr)
Next

Dim ds As New DataSet
ds.Tables.Add(dt)


Grid1.DataSource = ds
Grid1.DataBind()


End Sub

Private Sub tstbtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tstbtn.Click
Dim EOItem As EO.Web.GridItem

For Each EOItem In Grid1.CheckedItems
lblDisplay.Text = EOItem.Cells(1).Value.ToString
Exit For
Next

End Sub
eo_support
Posted: Wednesday, July 30, 2008 8:41:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi,

Thanks for the code. We will look into it as soon as possible and let you know if we find anything or need anything.

Thanks
Vinny
Posted: Wednesday, July 30, 2008 9:14:08 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Here is my another finding related to the same problem.

I just changed
dr(1) = Nothing
TO
dr(1) = "A"

to see if only empty values are creating the problem or something else also. It seems that same values also gives a different ID.

Vinny
eo_support
Posted: Wednesday, July 30, 2008 10:37:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi,

We have found and fixed the problem. Both "Empty" and "A" are related. Please expect an update build soon.

Thanks
Vinny
Posted: Wednesday, July 30, 2008 10:38:37 AM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Thanks a ton...

Vinny
Vinny
Posted: Wednesday, July 30, 2008 3:13:04 PM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Hi,

Actually, due to some urgency we have to show it to one of our client and just going to make a purchase. We were thinking which version we need to have the above solution.

Also, will the purchased version include all the issues that were resolved in last few days?

It would be appreciated if I can get a version to test so that I can get time to prepare for the rest.

Thanks in advance...

Vinny
eo_support
Posted: Wednesday, July 30, 2008 3:23:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Vinny wrote:
Also, will the purchased version include all the issues that were resolved in last few days?


There isn't a separate "purchased version". When you make a purchase, you get the license key. You would then apply the license key to the DLL that you've been always using. The license key removes the license warning message and that's pretty much it. For certain builds, it also removes the trial period restrictions. But in any case you do not need to download a separate DLL after the purchase.

We have addressed a number of issues today, including the sorting problem and the maksed edit problem you reported in a separate thread. You will have an update build tonight that would include fixes for these issues.

Hope this helps!
eo_support
Posted: Wednesday, July 30, 2008 7:43:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
The sorting issue has been addressed in build 6.0.27.

Thanks!
Vinny
Posted: Wednesday, July 30, 2008 8:08:43 PM
Rank: Advanced Member
Groups: Member

Joined: 7/21/2008
Posts: 90
Thanks for all your support.

Vinny


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.