<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="radMeasure"> (its radcombobox control)
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radDisplay" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
<table height="100%" width="100%" border="0">
<tr>
<td valign="middle" align="center">
<asp:Image ID="ImageLoading" Style="margin-top: 40px" runat="server" AlternateText="Loading"
BorderWidth="0px" ImageUrl="../../Includes/RadControls/AJAX/Skins/Default/loading.gif">
</asp:Image>
</td>
</tr>
</table>
</telerik:RadAjaxLoadingPanel>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function gridCommand(sender, args) {
alert('test');
if (args.get_commandName().startsWith("DoSomething")) {
....
}
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:RadGrid
ID
=
"gv"
runat
=
"server"
AllowFilteringByColumn
=
"false"
AllowPaging
=
"true"
AllowSorting
=
"true"
AutoGenerateColumns
=
"false"
EnableAJAX
=
"false"
EnableEmbeddedSkins
=
"false"
GridLines
=
"Horizontal"
OnItemCommand
=
"gv_ItemCommand"
OnItemCreated
=
"gv_ItemCreated"
PageSize
=
"30"
Width
=
"100%"
OnExcelMLExportRowCreated
=
"gv_ExcelMLExportRowCreated"
OnExcelMLExportStylesCreated
=
"gv_ExcelMLExportStylesCreated"
>
<
ExportSettings
IgnorePaging
=
"false"
></
ExportSettings
>
<
MasterTableView
AllowMultiColumnSorting
=
"false"
CommandItemDisplay
=
"Top"
DataKeyNames
=
"ID"
GridLines
=
"None"
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"false"
AllowSorting
=
"True"
DataField
=
"ID"
HeaderText
=
"ID"
SortExpression
=
"ID"
UniqueName
=
"ID"
>
</
telerik:GridBoundColumn
>
.....
</
Columns
>
<
CommandItemTemplate
>
<
table
class
=
"Normal"
cellspacing
=
"0"
cellpadding
=
"4"
border
=
"0"
width
=
"100%"
>
<
tr
>
<
td
align
=
"right"
>
<
asp:LinkButton
ID
=
"btCommand"
runat
=
"server"
CommandName
=
"DoSomething"
>DoSomething</
asp:LinkButton
>
</
td
>
</
tr
>
</
table
>
</
CommandItemTemplate
>
<
CommandItemStyle
HorizontalAlign
=
"Right"
/>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"gridCommand"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> function requestStart(sender, args) { if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0) { args.set_enableAjax(false); } } function ValidateData() { return true; } </script> <table style="width: 100%;"> <tr> <td class="TDInfoLabel" style="width: 20%;"></td> <td class="TDInfoValue"> <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClientClick="return ValidateData();" /> </td> </tr> </table> <br /> <div style="overflow: auto; height: 100%; font-size: 12px;"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="requestStart"> <telerik:RadGrid ID="rgvUserData" runat="server" Skin="Hay" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" PageSize="50" AllowPaging="True" PagerStyle-Mode="NextPrevAndNumeric"> <ClientSettings AllowGroupExpandCollapse="true" EnableRowHoverStyle="true" Selecting-AllowRowSelect="true"> <Selecting AllowRowSelect="True"></Selecting> </ClientSettings> <MasterTableView CommandItemDisplay="Top" GroupLoadMode="Client" AllowMultiColumnSorting="false" GroupHeaderItemStyle-ForeColor="Black" PageSize="50" UseAllDataFields="False"> <CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToExcelButton="true" ShowAddNewRecordButton="false"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <GroupHeaderItemStyle ForeColor="Black"></GroupHeaderItemStyle> </MasterTableView> <ExportSettings FileName="ExportedData" IgnorePaging="True" OpenInNewWindow="False"> <Excel Format="Html"></Excel> </ExportSettings> <HeaderStyle ForeColor="White" /> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> </telerik:RadAjaxPanel> </div> <br /> </asp:Content>
------------------------------------------------------------------------------
Now If I try to access any control in script section by following wayvar btn = document.getElementById("<%= btnSearch.ClientID%>");Or
var btn = $find("<%= btnSearch.ClientID%>");
then I am getting following errors when I try to run the page.
Crome: Error : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
IE: 0x800a138f - JavaScript runtime error: Unable to get property 'notifyScriptLoaded' of undefined or null reference.
If I delete the lines accessing the controls from JavaScript section then it runs fine.
Regards,
John
Hi,
I have a radSplitter with two radPanes. In first pane I have a radGrid and in second I have a radScheduler with scroll bars and both are of same height. Now i want to synchronize the scrolling between radGrid and radScheduler.(i.e if i move the scroll bar in radGrid then radScheduler should also move and vice versa). I want it to be done in the client side javascript.I tried it but couldn't find what is the event that is getting fired when i scroll the radscheduler...Can anybody tell me how to achieve this?
.RadMenu_Default .rmRootGroup,
.RadMenu_Default a.rmLink,
.RadMenu_Default .rmGroup .rmText,
.RadMenu_Default .rmVertical .rmText,
.RadMenu_Default .rmLeftArrow,
.RadMenu_Default .rmRightArrow,
.RadMenu_Default .rmTopArrow,
.RadMenu_Default .rmBottomArrow
{
background-image: url('../Images/rmSprite.png');
background-color: transparent;
}
.RadMenu_Default .rmRootGroup
{
background: #0072C6 !important; /* Old browsers */
background: linear-gradient(to bottom, #0072C6 0%,#8eb92a 50%,#72aa00 51%,#003A66 100%) !important; /* W3C */
background-image: -ms-linear-gradient(bottom, #003A66 0%, #0072C6 100%) !important; /* IE 10 */
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0072C6', endColorstr='#003A66',GradientType=0 ) !important; /* IE6-9 */
color: White !important;
}
.RadMenu_Default .rmGroup, .RadMenu_Default .rmMultiColumn, .RadMenu_Default .rmGroup .rmVertical
{
background: #0072C6 !important;
color: White !important;
}
.RadMenu_Default .rmHorizontal .rmRootLink span.rmText:hover
{
background: #0072C6 !important;
color: White !important;
}
.RadMenu_Default a.rmExpanded, .RadMenu_Default a.rmExpanded:hover
{
background: #0072C6 !important;
color: White !important;
}
.RadMenu_Default .rmItem .rmFirst .rmLink .rmText:hover, .RadMenu_Default .rmItem .rmLast .rmLink .rmText:hover
{
background: #0072C6 !important;
color: White !important;
background-image: none !important;
}
.rmText
{
color : White;
}
I am wondering if there is a way to make the styling for the first and last menu item the same as what is being rendered/styled for the other menu items?