Welcome Guest Search | Active Topics | Sign In | Register

Update Grid Options
EPC DB
Posted: Friday, November 19, 2010 4:23:23 AM
Rank: Member
Groups: Member

Joined: 3/4/2008
Posts: 24
I have a grid with fullrowmode to false, allowNewItem to true, a delete button in the first column.
If I sort the grid on the client the columns with ID's are well sorted.
I make a change on the checkbox column for example (or any other change).
While the postback to the server I get a wrong row by the methods Grid.ChangedItems (I get not the ids of the row changed on the client)
What can I do wrong?

If I don't sort all is rights.
If allowNewItem is false all is rights
I have change checkbox by custom column with dropdown and I get the same problem


<eo:Grid ID="G_Trainings" runat="server" BorderColor="#828790" BorderWidth="1px"
ColumnHeaderAscImage="00050204" ColumnHeaderDescImage="00050205" ColumnHeaderDividerImage="00050203"
ColumnHeaderHeight="24" Font-Bold="False" Font-Italic="False"
Font-Names="Tahoma" Font-Overline="False" Font-Size="8.75pt" Font-Strikeout="False"
Font-Underline="False" GridLineColor="240, 240, 240" GridLines="Both" Height="659px"
ItemHeight="19" Width="1274px" FullRowMode="False" AllowNewItem="True" >
<FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
<ItemStyles>
<eo:GridItemStyleSet>
<ItemStyle CssText="background-color: white" />
<ItemHoverStyle CssText="background-image: url(00050206); background-repeat: repeat-x" />
<SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" />
<CellStyle CssText="padding-left:8px;padding-top:2px;white-space:nowrap;" />
</eo:GridItemStyleSet>
</ItemStyles>
<ColumnHeaderHoverStyle CssText="background-image:url('00050202');padding-left:8px;padding-top:4px;" />
<Columns>
<eo:DeleteCommandColumn Width="30" DeleteText="&lt;img src=&quot;../Images/trash.png&quot; width=&quot;15&quot; height=&quot;15&quot; title=&quot;Remove the document - No confirmation&quot; border=&quot;0&quot;/&gt;">
</eo:DeleteCommandColumn>
<eo:CustomColumn AllowSort="True" DataField="Title" HeaderText="Title"
Name="trainingTitle" Width="300" ClientSideEndEdit="on_end_edit_title" ClientSideBeginEdit="on_begin_edit_title">
<EditorTemplate>
<select id="titleDropdown" style="width: 300px">
<asp:Repeater runat="server" ID="titleRepeater">
<ItemTemplate>
<option value='<%#DataBinder.Eval(Container.DataItem, "Id_Training")%>'>
<%#DataBinder.Eval(Container.DataItem, "Training_Title")%></option>
</ItemTemplate>
</asp:Repeater>
</select>
</EditorTemplate>
</eo:CustomColumn>
<eo:CustomColumn AllowSort="True" DataField="Subscriber_Name" Name="subscriberName"
HeaderText="Subscriber" Width="250" ClientSideEndEdit="on_end_edit_subscriber" ClientSideBeginEdit="on_begin_edit_subscriber">
<EditorTemplate>
<select id="subscriberDropdown" style="width: 250px">
<asp:Repeater runat="server" ID="subscriberRepeater">
<ItemTemplate>
<option value='<%#DataBinder.Eval(Container.DataItem, "Id_Nom")%>'>
<%#DataBinder.Eval(Container.DataItem, "Full_Name")%></option>
</ItemTemplate>
</asp:Repeater>
</select>
</EditorTemplate>
</eo:CustomColumn>
<eo:CustomColumn DataField="Session_Text" Name="sessionText" HeaderText="Session"
Width="150" ClientSideEndEdit="on_end_edit_session" ClientSideBeginEdit="on_begin_edit_session">
<EditorTemplate>
<select id="sessionDropdown" style="width: 150px">
<option value="1">First</option>
<option value="2">Second</option>
</select>
</EditorTemplate>
</eo:CustomColumn>
<eo:CheckBoxColumn DataField="Confirmation" Name="confirmation" Width="80" HeaderText="Confirmed">
<CellStyle CssText="text-align:center" />
</eo:CheckBoxColumn>
<eo:TextboxColumn DataField="Session_Number" Name="sessionNumber" Width="0">
</eo:TextboxColumn>
<eo:TextboxColumn DataField="Id_Name" Name="idName" Width="30" HeaderText ="idName">
</eo:TextboxColumn>
<eo:TextboxColumn DataField="Id_Training" Name="idTraining" Width="30" HeaderText="idTraining">
</eo:TextboxColumn>
<eo:TextboxColumn DataField="Id_Planning" Name="idPlanning" Width="30" HeaderText = "idPlanning">
</eo:TextboxColumn>
<eo:TextboxColumn DataField="Inscription_Date" Name="inscriptionDate" Width="150" ReadOnly="True"
HeaderText="Inscription">
<CellStyle CssText="background-color:WhiteSmoke;" />
</eo:TextboxColumn>
<eo:TextboxColumn DataField="Session_Date" Name="sessionDate" Width="200" HeaderText="Session Date" ReadOnly="True">
<CellStyle CssText="background-color:WhiteSmoke;" />
</eo:TextboxColumn>
</Columns>
<ColumnHeaderStyle CssText="background-image:url('00050201');padding-left:8px;padding-top:4px;" />
</eo:Grid>
eo_support
Posted: Friday, November 19, 2010 9:54:22 AM
Rank: Administration
Groups: Administration

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

What version do you use? This might be a bug that has been fixed. So you may want to try the latest version first.

Thanks!
EPC DB
Posted: Monday, November 22, 2010 3:24:12 AM
Rank: Member
Groups: Member

