Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
178 views
Hello,

I am using Forms Authentication and ASP.NET roles for my website. For most of my menu links I will be able to use the NavigateUrl to open the proper pages. However, I need to be able to redirect users based upon their role for a few of the child items. For example, when an employee is in the parent branch named Employee and navigates to and clicks on the Forms child menu, I need all the users in the 'Doctors' role to be directed to ~/employee_login/doctors_area/forms.aspx and users in the 'Office_Staff' role to be directed to ~/employee_login/office_staff_area/forms.aspx page. I am able to accomplish this with the onclick event using a standard asp:LinkButton for example (see code below) but am unable to find a way of doing it using the RadMenu. Please help.

<

 

form id="form1" runat="server">

 

 

<div>

 

 

 

<asp:LinkButton ID="LinkButton1" runat="server" onclick="redirectDocStaff">LinkButton</asp:LinkButton><script runat="server"> protected void redirectDocStaff(object sender, EventArgs e)

 

{

 

if (Roles.IsUserInRole("Doctors"))

 

Response.Redirect(

"~/Employee_Login/Doctors_Area/forms.aspx");

 

 

else if (Roles.IsUserInRole("Office_Staff"))

 

Response.Redirect(

"~/Employee_Login/Office_Staff_Area/forms.aspx");

 

}

</

 

script>

 

stuart
Top achievements
Rank 1
 answered on 23 Jan 2009
1 answer
112 views
  I'm getting a 500 server error when I am using the MSWordProvider (the other providers work ok).  I have word installed correctly on the server so I don't think that is the issue.  Here is the full text of the error:

/Telerik.RadSpellCheckHandler.ashx undefined

Obeject Reference not set to an instance of an object.

 
 
Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object. 
 
 
Thread information: 
        Is impersonating: True
    Stack trace:    at Telerik.WebControls.WordSpellCheckProvider.CheckWord(ITextWord current, ITextWord previous)
   at Telerik.WebControls.SpellChecker.CheckText()
   at Telerik.WebControls.SpellCheckHandler.ProcessSpellCheckRequest(String text)
   at Telerik.WebControls.SpellCheckHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 

Rumen
Telerik team
 answered on 23 Jan 2009
2 answers
533 views
Is it possible to change the ReadOnly property of a GridTemplateColumn by dynamic programmatic control?

If so, what is the recommended way to do this? I looked for a code snippet but have not found it yet...

I want to develop a *.ascx control built using Telerik RadGrid such that there are various GridTemplateColumns for which I can dynamically change the ReadOnly status. Then I can put the *.ascx control with ReadOnly=true on certain *.aspx web pages and ReadOnly=False on other *.aspx web pages.

Thanks

CT
Carl
Top achievements
Rank 1
 answered on 23 Jan 2009
1 answer
195 views

Hi,
When i try to do spell check in rad editor i get the below  javascript error 

RadSpell error. Server returned error: 500

 

Please, see the help for more details: RadSpell 3.x - Configuration - SpellCheckHandler.

 

/Administration/RadControls/Spell/Telerik.RadSpellCheckHandler.ashx

 

Internal Server Error

 

<html>

    <head>

        <title>No dictionary loaded. Set the DictionaryPath property before spellchecking.</title>

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Lucida Console";font-size: .9em}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

        </style>

    </head>

 

    <body bgcolor="white">

 

            <span><H1>Server Error in '/Administration' Application.<hr width=100% size=1 color=silver></H1>

 

            <h2> <i>No dictionary loaded. Set the DictionaryPath property before spellchecking.</i> </h2></span>

 

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

 

            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 

            <br><br>

 

            <b> Exception Details: </b>System.ArgumentException: No dictionary loaded. Set the DictionaryPath property before spellchecking.<br><br>

 

            <b>Source Error:</b> <br><br>

 

            <table width=100% bgcolor="#ffffcc">

               <tr>

please help me with this issue.
thanks
Poornima

Rumen
Telerik team
 answered on 23 Jan 2009
10 answers
646 views
Hi,

I use the RadEditor in a number of ways in our (rather complex) web application, and I have come across several issues along the way.

  1. I use "radEditor.Modules.Clear()" to remove the empty panel beneath the editor box. This works fine, except when the editor is created dynamically, then the empty panel is visible regardless. Is there another way to hide it? And why does it show up at all, since it's empty anyway?
  2. I use the RealFontSize tool to set font size, and it sort of works, BUT, when I later open the editor and select the text with, say, font size 14px, the font size DropDownBox will show 4 and not 14px. Presumably the DropDownBox converts to standard HTML font size when reading the selection formatting. To make it even more confusing the HTML code shows 14pt, not pixels (px)! Very confusing for the people using the editor. Any ideas on how to solve this and make it work consistently?

    Related to this, i would prefer for the tool to always show points (pt) for font size, not pixels (px). Is this possible? Not a great issue, but it would be nice.
I hope my explanations are clear enough to understand.
Regards,
TJ
Rumen
Telerik team
 answered on 23 Jan 2009
2 answers
182 views
In the grid I can specify alternate row CSS to add visual separation between rows
I can also add a CSS to the sorted column to add visual cue which column is currently sorted

