I am having trouble passing selected rows from one grid to another. My currently implementation seems to work in Chrome but not IE.
Currently I have 3 databound columns and 4 template columns that are static in my grid and I need to pass information that is entered into those fields to my second grid. I am currently doing this by using ajax.
I loop through the selected rows then get the values from each column and pass the values as a string using ajaxrequest(string). As I said before this seems to work in Chrome but not IE. In IE it only seems to pass in the last row selected to the code behind, So when it binds to the second grid it will only populate information from the last row selected. Javascript doesn't seem to tun the same in both browsers.
Also if there is a better way then using static columns and ajax I would love to hear it .
Here is some code.
Javascript:
function InitiateAjaxRequest(arguments) { var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); ajaxManager.ajaxRequest(arguments); }
function addSelectedRows() { debugger; //SysSet('Action', <%= Actions.LoadOrder%>); var grid = $find("<%= rgPOLines.ClientID %>"); if (grid) { var MasterTable = grid.get_masterTableView(); var Rows = MasterTable.get_dataItems(); var selectedRows = MasterTable.get_selectedItems(); if (selectedRows.length > 0) { for (var i = 0; i < selectedRows.length; i++) { var selectedrow = selectedRows[i]; var getContainer_cnt = selectedrow.get_cell("Container_cnt"), getQty_toreceive = selectedrow.get_cell("Qty_toreceive"), getMfgLotNo = selectedrow.get_cell("MfgLotNo"), getBin_no = selectedrow.get_cell("Bin_no"); //var test = $telerik.$(getQty_toreceive).find('input')[0].value; //var test2 = test.replace(/,/g, ""); // Row text data var Line_no = selectedrow.get_cell("Line_no").innerText, Item_no = selectedrow.get_cell("Item_no").innerText, Qty_remaining = selectedrow.get_cell("Qty_remaining").innerText, Container_cnt = $telerik.$(getContainer_cnt).find('input')[0].value, Qty_toreceive = convertToFloat($telerik.$(getQty_toreceive).find('input')[0].value) / Container_cnt, Total_Qty_toreceive = $telerik.$(getQty_toreceive).find('input')[0].value, MfgLotNo = $telerik.$(getMfgLotNo).find('input')[0].value, Lot_no = "", Bin_no = $telerik.$(getBin_no).find('span')[0].innerText; if (Container_cnt && Total_Qty_toreceive && MfgLotNo && (Bin_no != "Select Bin" || Bin_no)) { var rowData = Line_no + "," + Item_no + "," + Qty_remaining + "," + Container_cnt + "," + Qty_toreceive + "," + Total_Qty_toreceive + "," + MfgLotNo + "," + Lot_no + "," + Bin_no InitiateAjaxRequest(rowData); //SysSubmit(1); } else { alert("Data must be entered in NUMBER OF CONTAINERS, QTY TO RECEIVE, and MFG LOT #.") } // Method1 //var getCellText_1 = row.get_element().cells[0].innerHTML; // Method2 // Method3 //var getCellText_2 = row.get_cell("Name").getElementsByTagName("span")[0].innerHTML; //this code also work for Checkboxcolunm, hyperlinkcolumn...etc } } else { alert("At least one row must be selected.") } } }VB:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs) ' Remove all carriage returns from data Dim argument = e.Argument.Replace(vbCr, "").Replace(vbLf, "") ' Add data to array Dim orderNo = LTrim(RTrim(Ord_no.Value)) Dim location = LTrim(RTrim(lblShip_to_cd.InnerText)) Dim rowData() = argument.Split(",".ToCharArray()) rowData = (orderNo & "," & String.Join(",", rowData) & "," & location).Split(",".ToCharArray) ' Add data to DataTable GetData(rowData) ' Add data to secondary grid BindSecondaryGrid() End SubASPX:
<telerik:RadGrid ID="rgPOLines" runat="server" AllowPaging="false" CellSpacing="0" ShowFooter="false" GridLines="None" AllowMultiRowSelection="true" OnPreRender="rgPOLines_PreRender" OnItemDataBound="rgPOLines_ItemDataBound"> <MasterTableView CommandItemDisplay="TopAndBottom" EditMode="Batch" AutoGenerateColumns="false" RetrieveNullAsDBNull="true" DataKeyNames="Line_no"> <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowSaveChangesButton="false" ShowExportToExcelButton="false" ShowExportToCsvButton="false" /> <Columns> <telerik:GridClientSelectColumn HeaderText="Select For Receipt" UniqueName="Item_selected"></telerik:GridClientSelectColumn> <telerik:GridBoundColumn DataField="Line_no" HeaderText="Line_no" UniqueName="Line_no" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Item_no" HeaderText="Item_no" UniqueName="Item_no" ReadOnly="true"> </telerik:GridBoundColumn> <telerik:GridNumericColumn DataField="Qty_remaining" HeaderText="Qty Remaining" DecimalDigits="0" UniqueName="Qty_remaining" ReadOnly="true"> </telerik:GridNumericColumn> <telerik:GridTemplateColumn HeaderText="Number of Containers" UniqueName="Container_cnt" DataField="Container_cnt"> <ItemTemplate> <telerik:RadNumericTextBox ID="ContainerCnt" runat="server" MinValue="0" MaxValue="999999999"><NumberFormat GroupSeparator="" DecimalDigits="0" /></telerik:RadNumericTextBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Qty to Receive" UniqueName="Qty_toreceive" DataField="Qty_toreceive"> <ItemTemplate> <telerik:RadNumericTextBox ID="Qty_toreceive" runat="server" Type="Number"></telerik:RadNumericTextBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Mfg Lot #" UniqueName="MfgLotNo" DataField="MfgLotNo"> <ItemTemplate> <telerik:RadTextBox ID="MfgLotNo" runat="server" MaxLength="15"></telerik:RadTextBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Bin #" UniqueName="Bin_no"> <ItemTemplate> <telerik:RadDropDownList runat="server" ID="Bin_no" AutoPostBack="false" DataTextField="Bin" DataValueField="Bin"> </telerik:RadDropDownList> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> <ClientSettings AllowKeyboardNavigation="false" AllowColumnsReorder="false" Selecting-AllowRowSelect="true"> </ClientSettings> </telerik:RadGrid> <telerik:RadButton ID="btnAddSelectedRows" runat="server" Text="Add Selected Rows To Receipt" OnClientClicked="addSelectedRows" ToolTip="Add Selected Rows" AutoPostBack="false"> </telerik:RadButton><telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" Skin="Silk" /> <telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgPOLines" /> <telerik:AjaxUpdatedControl ControlID="rgMfgLot" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rgMfgLot"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgMfgLot" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecorationZoneID="demo" DecoratedControls="All" EnableRoundedCorners="false" />
I have a RadGrid, on which I enabled the Edit mode. When I hit the edit icon a column from the grid can be edited (see the attached Grid2.png). At this point I want to edit the text and confirm with ENTER. On hitting ENTER I want to prevent the form submission and fire the grid update command. Unfortunately the submission prevention doesn't work, the grid update command is fired. Here is what I tried:
function OnGridKeyPressed(sender, eventArgs) {
if (eventArgs.get_keyCode() === 13) {
Cancel​Submission(eventArgs);
var mtv = $find(sender.ClientID).get_masterTableView();
var items = mtv.get_editItems();
if (items.length == 1) {
var idx = items[0].get_itemIndexHierarchical();
mtv.fireCommand('Update', idx);
}
}
}
function CancelSubmission(args) {
args.set_cancel(true);
return false;
}
Also this in Cancel​Submission:
function Cancel​Submission() {
var e = window.event;
e.cancelBubble = true;
e.returnValue = false;
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
Any help will be appreciated!
Thanks in advance
Vasil


Hello,
In our web application, we have RadEditor with Image manager and in our case we do not want to show the preview and properties in the image manager window.
We tried with the CSS but it does not work. So, can you please suggest the proper way to hide only the preview and properties in the image manager window of RadEditor.
PFA.
Thanks,
Vivek.

This is my RadGrid which i have bind from json on client side javascript but i want to access this grid values on server side in my code behind file. <telerik:RadGrid ID="radGridView2" runat="server" AllowSorting="True"<br> OnNeedDataSource="radGridView2_NeedDataSource"<br> Width="800px" GroupPanelPosition="Top" <br> ResolvedRenderMode="Classic" <br> Height="35em" Enabled="False"><br> <ClientSettings><br> <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling><br> <Selecting AllowRowSelect="True" /><br> <ClientEvents OnRowSelected="RowSelected" /><br> </ClientSettings><br> <br> <SelectedItemStyle BorderStyle="Dashed"<br> BorderWidth="1px"/><br> <MasterTableView AutoGenerateColumns="False"><br> <Columns><br> <telerik:GridBoundColumn DataField="SNO" UniqueName="SNO" HeaderText="SN#"><br> <HeaderStyle Width="10px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="INITIAL" UniqueName="INITIAL" HeaderText="TYPE"><br> <HeaderStyle Width="10px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="TITLE" UniqueName="TITLE" HeaderText="ACCOUNT TITLE"><br> <HeaderStyle Width="80px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="DISC" UniqueName="DISC" HeaderText="DESCRIPTION" Resizable="False"><br> <HeaderStyle Width="160px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="JOB" UniqueName="JOB" HeaderText="COST CENTER"><br> <HeaderStyle Width="55px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="dRR" UniqueName="dRR" HeaderText="DEBIT" DataFormatString="{0:N}"><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="cRR" UniqueName="cRR" HeaderText="CREDIT" DataFormatString="{0:N}"><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="acno" UniqueName="acno" HeaderText="acno" Visible="false" ><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="job_id" UniqueName="job_id" HeaderText="job_id" Visible="false" ><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="U_INSERT" UniqueName="U_INSERT" HeaderText="U_INSERT" Visible="false" ><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> <telerik:GridBoundColumn DataField="I_DATE" UniqueName="I_DATE" HeaderText="I_DATE" Visible="false" ><br> <HeaderStyle Width="35px"/><br> </telerik:GridBoundColumn><br> </Columns><br> </MasterTableView><br> <ClientSettings><br> <ClientEvents OnCommand="function(){}" /><br> </ClientSettings><br> <ItemStyle BorderStyle="Ridge" /><br> </telerik:RadGrid> <br>
This is how i am accessing my RadGrid
<p style=" background-color: #fff;"><font color="#000000" face="monospace"> foreach (GridDataItem item in radGridView2.Items)<br> {<br> string idd1 = item["acno"].Text.Trim();<br> string type = item["INITIAL"].Text.Trim();<br> string jbid = item["job_id"].Text.Trim();<br> string disc = item["DISC"].Text.Trim();<br> string dRR1 = item["dRR"].Text.Trim().Replace(",", "");<br> string cRR1 = item["cRR"].Text.Trim().Replace(",", "");<br> string un1 = item["U_INSERT"].Text.Trim();</font></p><p style=" background-color: #fff;"><font color="#000000" face="monospace">}​</font></p>}
But the columns are coming " " What i am doing wrong here ?
http://docs.telerik.com/devtools/aspnet-ajax/controls/pagelayout/how-to/how-to-make-sticky-footer-and-header
In regards to the above link. I want to have to content in the article sections take up 100% of the remaining space. I was able to do this with a radgrid by using javascript to resize the grid which works fine, but i want to do the same thing with a splitter and that is not working. Any help would be great.
What am I doing wrong? 1. I want user to hover over label 2. tool tip comes up 3. They pick 2 dates and click OK button 4. Label shows the 2 new dates What's happening is 1. Can't get button to close the tooltip (I COULD do it in Javascript,
but then how do I also get it to execute the javascript to update the dates?
(server side code getting client-sided by the script manager) 2. The update works once ... but then the tool tip will NEVER show again ...
once I've changed the text of the label - I promise you, it will not show again. 3. Just to test that I wasn't doing something wrong ...
I wrapped the label in a div (with runat="server" and an ID,) and made thatthe target control for the
tooltip - then it worked over and over again, but if the label itself is the target,
it will only work once. I'm a telerik newbie ... so liklely doing something wrong. aspx.vb code is followed by aspx code:
THANKS IN AVANCE!!! Protected Sub Button1_Click1(sender As Object, e As EventArgs) Handles Button1.Click Dim f = from.SelectedDate.ToString("MM/dd/yyyy") Dim t = too.SelectedDate.ToString("MM/dd/yyyy") lblDates.Text = f & " " & t End Sub <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"> </asp:ScriptReference> </Scripts> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="AjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Button1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="lblDates" UpdatePanelCssClass="" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Label ID="lblDates" runat="server" Text="pre text"></asp:Label> <telerik:RadToolTip runat="server" ID="hello" TargetControlID="lbldates" RenderInPageRoot="True" HideEvent="FromCode" HideDelay="0" AnimationDuration="0" AutoCloseDelay="0" ShowDelay="0" RelativeTo="Mouse" Sticky="True" > from: <telerik:RadCalendar ID="from" runat="server" EnableMultiSelect="False"> </telerik:RadCalendar> to: <telerik:RadCalendar ID="too" runat="server" EnableMultiSelect="False"> </telerik:RadCalendar> <asp:Button ID="Button1" runat="server" Text="Button" /> </telerik:RadToolTip> </asp:Content>Hi,
We have a custom drop down box in the AdvancedInsert dialog that lists the services someone can select from. It works in Chrome, Firefox and IE 11 on Windows 8. But it does not show up in Internet Explorer 10 or 11 on Windows 7. Only the first line of text from the combo box shows up and no down arrow that indicates that it is a combo box.
RadComboBox appointmentType = new RadComboBox();
appointmentType.Items.Add(new RadComboBoxItem("1. Existing Client: (15 min)"));
appointmentType.Items[1].Value = "15";
appointmentType.Items.Add(new RadComboBoxItem("3. New Client: (60 min)"));
appointmentType.Items[3].Value = "60";
subject.Parent.Controls.Add(appointmentType);
appointmentType.Label = "Service ";
appointmentType.Width = Unit.Percentage(90);
appointmentType.Style.Add("position", "absolute");
appointmentType.Style.Add("top", "40px");
appointmentType.Style.Add("left", "30px");
//appointmentType.Style.Add("z-index", "0");​
Could you please help us resolve this?
thanks