I am now using the latest build. Here is a link you can go to which demonstrates the issue. (I am bypassing the update and just displaying what would be updated). It must be a stupid mistake in my process so it may be a simple answer for you. I am sorting and updating on the client, an I causing a sort to occur on the server side prior to my update routine when I post back?
http://test.sportsincollege.com/TTAthletes.aspx?tid=NASACL1. I click on the "Grad" setting twice to sort by grad year descending. (My first three athletes in 2025 are Sara, Graysen, Eliana)
2. I clicked in the grad year column to bring up the text box for Sara, Graysen, Eliana and Autumn.
3. I click the "Save Updates" button
4. My message displays Sara, Autumn, Caroline, Grayson. (The grid has resorted and they are now the first four athletes in 2025. I don' t know why it resorted, I assume that is what is causing the issue.)
My Grid is defined as:
<eo:Grid runat="server" id="eoGrid" BorderColor="#000000" BorderWidth="0px" GridLines="Horizontal" GoToBoxVisible="True"
AllowPaging="true" PageSize="100" KeyField="athid" ScrollBars="None"
ColumnHeaderDescImage="00050205" GridLineColor="#999999" Width="975px" allownewitem="false"
IsCallbackByMe="False" ColumnHeaderAscImage="00050204" ColumnHeaderHeight="24" AllowColumnReorder="true"
ItemHeight="20" Font-Size="8pt" Font-Names="Arial" FullRowMode="False" ForceSSL="False">
<ItemStyles>
<eo:GridItemStyleSet>
<SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x; background-position:bottom;"></SelectedStyle>
<CellStyle CssText="padding-top:2px;padding-bottom:2px;"></CellStyle>
<ItemStyle CssClass="eorow" />
<AlternatingItemStyle CssClass="eoaltrow" />
<ItemHoverStyle CssText="background-image: url(00050207);background-repeat: repeat-x; background-position:bottom;" CssClass="eorow" />
</eo:GridItemStyleSet>
</ItemStyles>
<ContentPaneStyle CssText="border:0;"></ContentPaneStyle>
<Columns>
<eo:TextBoxColumn HeaderText="No." DataField="num" AllowSort="True" Width="25"/>
<eo:textboxColumn HeaderText="First" DataField="first" AllowSort="True" Width="100" />
<eo:TextBoxColumn HeaderText="Last" DataField="last" AllowSort="True" Width="100" />
<eo:TextBoxColumn HeaderText="Email" DataField="email" AllowSort="True" Width="250" />
<eo:TextBoxColumn HeaderText="Phone" DataField="phone" AllowSort="True" Width="100" />
<eo:DateTimeColumn HeaderText="Birthdate" DataField="birthdate" AllowSort="True" Width="100" />
<eo:TextBoxColumn HeaderText="Grad" DataField="graduation" AllowSort="True" Width="50" />
<eo:TextBoxColumn HeaderText="Position" DataField="position" AllowSort="True" Width="100" />
<eo:TextBoxColumn HeaderText="T-Shirt" DataField="tshirt" visible="false" />
<eo:TextBoxColumn HeaderText="School" DataField="highschool" AllowSort="True" Width="150" />
<eo:TextBoxColumn HeaderText="" DataField="pending" visible="false" />
<eo:TextBoxColumn HeaderText="" DataField="certified" visible="false" />
<eo:TextBoxColumn HeaderText="" DataField="athid" visible="false" />
</Columns>
My "Save" button is:
<asp:Button runat="server" ForeColor="Black" ID="BtnUpdate" Font-Size="9pt" Text="Save Updates" OnClick="btnSaveAthletes_Clicked" CssClass="css3button"></asp:Button>
My server code is:
Sub btnSaveAthletes_Clicked(ByVal sender As Object, ByVal e As EventArgs)
updateRosterChanges()
If lblErrorMessage.Text > "" Then
lblErrorMessage.Text += "<br />Correct the above error(s) to complete your update."
Else
Response.Redirect("TTAthletes.aspx?" & Request.QueryString.ToString())
End If
End Sub
Sub updateRosterChanges()
lblErrorMessage.Text = ""
Dim changes As Boolean
Dim itm As EO.Web.GridItem, cel As EO.Web.GridCell
Try
'modified
For Each itm In eoGrid.ChangedItems
changes = False
For Each cel In itm.Cells
If cel.Modified Then
If Not cel.Value Is Nothing Then
If Not changes Then
If athlete.SelectAthlete(itm.Key) = 0 Then
lblErrorMessage.Text += itm.Key & " read failed<br />"
End If
End If
Select Case cel.Column.DataField
Case "num"
If ValidNumber(cel.Value) Then
athlete.number = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "first"
If Len(Trim(cel.Value)) < 26 Then
athlete.firstname = Trim(cel.Value)
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "last"
If Len(Trim(cel.Value)) < 36 Then
athlete.lastname = Trim(cel.Value)
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "email"
If ValidEmail(cel.Value) Then
athlete.email = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "phone"
If ValidPhone(cel.Value) Then
athlete.phone = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "birthdate"
If IsDate(cel.Value) Then
athlete.birthdate = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "graduation"
If Val(cel.Value) > 2010 And Val(cel.Value) < 2030 Then
athlete.graduation = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "position"
If Len(Trim(cel.Value)) < 21 Then
athlete.position = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "tshirt"
If Len(Trim(cel.Value)) < 21 Then
athlete.custom4 = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
Case "highschool"
If Len(Trim(cel.Value)) < 26 Then
athlete.highSchool = cel.Value
Else
lblErrorMessage.Text += athlete.name & " " & cel.Column.DataField & " edit invalid: " & cel.Value & "<br />"
End If
End Select
changes = True
End If
End If
Next
If changes Then
'If athlete.UpdateAthlete(lblStaff.Text) < 1 Then
'lblErrorMessage.Text += athlete.athid & " update failed<br />"
'End If
lblErrorMessage.Text += "Updated " & athlete.name & "<br />"
End If
Next
Catch ex As Exception
lblErrorMessage.Text += athlete.name & " " & ex.Message & "<br />"
End Try
End Sub