So lets say I have alternating rows with white/gray/white/gray background
I also have CSS for sorted column that turns background of the sorted column to blue. All cells in sorted column now have blue background. Compare to nicely white/gray/white/gray schema of the unsorted column it looks ugly.

Question: How can I can specify alternate row CSS for the sorted column? So in the sample above I would get white/gray/white/gray for unsorted columns and dark blue/ligh blue/dark blue/light blue for sorted ones?

Thank you
Alex
Top achievements
Rank 1
 answered on 23 Jan 2009
6 answers
192 views
Hi,
  Currently I working in a scenario where RAD WINDOW is present in Parent.aspx and we have child.aspx in IFRAME of Parent.aspx....
I have provided a link in child.aspx which opens the radwindow of parent.aspx.

Problem: Now open the radwindow in parent clicking on link in child. It opens fine. Close the window. Again click the link. Now rad window is distorted. It's unable to retain the attributes like Height, Width, Behaviour etc... set in .aspx .

i.e second time when you open rad window it's a problem.

Code is as follows:
Parent.aspx

    <rad:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="AutoDetect" >
    </rad:RadScriptManager>
        <rad:RadWindowManager Skin="Vista" DestroyOnClose="true"  id="Singleton" runat="server">
            <windows>
                <rad:RadWindow Runat="server" Modal="true" Height="450" Width="850" Visible="true" VisibleStatusbar="false" Title="SumTotal" EnableEmbeddedSkins="false" Skin="Vista" VisibleTitlebar ="true" Behaviors="Close" Behavior="Close" ID="DialogWindow"></rad:RadWindow>
            </windows>
        </rad:RadWindowManager>


child.aspx

<div id="Div1" runat="server">
   <script type="text/javascript">
        function openWindow()
        {
             var oWindow = null;
             var strURL = "LMS_User_ExceptionDetail.aspx?EmpID=5195&EmpName=Emily%20Arroyo&ViewDataMode=0";
             oWindow = window.parent.radopen(strURL, "DialogWindow");      
        }
    </script>
</div>


<a href='javascript:openWindow();'>test</a>
Fiko
Telerik team
 answered on 23 Jan 2009
3 answers
191 views
Hi,

I am using Ajax Rad Controls. In this i am using batch updates with RadGrid. In this radgrid some columns are date columns. Edit/update working fine. But sometimes when user clicks on datepicker control then it does not shows the popup to select date. After sometime it gives error as

An unknown error occured while processing the requests on the server. the status code returned from the server was: 500
Also some times this error occures after updating data in database. But data updates successfully. This is javascript error that occures. Please help asap.
Thanks
Daulati
Sebastian
Telerik team
 answered on 23 Jan 2009
2 answers
112 views
Greetings,

Anybody know if there is a way to disable the auto-open that happens during drag & drop when the user hovers over the destination node?

I am only allowing nodes to be dropped within the same parent node (reordering) and auto-open gives the impression that they should be able to drop it under a new parent...

Thanks in advance for any suggestions!
Brent
Top achievements
Rank 1
 answered on 23 Jan 2009
5 answers
104 views
Hi again,

it appears that the ClientNodeExpanding event is not fired when a node that has no children gets a child, and is then expanded with node.expand(). It also doesn't fire with node.set_expanded(true). Here is a sample code:

        var retvals = retval.split("|"); /* retval is a string such as :
"10879|Produktgrupp Â«Ny produktgrupp»|PRODUKTGRUPP|/Icons/TreeView/ImageCreate.aspx?nodetype=PRODUKTGRUPP&alias=False&icontype=normal|/Icons/TreeView/ImageCreate.aspx?nodetype=PRODUKTGRUPP&alias=False&icontype=expanded|Ny produktgrupp" */   
        var node_id = retvals[0]; 
        var tooltip = retvals[1]; 
        var category = retvals[2]; 
        var imageurl = retvals[3]; 
        var expimageurl = retvals[4]; 
        var nodename = retvals[5]; 
                 
        var node = new Telerik.Web.UI.RadTreeNode();  
        node.set_text(nodename.replace(/</g,"&lt;").replace(/>/g, "&gt;")); 
        node.set_target("content"); 
         
        node.set_value(node_id);     
        var navurl = "content.aspx?id_catalogue=1&data_id_node="+node_id+"&id_category="+category+"&tree_id_node="+node_id; 
        node.set_navigateUrl(navurl);    
        node.set_imageUrl(imageurl); 
        node.set_expandedImageUrl(expimageurl); 
        node.set_contextMenuID(category); 
        node.set_category(category);         
         
// g_parent_node is a global variable with the parent node
        g_parent_node.get_nodes().insert(0, node); 
 
        node.get_textElement().title = tooltip; 
         
        if (!g_parent_node.get_expanded()) {             
            g_parent_node.expand();
/* If g_parent_node had no childnodes before I added one in the code above,
this expansion can not be caught!! Nither ClientNodeExpanding nor ClientNodeExpanded is fired. But g_parent_node is actually expanded!
*/
        } 

If I do g_parent_node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack) before expanding, the ClientNodePopulated event is fired, but that is not what I want.

Regards,
Fredrik
Mallverkstan
Veselin Vasilev
Telerik team
 answered on 23 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?