Hi,
I have a problem with the radsplitter on the same page as the grid. Below is a sample page. This works. If I take the script and put it in a js file, the page looses the 100% height and width. If I take out the line "<ClientEvents OnRowSelected="RowSelected" />" it works. So the only way I have been able to get the 100% working is to put the scripting in the page, I can't put it in a js file and link the script file . The 100% is needed to have the radsplitter fill the whole page. Note how I set teh style for HTML, Body and Form to try and force the 100%, but that is ignored when the OnRowSelected is put in.
Please help, this is driving me crazy. I need to put a ton of scripting on the OnRowSelected event, so I would prefer it to be in a separate file.
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%; margin: 0px; padding: 0px; width: 100%">
<head runat="server">
<title></title>
<script>
function RowSelected(sender, eventArgs) {
alert("The active row is: " + eventArgs.get_gridDataItem());
}
</script>
</head>
<body style="height: 100%; margin: 0px; padding: 0px; width: 100%">
<form id="form1" runat="server" style="height: 100%; margin: 0px; padding: 0px; width: 100%">
<telerik:RadScriptManager ID="scriptManager1" runat="server" EnableTheming="True">
<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:RadSplitter ID="splitterMain" runat="server" Height="100%" Width="100%" Orientation="Horizontal">
<telerik:RadPane ID="paneTop" runat="server">
<table>
<tr>
<td style="vertical-align: top;">
<telerik:RadGrid ID="gridDocuments" AllowSorting="True" AllowPaging="True" PageSize="20" runat="server" GridLines="None"
AllowMultiRowSelection="true">
<ClientSettings>
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowSelected="RowSelected" />
</ClientSettings>
<PagerStyle Mode="NumericPages" Position="Bottom"></PagerStyle>
<MasterTableView DataKeyNames="DocumentID" ClientDataKeyNames="DocumentID" HierarchyLoadMode="Client">
<Columns>
<telerik:GridBoundColumn DataField="DocumentID" Visible="false" ItemStyle-Width="0px"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>
</telerik:RadPane>
<telerik:RadSplitBar ID="panebar" runat="server" CollapseMode="Forward">
</telerik:RadSplitBar>
<telerik:RadPane ID="paneBottom" runat="server">
<div id="divLayout">
<asp:Panel ID="panelContent" runat="server" Style="position: relative">
</asp:Panel>
</div>
</telerik:RadPane>
</telerik:RadSplitter>
</form>
</body>
</html>
Hi,
I have programmatically binding the RadSpreadsheet control with the values from my SQL Table. When the user modifies the cells value in RadSpreadsheet, i want only those modified cell values to be updated in my table.
I browsed the forum and I found CustomDatabaseProvider can be used or this operation. However, the example that I had was truncating the entire data from table instead of updating only the modified row.
public override void SaveWorkbook(Workbook workbook) { using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SpreadsheetSampleConnectionString"].ConnectionString)) { conn.Open(); string query = "DELETE FROM [Products]"; SqlCommand clearCmd = new SqlCommand(query, conn); clearCmd.ExecuteNonQuery(); string insertQuery = "INSERT INTO Products(ProductName,Description) VALUES(@param1,@param2)"; foreach (var row in workbook.Sheets[0].Rows) { SqlCommand insertCmd = new SqlCommand(insertQuery, conn); insertCmd.Parameters.Add("@param1", SqlDbType.NVarChar, 50).Value = row.Cells[0].Value; insertCmd.Parameters.Add("@param2", SqlDbType.NVarChar, 50).Value = row.Cells[1].Value; insertCmd.CommandType = CommandType.Text; insertCmd.ExecuteNonQuery(); } } }
Can anyone let me know how to do this?
Hi
Are drag and drop capabilities in HTML5 or Angular JS compatible with using Telerik .NET AJAX controls in our project?
A user has the power to select their language and on save, updates every control on the screen.
I am not seeing the text within a RadTabStrip is being updated.
My code is simialr to below:
I locate the tab in question, and assign the text within Page_Load.
Dim myTab As RadTab = WindowTabs.Tabs.FindTabByValue("SomeTab")
myTab.Text = GetLabelBasedOnSelectedLanguage(myTab) ' this returns the proper value
I can see myTab.Text now holding the proper value BUT on the screen there is no change.
Is there a way to update the text on the fly via server side?
thank you

Is there a way to access ItemsPerRequest parameter value on the client side?
Hi Team,
I have RadGrid filter with timepicker. How to get value in timepicker with javascript.
My code
<asp:GridTemplateColumn UniqueName="ArrivalTime" DataField="ArrivalTime"
HeaderText="Visit Date" HeaderStyle-Width="20%">
<FilterTemplate>
<asp:RadTimePicker RenderMode="Lightweight"
ID="rdpArrivalTime" runat="server" Width="99%"
ClientEvents-OnDateSelected="ArrivalTimeDateSelected"
DbSelectedDate="<%# SetArrivalTime(Container) %>" />
<asp:RadScriptBlock ID="rsbArrivalTime" runat="server">
<script type="text/javascript">
function ArrivalTimeDateSelected(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var date = FormatSelectedDate(sender);
tableView.filter("ArrivalTime", date, "EqualTo");
}
function FormatSelectedDate(picker) {
var date = picker.get_selectedDate();
var dateInput = picker.get_dateInput();
date.setHours(date.getHours() + 1);
date.setMinutes(date.getMinutes());
var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
return formattedDate;
}
</script>
</asp:RadScriptBlock>
</FilterTemplate>
<ItemTemplate>
<%# !Eval("ArrivalTime").Equals(DateTime.MinValue) ? string.Format("{0:hh:mm tt}",Eval("ArrivalTime")) : "" %>
</ItemTemplate>
</asp:GridTemplateColumn>
<telerik:RadComboBox ID="ddlLocation" runat="server" DropDownHeight="100px" CheckedItemsTexts="DisplayAllInInput" EnableCheckAllItemsCheckBox="true"
Localization-CheckAllString="All" Localization-AllItemsCheckedString="All" onitemchecked="OnItemChecked" OnCheckAllCheck="ddlLocation_CheckAllCheck" CheckBoxes="true" EmptyMessage="--Select--" Height="200px" AutoPostBack="true"/>
I have a RadComboBox with the checkboxes active. I want to have a postback for the ItemChecked event.
The combobox also is generating a postback on closing of the dropdown which I do not want. How can I prevent this to happen.