Rank: Newbie Groups: Member
Joined: 3/13/2008 Posts: 6
|
I have a Grid that is using client side running mode, allowing sorting without postbacks, which is great. I also have a ClientSideOnItemCommand that gets the key item data to retrieve a value then redirect to another page. After I sort the column then click on one of links that calls the ClientSideOnItemCommand but when it gets the item key data, it is retrieving the item key value of the item that was there before the sort. So basically the javascript is accessing the grid in its initial state, and disregarding any sorting. Is there something I need to change in the javascript to make it get the true item index? I've attached my grid and javascript code below. <eo:Grid ID="eoDownloads" runat="server" ColumnHeaderAscImage="~/images/sortascblack1.gif" ColumnHeaderDescImage="~/images/sortdescblack1.gif" ColumnHeaderDividerImage="00050302" FixedColumnCount="1" Font-Bold="False" Font-Italic="False" Font-Names="Verdana" Font-Overline="False" ClientSideOnItemCommand="DownOnItemCommand" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False" GridLineColor="199, 209, 223" GridLines="Both" Height="250px" AllowPaging="True" PageSize="10" ItemHeight="50" Width="850px" KeyField="DownloadID" ScrollBars="None" ColumnHeaderHeight="45" ColumnHeaderDividerOffset="2" PagerSize="4" PageButtonFormat="{0}" NextPageButtonHtml=">" PrevPageButtonHtml="<" > <FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;BACKGROUND-COLOR:#C5D5FC;color:black;" /> <ItemStyles> <eo:GridItemStyleSet> <ItemStyle CssText="background-color: white" /> <CellStyle CssText="padding-left:8px;padding-top:2px; color:#336699;" /> <SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" /> <ItemHoverStyle CssText="background-image: url(00050206); background-repeat: repeat-x" /> <AlternatingItemStyle CssText="background-color:gainsboro;" /> </eo:GridItemStyleSet> </ItemStyles> <Columns> <eo:ButtonColumn DataField="DownloadName" SortOrder="Ascending" DataFormat="<div style='height:48px;overflow-Y:auto'>{0}</div>" AllowSort="true" Width="200" AllowResize="false" ButtonType="LinkButton" HeaderText="<span style='text-decoration:underline'>Title</span>" ></eo:ButtonColumn> <eo:StaticColumn AllowResize="false" DataField="Description" HeaderText="Description" SortOrder="Ascending" Width="380"> </eo:StaticColumn> <eo:StaticColumn AllowSort="True" Width="135" AllowResize="false" DataField="TypeName" HeaderText="<span style='text-decoration:underline'>Type</span>" SortOrder="Ascending"> </eo:StaticColumn> <eo:ButtonColumn AllowResize="false" Width="135" AllowSort="false" DataField="downloadfile" ButtonText="Download"></eo:ButtonColumn> </Columns> <ColumnHeaderStyle CssText="PADDING-LEFT: 8px;PADDING-RIGHT: 10px; FONT-WEIGHT: bold; COLOR: white; PADDING-TOP: 2px; BACKGROUND-COLOR: #f22933" /> <ColumnHeaderTextStyle CssText="DISPLAY: block; FLOAT: right; TEXT-ALIGN: center" /> </eo:Grid>
function DownOnItemCommand(grid, itemIndex, colIndex, commandName) { var item = grid.getItem(itemIndex); var cell; var colDevice = 0; var colData = 3; if(colIndex ==colDevice) window.location = "downloadDetail.aspx?did=" +item.getKey(); if(colIndex == colData) { cell = item.getCell(colData); window.location ="/getfile.aspx?type=press&file=" + cell.getValue(); } }
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
This appears to be a bug. We will get it fixed as soon as possible. Thanks for letting us know!
Regards
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
This issue is fixed in EO.Web 2008. You can download it from our download page.
Thanks!
|