Select
Case e.OldSortOrder
Case GridSortOrder.None, GridSortOrder.Descending
BindResults(pindex,
e.CommandArgument & " asc")
Exit Select
Case GridSortOrder.Ascending
BindResults(pindex,
e.CommandArgument & " desc")
Exit Select
we have a one column grid of GridButtonColumn and when the user arrows to a row we need the user to "click" the button with a keyboard. A "return" and a spacebar does not work?
<telerik:RadGrid ID="RadGrid2" runat="server" HorizontalAlign="Center"
DataSourceID="SqlDataSource2" OnItemCommand="RadGrid2_ItemCommand"
PageSize="30" Width="99%" CellSpacing="0" Skin="Bootstrap" AllowAutomaticUpdates="false" AllowAutomaticInserts="false"
EnableAriaSupport="true">
<ClientSettings EnableRowHoverStyle="True" AllowKeyboardNavigation="true" KeyboardNavigationSettings-FocusKey="Z" KeyboardNavigationSettings-AllowSubmitOnEnter="true">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView CommandItemDisplay="None" Width="100%" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="ProgramName" CommandName="SelectProgram" HeaderText="Program Name (Click to Select)" ></telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="ProgramCode" FilterControlAltText="Filter ProgramCode column" HeaderText="ProgramCode" SortExpression="ProgramCode" UniqueName="ProgramCode" Display="false">
</telerik:GridBoundColumn>
</Columns>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</MasterTableView>
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderContextMenu></HeaderContextMenu>
</telerik:RadGrid>
I have a Radspreadsheet with 13 columns. I need to create a datatable with the grid content and send it to a stored procedure. When I paste 8000+ rows in the grid everything works fine on local host, but it doesn't seem to be able to create the datatable when I deploy on the server. Could it be that the data size is too big to be sent to the server? Is there anyway to overcome this problem?
I have two javascript methods: one to automatically save the grid content after pasting data in the grid, and one to format grid content as text.
Here are the two JS methods:
function OnClientChange(sender, eventArgs) {
//call save automatically when posting any data in the grid
var sheet = $find('<%=RadSpreadsheet1.ClientID%>');
sheet.save();
}
function onclientpaste(sender, args) {
//format data as text
var clipboardData = args.get_clipboardContent().data;
for (var i = 0; i < clipboardData.length; i++) {
for (var j = 0; j < clipboardData[i].length; j++) {
var cellData = clipboardData[i][j];
cellData.format = "@"
}
}
}
Here is the Radspreadsheet code:
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1" OnClientChange="OnClientChange" onclientpaste="onclientpaste">
I would like to pass the status of the RadToggleButton to a SQL Datasource on the page to trigger whether it should values or not. Running into an error
Could not find control '_btnHideShow' in ControlParameter 'DisplayCompleted'.
DisplayCompleted is the SQL Parameter that will be passed in. I want to pass in either the 0 or 1 from the RadButtonToggleState.
<
MasterTableView
AutoGenerateColumns
=
"false"
TableLayout
=
"Fixed"
HierarchyDefaultExpanded
=
"true"
AlternatingItemStyle-BackColor
=
"LightBlue"
CommandItemDisplay
=
"Top"
>
<
CommandItemTemplate
>
<
telerik:RadButton
RenderMode
=
"Lightweight"
ID
=
"_btnHideShow"
runat
=
"server"
ButtonType
=
"StandardButton"
ToggleType
=
"CustomToggle"
AutoPostBack
=
"false"
Skin
=
"Metro"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
SecondaryIconCssClass
=
"rbOk"
Text
=
"Show Closed Applications"
Value
=
"1"
></
telerik:RadButtonToggleState
>
<
telerik:RadButtonToggleState
SecondaryIconCssClass
=
"rbCancel"
Text
=
"Hide Closed Applictaions"
Value
=
"0"
></
telerik:RadButtonToggleState
>
</
ToggleStates
>
</
telerik:RadButton
>
</
CommandItemTemplate
>
.....
<
asp:SqlDataSource
ID
=
"GetApplications"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:PHConn %>"
SelectCommand="Application.sp_seManageApplications" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="true">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"_btnHideShow"
PropertyName
=
"Value"
Name
=
"DisplayCompleted"
Type
=
"Int32"
DefaultValue
=
"0"
ConvertEmptyStringToNull
=
"true"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
Hi,
I have a RadMenu, and I need to show the AjaxLoadingPanel only on some items.
Deal with this approach without luck.
https://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxloadingpanel/how-to/show-and-hide-ajaxloadingpanel-explicitly
any suggestions?
I have a RadListView similar to
<
telerik:RadListView
ID
=
"RadListView1"
runat
=
"server"
>
<
ItemTemplate
>
<
asp:HiddenField
ID
=
"HiddenField1"
runat
=
"server"
Value='<%#Eval("HiddenValue") %>' />
<
telerik:RadNumericTextBox
ID
=
"RadTextBox1"
runat
=
"server"
ClientEvents-OnValueChanged
=
"onValueChanged"
DbValue='<%#Eval("Hours") %>' />
</
ItemTemplate
>
</
telerik:RadListView
>
This data is bound server-side from another control. There may be hundreds of lines with unique values. When the text is changed in the RadNumericTextBox I wish to manipulate the data using the value in HiddenField1 in the onValueChanged function.
For example, when typing "5" into the RadTextBox1, onValueChanged will fire, and I would like to discover the value of HiddenField1 in this function. I cannot seem to pin down how to access data in the specific row that I am accessing.
<
telerik:RadNotification
ID
=
"RadNotification1"
runat
=
"server"
Position
=
"Center"
Width
=
"240"
Height
=
"100"
OnCallbackUpdate
=
"OnCallbackUpdate"
LoadContentOn
=
"PageLoad"
AutoCloseDelay
=
"60000"
Title
=
"Continue Your Session"
TitleIcon
=
""
Skin
=
"Office2007"
EnableRoundedCorners
=
"true"
ShowCloseButton
=
"false"
KeepOnMouseOver
=
"false"
>
<
ContentTemplate
>
<
div
class
=
"infoIcon"
>
<
img
src
=
"images/infoIcon.jpg"
alt
=
"info icon"
/>
</
div
>
<
div
class
=
"notificationContent"
>
Time remaining: <
span
id
=
"timeLbl"
>60</
span
>
<
telerik:RadButton
Skin
=
"Office2007"
ID
=
"continueSession"
runat
=
"server"
Text
=
"Continue Your Session"
Style
=
"margin-top: 10px;"
AutoPostBack
=
"false"
OnClientClicked
=
"ContinueSession"
>
</
telerik:RadButton
>
</
div
>
</
ContentTemplate
>
</
telerik:RadNotification
>
if
(!IsPostBack)
{
//set the expire timeout for the session
Session.Timeout = 2;
//configure the notification to automatically show 1 min before session expiration
RadNotification1.ShowInterval = (Session.Timeout - 1) * 60000;
//set the redirect url as a value for an easier and faster extraction in on the client
RadNotification1.Value = Page.ResolveClientUrl(
"default.aspx"
);
}
function
UpdateTimeLabel(toReset) {
var
sessionExpired = (seconds == 0);
if
(sessionExpired) {
//stopTimer("timeLeftCounter");
//redirect to session expired page - simply take the url which RadNotification sent from the server to the client as value
window.location.href = $find(
"<%= RadNotification1.ClientID %>"
).get_value();
}
else
{
var
timeLbl = $get(
"timeLbl"
);
timeLbl.innerHTML = seconds--;
}
}
function
ContinueSession() {
var
notification = $find(
"<%= RadNotification1.ClientID %>"
);
//we need to contact the server to restart the Session - the fastest way is via callback
//calling update() automatically performs the callback, no need for any additional code or control
notification.update();
notification.hide();
//resets the showInterval for the scenario where the Notification is not disposed (e.g. an AJAX request is made)
//You need to inject a call to the ContinueSession() function from the code behind in such a request
var
showIntervalStorage = notification.get_showInterval();
//store the original value
notification.set_showInterval(0);
//change the timer to avoid untimely showing, 0 disables automatic showing
notification.set_showInterval(showIntervalStorage);
//sets back the original interval which will start counting from its full value again
//stopTimer("timeLeftCounter");
//seconds = 60;
//updateMainLabel(true);
}
Hi There,
It looks like the DocumentManager and ImageManager (part of the RadEditor) are not working at all when using Internet Explorer.
The page says "This content cannot be displayed in a frame" and in the IE Developer Console I see the error "SCRIPT5: Access is denied. Telerik.Web.UI.WebResource.axd (16532,28)"
I have attached an image showing what I see.
I have done some looking around and it seems like this issue was supposed to have been fixed since ASP.NET 3.5 was released. We are targeting .NET 4.6.1
Our Telerik DLL version are a bit out of date but we are no longer paying for the product so cannot get the latest versions. We are currently on version 2014.2.618.45.
Below is the the simple code I have on a ASP.Net WebForm that we have the editor on. When I view this editor in IE I get the error described above and shown in the attached screenshot.
Test.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Test_test" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"ScriptManager"
runat
=
"server"
EnableTheming
=
"True"
>
</
telerik:RadScriptManager
>
<
div
>
<
telerik:RadEditor
runat
=
"server"
ID
=
"RadEditor1"
>
</
telerik:RadEditor
>
</
div
>
</
form
>
</
body
>
</
html
>
Test.aspx.cs
using System;
public partial class Test_test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Thanks in advance.
I have a timer on my parent master page that checks for certain events and updates controls that I want through an updatePanel.
I have numerous child pages that inherit from the master page.
I get the desired effect of the timer checking for some event and updating the controls I specified.
The undesired effect is the timer will go through the selected(In View) child page --- page life cycle.
So if I have a code in my
Page_Init or
Page_Load event handlers whatever is in them gets executed.
Doesn't render the html because it is a call back and only updates the control I specified like I wanted but, It seems unnessary that It goes through the page lifecycle of the child page.
I do logging in the methods I have in some of these page life cycle stages and If I happen to leave my user agent with a view of one of this pages, it will be logging every interval that the timer is set to. That is not desired.
Here is a pseudo example
Master Page aspx = Timer set to interval 30 sec , And Update panel with updatemode set to conditional
Master code behind = Page_load checkforEvent and if true update the panel.
******************************************************************************************************
Child page 1 inherits from Master page
Page load = Do something specific to the page and nothing to do with timer , by the way log what you do
**************************************************
Child Page 2 inherits from Master page
Page load = Do something specific to the page and nothing to do with timer,by the way log what you do
********************************
My expected result is ,
Go through page load and other page life cycles of the of the master page but not the children.
Apparently that is not the case.
Question is, How Can I stop the timer from firing my child page event handlers??
The sender in the page load of the child says it is the child page not the timer, so I cant say if timer skip what it usually does.
I also can't set a flag in the master page , like a session var to flag the timer because in ASP.net the child fires before the Master.
What to do,what to do?
Thanx!
See the code below, the RadMenu1 ALT-M works but the RadMenu2 ALT-N does not? So I'm guessing we need to set the RadMenu2 RadMenu2.KeyboardNavigationSettings.FocusKey in the code behind but RadMenu2.KeyboardNavigationSettings.FocusKey="N" is an error, how do we set this property?
<telerik:RadMenu ID="RadMenu1" runat="server" BorderWidth="1px"
Style="z-index: 10; width: 100%; white-space: normal;" Skin="Silk"
Font-Names="Verdana" Font-Size="X-Small" EnableRoundedCorners="True"
EnableAriaSupport="True">
<Items>
<telerik:RadMenuItem runat="server" AccessKey="1" Text="Unit 1">
<Items>
<telerik:RadMenuItem runat="server" AccessKey="O" Text="open">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" AccessKey="C" Text="Close">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" AccessKey="2" Text="Unit 2">
<Items>
<telerik:RadMenuItem runat="server" AccessKey="A" Text="Lec A">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" AccessKey="B" Text="Lec B">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
</Items>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<KeyboardNavigationSettings CommandKey="Alt" FocusKey="M"></KeyboardNavigationSettings>
</telerik:RadMenu>
<telerik:RadMenu ID="RadMenu2" runat="server" Flow="Horizontal" BorderWidth="1px"
Style="z-index: 10; width: 100%; white-space: normal;" Skin="Silk"
Font-Names="Verdana" Font-Size="X-Small" EnableRoundedCorners="true" RenderMode="Lightweight"
EnableAriaSupport="true">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<KeyboardNavigationSettings CommandKey="Alt" FocusKey="N"></KeyboardNavigationSettings>
</telerik:RadMenu>
protected void Page_Load(object sender, EventArgs e)
{
RadMenuItem m = new RadMenuItem();
m.Text = "Menu 1";
RadMenu2.Items.Add(m);
m.Text = "Menu 2";
RadMenu2.Items.Add(m);
//RadMenu2.KeyboardNavigationSettings.FocusKey = "";
//RadMenu2.KeyboardNavigationSettings.CommandKey = "Alt";
}