Joined: 3/4/2008
Posts: 24
Hi,
The version of the file eo_web.dll is 8.0.21.2.
Is there a newest version and is it compatible with my license?

I can't download the latest version this morning!
EPC DB
Posted: Monday, November 22, 2010 5:57:43 AM
Rank: Member
Groups: Member

Joined: 3/4/2008
Posts: 24
I have upgrade with the version 8.0.40.2
I always have the same problem.
When I sort the grid the new line go to the first line. I make a change in the grid and postback the grid to the server to save the changes. The new line go to the last line and the line changed seen by the server is two lines bellow the line changed before.

If I haven't the new line (allowNewItem=false) all is working properly.
eo_support
Posted: Monday, November 22, 2010 9:11:39 AM
Rank: Administration
Groups: Administration

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

Can you create a test page/project that demonstrates the problem and send it to us? Please make sure the test page runs independently because we will need to see the problem first.

Also, can you let us know what was the problem/error message when you were not able to download the latest version?

Thanks!
EPC DB
Posted: Monday, November 22, 2010 9:50:05 AM
Rank: Member
Groups: Member

Joined: 3/4/2008
Posts: 24
You can try the page
https://test-te-dep-epc-databases.web.cern.ch/test-te-dep-epc-databases/webform1.aspx
login:patrice.bailly@neuf.fr
How can I send you the password in a secure way? This login has no right but I don't want display this information on the forum.

1-Sort the column "Subscriber"
2-Change one checkbox in the column "Confirm", remember you of the values of the 3 columns with id's
3-Click the button Save
4-The server display the first change found (if you have made several changes) with the three id's. But the result is the id's of an other line.

My problem of download was of my side. My Home directory was full, sorry.

The code for the button Save
Protected Sub B_Save_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles B_Save.Click
Dim msg As New Display.Msg()
Dim msg2 As New Display.Msg()
Dim sqls(0) As String
Dim items() As EO.Web.GridItem
Dim item As EO.Web.GridItem
Dim ind As Integer = 0
Dim sessionDate As String

' If Test.isStringEmpty(Me.pageHeader.UserName) Then
' msg.setWarningMessage("You are not allowed to save planning changes.<br>Vous n'êtes pas autorisé à sauver les changements de planning.")
' GoTo exit_B_Save_Click
' End If
'con = Me.getDbConnectionForWrite(msg)
'If msg.isMessage Then
' GoTo exit_B_Save_Click
' End If

items = Me.G_Trainings.DeletedItems
For Each item In items
If Not Test.isStringEmpty(item.Cells("idPlanning").Value) Then
ReDim Preserve sqls(ind)
sqls(ind) = "idPlanning=" & item.Cells("idPlanning").Value & " ; idTraining=" & item.Cells("idTraining").Value & " ; idName=" & item.Cells("idName").Value
ind = ind + 1
End If
Next

items = Me.G_Trainings.ChangedItems
For Each item In items
ReDim Preserve sqls(ind)
If Not Test.isStringEmpty(item.Cells("idPlanning").Value) Then
If isGoodParameters(item, msg) Then
If Database.getBoolean(item.Cells("confirmation").Value) = True Then
sessionDate = "TO_DATE('" & item.Cells("sessionDate").Value & "', 'DD/MM/YYYY HH24:MI')"
Else
sessionDate = "NULL"
End If
sqls(ind) = "idPlanning=" & item.Cells("idPlanning").Value & " ; idTraining=" & item.Cells("idTraining").Value & " ; idName=" & item.Cells("idName").Value
ind = ind + 1
Else
GoTo exit_B_Save_Click
End If
End If
Next

items = Me.G_Trainings.AddedItems
For Each item In items
ReDim Preserve sqls(ind)
If Test.isStringEmpty(item.Cells("idPlanning").Value) Then
If isGoodParameters(item, msg) Then
sqls(ind) = "idPlanning=" & item.Cells("idPlanning").Value & " ; idTraining=" & item.Cells("idTraining").Value & " ; idName=" & item.Cells("idName").Value
ind = ind + 1
Else
GoTo exit_B_Save_Click
End If
End If
Next

msg.setInfoMessage(sqls(0))
GoTo exit_B_Save_Click

Database.executeNonQueries(sqls, con, msg, True)
If msg.isMessage Then
msg.addMessage("Error updating planning.<br>Erreur lors de la mise à jour du planning.")
GoTo exit_B_Save_Click
Else
msg.setInfoMessage("The planning data has been updated succesfully.<br><br>Les données du planning ont été mises à jour correctement.")
End If

updateTrainingData(msg2)
If msg2.isMessage Then
msg.setMessage2(msg2.msg1)
End If


exit_B_Save_Click:
Database.closeConnection(con)
Display.message(Me.pageHeader, msg)

End Sub
eo_support
Posted: Monday, November 22, 2010 2:32:08 PM
Rank: Administration
Groups: Administration

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

We have received your sample page. However we need to be able to run it in our test environment. So please try to isolate the problem into an independent test project first. Remember that we need to run it here, not just see it running on your server. Also please make sure the test page includes code that is only needed to demonstrate the problem.

Thanks!
eo_support
Posted: Tuesday, November 23, 2010 2:53:11 PM
Rank: Administration
Groups: Administration

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

We have received another sample page but we still can not run it. We must be able to load your code and run it as is. Please try to create a separate test project so that it does not reference anything else in your existing project.

Thanks!
eo_support
Posted: Wednesday, November 24, 2010 12:12:23 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that should address this issue. The new empty item should have never been sorted to the top (It should stay at the bottom). This has been fixed in the new build. Please see your private message for the download location.

Thanks!


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.