
Try Dim p As SmartPortalLibrary.SurveyPhoto = SmartPortalLibrary.SurveyPhoto.GetPhoto(photoId) Dim ms As MemoryStream = New MemoryStream(p.PhotoData) Dim image As Bitmap = Bitmap.FromStream(ms) image.RotateFlip(RotateFlipType.Rotate90FlipNone) ms.Close() ms.Dispose() ms = New IO.MemoryStream image.Save(ms, ImageFormat.Jpeg) ms.Seek(0, SeekOrigin.Begin) p.SetImage(ms.ToArray) p = p.Save RadBinaryImage1.DataValue = ms.ToArray ms.Close() Catch ex As Exception 'lblMsg.Text = "Error Rotating Image: " & ex.Message 'lblMsg.CssClass = "lblHeaderRed" End Try<telerik:RadBinaryImage AutoAdjustImageControlSize="true" ResizeMode="Fit" Width="1000px" Height="600px" runat="server" ID="RadBinaryImage1" /> <li class="rtsLI rtsFirst"><a class="rtsLink CustomTab rtsSelected SelectedTab" href="#"> Please help to check it. Thanks
When I change the order of the items/rows in the grid using client side code, I would like to find the new order representation.
I used the MasterTableView.Items collection and I end up with the original order, as when I bind the grid with the data.
What is the correct collection property to iterate through to retrieve the current row order of the rearranged grid?
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
var _selectedRow;
function radgvAddress_RowSelected(sender, args) {
_selectedRow = $get(args.get_id());
}
function moveRowUp() {
if (_selectedRow && _selectedRow.sectionRowIndex > 0) {
swapRows(_selectedRow, _selectedRow.parentNode.rows[_selectedRow.sectionRowIndex - 1])
}
}
function moveRowDown() {
if (_selectedRow && _selectedRow.sectionRowIndex < _selectedRow.parentNode.rows.length - 1) {
swapRows(_selectedRow, _selectedRow.parentNode.rows[_selectedRow.sectionRowIndex + 1])
}
}
function serializeChanges(index1, index2) {
var reorderInput = document.getElementById("ReorderChanges");
if (reorderInput) {
reorderInput.value += index1 + "," + index2 + ";";
}
}
function swapRows(sourceRow, targetRow) {
for (var i = 0; i < sourceRow.cells.length; i++) {
var cellContent1 = targetRow.cells[i].innerHTML;
var cellContent2 = sourceRow.cells[i].innerHTML;
targetRow.cells[i].innerHTML = cellContent2;
sourceRow.cells[i].innerHTML = cellContent1;
}
$find("<%= radgvAddress.MasterTableView.ClientID %>").selectItem(targetRow);
serializeChanges(sourceRow.sectionRowIndex, targetRow.sectionRowIndex);
}
</script>
</telerik:RadScriptBlock>
<telerik:RadNumericTextBox ID="txtQuantityE" autocomplete="off" runat="server" Skin="Hay" EmptyMessage="Enter Quantity" SelectionOnFocus="CaretToEnd" ToolTip="Enter Quantity to place Order" Culture="English (United States)" Height="14px" Width="141px" MaxValue="9999" MinValue="1"> <NumberFormat GroupSeparator="" DecimalDigits="0" AllowRounding="true" KeepNotRoundedValue="false" /> <ClientEvents OnKeyPress="KeyPress" /> </telerik:RadNumericTextBox>function show(txtQuantityE, lblRate, lblAmount, Amount) { var txtQuantityE = $find(txtQuantityE); var lblRate = document.getElementById(lblRate); var lblAmount = document.getElementById(lblAmount); var Amount = document.getElementById(Amount); Amount.value = parseInt(txtQuantityE.get_value()) * parseInt(lblRate.innerHTML); lblAmount.innerHTML = parseInt(txtQuantityE.get_value()) * parseInt(lblRate.innerHTML); } function KeyPress(sender, args) { if (args.get_keyCharacter() == sender.get_numberFormat().DecimalSeparator) { args.set_cancel(true); } if(args.get_keyCode() == 45) { alert("Enter non-negative numbers only"); args.set_cancel(true); } }txtQauntityE.Attributes.Add("onblur", "return show('" + txtQauntityE.ClientID + "','" + lblRate.ClientID + "','" + lblAmount.ClientID + "','" + Amount.ClientID + "')");
<asp:Panel ID="Panel3" Width="112px" BorderWidth="1px" runat="server"> <telerik:RadListView runat="server" ID="RadListView1" DataSourceID="SMapXmlDataSource" > <ItemTemplate> <asp:Panel class="rlvI" ID="Panel1" BorderWidth="2px" BorderColor="Red" style="vertical-align:middle;" Height="35px" Width="52px" runat="server"> <asp:ImageButton ID="SMapImageButton" runat="server" CommandArgument='<%# XPath("@name") %>' ImageUrl='<%# string.Format("~/Common/Img/Cities/{0}/SmallMaps/{1}.jpg", City, XPath("@name").ToString()) %>' CommandName="SmallMaps" Height="32px" BackColor="Blue" OnCommand="CommonSmallMapImageButton_Command" Width="50px" /> </asp:Panel> </ItemTemplate> <LayoutTemplate> <div class="RadListView RadListViewFloated RadListView_<%# Container.Skin %>" > <div class="rlvFloated rlvAutoScroll"> <div id="itemPlaceholder" runat="server"> </div> </div> </div> </LayoutTemplate> </telerik:RadListView> </asp:Panel>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %> <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> </head> <body> <form id="form1" runat="server"> <telerik:RadGrid ID="rgd_MyRequests" runat="server" DataSourceID="sds_MyRequests" GridLines="None" Skin="WebBlue" Width="800px"> <MasterTableView AutoGenerateColumns="False" DataSourceID="sds_MyRequests"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="EnteredDate" DataType="System.DateTime" HeaderText="Entered Date" SortExpression="EnteredDate" UniqueName="EnteredDate" ItemStyle-Width="75px" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-HorizontalAlign="Center"> <ItemStyle HorizontalAlign="Center" Width="75px"></ItemStyle> </telerik:GridBoundColumn> <telerik:GridRatingColumn DataField="Priority" UniqueName="column" ReadOnly="True" HeaderText="Priority"> <ItemStyle Width="70px" Wrap="False" /> </telerik:GridRatingColumn> <telerik:GridBoundColumn DataField="Status" DataType="System.Int32" HeaderText="Status" SortExpression="Status" UniqueName="Status" ItemStyle-Width="25px" ItemStyle-HorizontalAlign="Center"> <ItemStyle HorizontalAlign="Center" Width="25px"></ItemStyle> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CategoryName" HeaderText="Issue Category" SortExpression="CategoryName" UniqueName="CategoryName" DataType="System.Int32" ItemStyle-Width="75px"> <ItemStyle Width="75px"></ItemStyle> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject" UniqueName="Subject"> </telerik:GridBoundColumn> </Columns> <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Wrap="True" /> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="sds_MyRequests" runat="server" ConnectionString="<%$ ConnectionStrings:IT_CentralConnectionString %>" SelectCommand="SELECT [EnteredDate], [Priority], [Status], [CategoryName], [Subject] FROM [vw_ITC_Ticket_Details] WHERE [RequestorUserName] = 'hpotter' AND (CompletedDate IS NULL) ORDER BY [EnteredDate]"> </asp:SqlDataSource> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> </form> </body> </html>