window.blockConfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle){ var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually //Cancel the event ev.cancelBubble = true; ev.returnValue = false; if (ev.stopPropagation) ev.stopPropagation(); if (ev.preventDefault) ev.preventDefault(); //Determine who is the caller var callerObj = ev.srcElement ? ev.srcElement : ev.target; //Call the original radconfirm and pass it all necessary parameters if (callerObj) { //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again. var callBackFn = function (arg) { if (arg) { callerObj["onclick"] = ""; if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz else if (callerObj.tagName == "A") //We assume it is a link button! { try { eval(callerObj.href) } catch (e) { } } } } radconfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); } return false;}function RadContextMenu_ItemClicking(sender, eventArgs){ var item = eventArgs.get_item(); if (item.get_text().substring(0, 7).toLowerCase() == "publish") { //display radconfirm popup return blockConfirm('message', eventArgs, 340, 100, '', 'Confirm Publish'); } if (item.get_text().substring(0, 7).toLowerCase() == "version" || item.get_text().substring(0, 7).toLowerCase() == "publish") { eventArgs.set_cancel(true); } else { //disable all context menus <asp:Literal ID="LiteralDisableContextMenu" runat="server" /> }}return blockConfirm('Are you sure you want to delete this item?', event, 340, 100, '', 'Confirm Delete?');Hi all,
I am using the below code to populate a DateInput when the user edits a record in a RadGrid so the Edit form is pre-populated with correct data. All is well until I try to Add a new record, because the ExpireDate variable is now NULL.
The Exception is:
An exception of type 'System.InvalidCastException' occurred in App_Web_xngshb9r.dll but was not handled in user code
Additional information: Specified cast is not valid.
And the code block (client-side):
<
telerik:RadDatePicker ID="RDP" runat="server" MinDate="01/01/1900" MaxDate="12/31/2100"
SelectedDate='<%# Eval("ExpireDate") %>' TabIndex="2" OnSelectedDateChanged="RDP_SelectedDateChanged">
</telerik:RadDatePicker>
Any help would be greatly appreciated!
<
button onclick = "radconfirm('Are you sure?', confirmCallBackFn); return false;"> show CONFIRM BOX</button>
But I would rather be able to do it similar to a .Show() method from Forms controls.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" GridLines=None Skin="WebBlue" PageSize="50" Width=100% AllowFilteringByColumn=true ShowGroupPanel="True"> <HeaderContextMenu EnableTheming="True" Skin="WebBlue"> <CollapseAnimation Duration="200" Type="OutQuint" /> </HeaderContextMenu> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"> <Selecting AllowRowSelect="True" /> </ClientSettings> <MasterTableView GroupLoadMode=Client AutoGenerateColumns="False" DataKeyNames="pkRequestID" AllowMultiColumnSorting="True" DataSourceID="SqlDataSource1"> <Columns> <telerik:GridBoundColumn DataField="pkRequestID" HeaderText="ID" SortExpression="pkRequestID" UniqueName="pkRequestID" FilterControlWidth="20px"> <HeaderStyle Width="5%" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="strTitle" HeaderText="Title" SortExpression="strTitle" UniqueName="strTitle"> <HeaderStyle Width="50%" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="fullName" HeaderText="Submitted By" SortExpression="fullName" UniqueName="fullName"> <HeaderStyle Width="15%" /> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn DataField="dteDate" HeaderText="Added" SortExpression="dteDate" UniqueName="dteDate" DataFormatString="{0:MM/d/yy}"> <HeaderStyle Width="10%" HorizontalAlign=Center /> <ItemStyle HorizontalAlign=Center /> </telerik:GridDateTimeColumn> <telerik:GridBoundColumn DataField="strStatus" HeaderText="Status" SortExpression="strStatus" UniqueName="strStatus"> <HeaderStyle Width="10%" HorizontalAlign=Center /> <ItemStyle HorizontalAlign=Center /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="votes" HeaderText="Votes" SortExpression="votes" UniqueName="votes" FilterControlWidth="20px"> <HeaderStyle Width="5%" HorizontalAlign=Center /> <ItemStyle HorizontalAlign=Center /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="comments" HeaderText="Comments" SortExpression="comments" UniqueName="comments" FilterControlWidth="20px"> <HeaderStyle Width="5%" HorizontalAlign=Center /> <ItemStyle HorizontalAlign=Center /> </telerik:GridBoundColumn> <telerik:GridHyperLinkColumn AllowFiltering=False DataTextFormatString="{0}" DataNavigateUrlFields="pkRequestID" Text="Details" UniqueName="pkRequestID" DataNavigateUrlFormatString="/portal/technical/requests/view.aspx?lpi={0}"> <HeaderStyle Width="5%" HorizontalAlign=Center /> </telerik:GridHyperLinkColumn> </Columns> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> </MasterTableView> <PagerStyle Mode=NextPrevNumericAndAdvanced Position="TopAndBottom" /> </telerik:RadGrid>
Hi,
I am using RadEditor in a preview page. I configured EditModes as "Preview":
<telerik:RadEditor ID="editor1" runat="server" Width="100%" EnableResize="false"
Height="100%" OnClientLoad="OnClientLoad" EditModes="Preview">
<Tools>
<telerik:EditorToolGroup>
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
and in OnClientLoad event, set it as full screen:
function OnClientLoad(editor) {
editor.fire(
"ToggleScreenMode");
}
The problem is that after toggle to full screen mode, the editor become editable, while I am expecting the editor still in Preview mode. How do I set back to preview mode in client side (JavaScript), or is there other way to set to full screen without impacting edit mode? In this page, I only need keep the editor in preview mode (and zoom the contect).
I tried with following command (javascript) in OnClientLoad function, but it does not work:
editor.EditModes = Telerik.Web.UI.EditModes.Preview;
My other question is if can keep the editor in preview mode, and leave zoom command available?
Thank you very much,
Junbin
ScriptManager
.RegisterStartupScript(this, this.GetType(), "WindowOpen", "radalert('Test', null, null, 'Test')", true);
I get the same problem if the code is in a Javascript function and that function is called.
ie.
function
openNewWindow()
{
var windowURL = "www.yahoo.com";
var oWnd = radopen("http://" + windowURL, null);
oWnd.center();
//var websiteName = getWebsiteName(oWnd.get_navigateUrl());
//Add new tab to the tabstrip
tabStrip.trackChanges();
var tab = new Telerik.Web.UI.RadTab();
tab.set_text(
"Test");
tabStrip.get_tabs().add(tab);
tab.set_imageUrl(oWnd.get_navigateUrl() +
"/favicon.ico");
tabStrip.commitChanges();
//Select this tab
tab.select();
}
the code is breaking on: var oWnd = radopen("http://" + windowURL, null);
Any ideas?
Thanks!