<
telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
<script type="text/javascript">
var parent_window = window;
function openNewVenWin() {
var oWnd1 = radopen("Vendor_Add.aspx", "RadWindow1");
}
function openEditVenWin(vendorCode) {
var oWnd2 = radopen("Vendor_Edit.aspx?ID=" + vendorCode, "RadWindow2");
}
function openMaintWin() {
var oWnd3 = radopen("Maintenance.aspx", "RadWindow3");
}
function CloseOnReload() {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}
function confirmDelete(vendor) {
confirm("Are you sure that you want to delete " + vendor + "?");
}
</script>
</telerik:RadCodeBlock>
<
telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
ReloadOnShow="true" runat="server" Skin="Sunset">
<Windows>|
<telerik:RadWindow ReloadOnShow="true" ID="RadWindow1"
Width="880px" Height="600px" Title="Add New Vendor" Behaviors="Close, Move, Resize, Maximize"
runat="server" NavigateUrl="Vendor_Add.aspx" Modal="true">
</telerik:RadWindow>
<telerik:RadWindow ReloadOnShow="true" ID="RadWindow2"
Width="880px" Height="600px" Title="Edit Vendor" Behaviors="Close, Move, Resize, Maximize"
runat="server" NavigateUrl="Vendor_Edit.aspx" Modal="true">
</telerik:RadWindow>
<telerik:RadWindow O ReloadOnShow="true" ID="RadWindow3"
Width="880px" Height="600px" Title="Maintenance" Behaviors="Close, Move, Resize, Maximize"
runat="server" NavigateUrl="Maintenance.aspx" Modal="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
This is the button that I am selecting to open up the radWindow:
<asp:Button ID="editButton" style="text-decoration:none" CommandName="EditButton" runat="server"
Text="Edit" OnClientClick='<%# Eval("VendorCode", "return openEditVenWin(\"{0}\")")%>' >
</asp:Button>
RadAjaxManager on parent page:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="radGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Child page:
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
<script type="text/javascript">
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.radWindow;
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
return oWindow;
}
function closeWin() {
GetRadWindow().close();
}
function CloseAndRedirect(sender, args) {
GetRadWindow().close();
GetRadWindow().BrowserWindow.location.reload();
GetRadWindow().BrowserWindow.location.href = 'Checklist.aspx'; //Redirect to new url
// //GetRadWindow().BrowserWindow.location.reload('Checklist.aspx');
// GetRadWindow().close(); //closes the window
}
function confirmDelete(vendor) {
confirm("Are you sure that you want to delete " + vendor + "?");
}
</script>
</telerik:RadCodeBlock>
RadAjaxManager on child:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="main">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="main" />
<telerik:AjaxUpdatedControl ControlID="blistErrors" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
I have a mode in application that uses radeditor where a certain role, call it “user” has no ability to modify content other than through 3 custom “note annotation” buttons on custom tool bar and in the context menu (add note, delete note, modify note). I figure there are two ways of doing this with radeditor;
1. Use Design mode and when the ‘user role’ is detected go into design mode remove all the tool bars except the one that has the 3 annotation buttons remove all context menus except the 3 annotation buttons. I can disable content by catching all keystokes (that I want to catch) in a client side key event handler. (This mode is the one I’m currently coding to at the moment)
Problems with this method:
1. I have some bordered colored span tags that the “user role” can grab with the mouse and move around, which I would like to disable.
2. Some content is in tables and the “user role” can size the borders, which I would like to disable.
3. All tables even with invisible borders can have their border sized modified by the “user role”
2. Use Preview mode. I can enable the three button based on this support article http://www.telerik.com/support/kb/aspnet-ajax/editor/enabling-print-button-in-preview-mode.aspx . Here there is not the problems listed in #1 but there are other problems introduced;
Problems with this method (so far)
1. Some html document elements don’t work, like getElementById which is essential for inserting annotations into document
2. It does not appear that the editor content can be modified by client side programming.
3. Cursor selection is disabled
If I could overcome the problems for either 1 or 2 I think I could fulfill my “user role” requirement with limited user editing via client/server program control
Thank you for any thoughts on the issue.
<div style="margin: 0 0 15px 0;"><b>Available User(s):</b><telerik:RadComboBox ID="rcbApprovalUsers" runat="server" MarkFirstMatch="true" AllowCustomText="false" Filter="Contains" Width="250px" /></div>void rcbApprovalUsers_DataBinding(object sender, EventArgs e){ List<ApproverInfo> unassignedApprovalUsers = CustomerFactory.ApprovalForwardingGetUnassigned(ECISite.ID, Master.ECICustomer.ID, Master.ECISession.AccountInfo.AccountNumber); rcbApprovalUsers.Visible = bAddApprover.Visible = (unassignedApprovalUsers.Count != 0); lNoApproversAvailable.Visible = (unassignedApprovalUsers.Count == 0); if (unassignedApprovalUsers.Count > 0) { rcbApprovalUsers.DataSource = unassignedApprovalUsers; rcbApprovalUsers.DataTextField = "UserInfo"; rcbApprovalUsers.DataValueField = "CustomerID"; rcbApprovalUsers.SelectedValue = unassignedApprovalUsers[0].CustomerID.ToString(); }}I am using dropdown within Radgrid which has inline editing.
Now when I click on dropdown and then dragging the below scroll bar the list items of dropdown is also moving.
Please have a look on attached screen and suggest me some solution:
Thanks
Mukesh