Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
67 views
When I use ShowOnFocus with an Editor, everything on the page (except the focused editor) is disabled (and grey) as soon I click on an editor.  It is similar to what you see with a modal RadWindow.  Then if I click on the toolbar, the toolbar disappears and the entire page is disabled.

The Telerik demo program compiles and works fine, and when I transfer my settings from the non-working program into the demo program, it still works fine.

Any suggestions about where the difference might lie?
Tervel
Telerik team
 answered on 16 Feb 2009
3 answers
397 views
Hello,

My page binds data initially to the RadGrid, but then a change in something should cause the RadGrid to bind again.  I was calling the RadGrid's Rebind() method to bind again, but it's not firing NeedDataSource event...  why is that?
-DJ-
Top achievements
Rank 1
 answered on 16 Feb 2009
3 answers
403 views
Hi,
I have a radnumeric input control inside a formview. I want to bind into it, using #Bind syntax, and also to dynamically set the max value using inline code.
This is the radnumericInput:
<telerik:RadNumericTextBox ID="txtUsedChannels" runat="server" Value='<%# Bind("txtUsedChannels") %>' ShowSpinButtons="true" MinValue="0" MaxValue="5" > 
            </telerik:RadNumericTextBox>  


which returns:
"Specified cast is not valid." this is what happends when i try to set the value. The binded value (i check in the debugger) is 0.

When I add an inline code:
<telerik:RadNumericTextBox ID="txtUsedChannels" runat="server" Value='12' ShowSpinButtons="true" MinValue="0" MaxValue="<%= SomeFunction(someCodeBehindArg) %>" > 
            </telerik:RadNumericTextBox>  

I get:
Cannot create an object of type 'System.Double' from its string representation '<%= Convert.ToDouble(RecordingConfigurationManager.sysConfig.GetLicensedChannels(configuration.getCaptureType())) %>' for the 'MaxValue' property.

Can you guide me how to use the control dynamically?

thanks,

Daniel
Telerik team
 answered on 16 Feb 2009
2 answers
236 views
hello Telerik Team,

Is there anyway to get it so that the RadFileExplorer wont display hidden folders.  Currently in my app hidden folders are displayed in the RadFileExplorer i would prefer it not to.

Regards

Ian
Lini
Telerik team
 answered on 16 Feb 2009
1 answer
339 views
Hello there,

I'm new with Telerik and my company is evaluating different TreeView components in order to pick one to use. So far you guys are on the lead but I'm struggling with detecting a SelectedIndexChanged detection from a radio button list which is inside a template for all my nodes of the tree view.
Just a bit of background of what I'm doing: I have a tree view that will display the structute of a system where the administrator will setup permissions for each user. So pretty much Each node will represent a system part and each node has the radio button list with the permission options.
My idea is that when a option is changed, this selection would be changed for all child nodes.
I have no limitations to do it at client or server side (althought client side would be prefferable).
So far this is what I have:

<telerik:RadTreeView ID="rtvPermissoes"   
    runat="server" Height="200"   
    onnodedatabound="rtvPermissoes_NodeDataBound"   
    onnodecreated="rtvPermissoes_NodeCreated" onnodeclick="rtvPermissoes_NodeClick">  
    <NodeTemplate> 
        <table cellpadding="0" cellspacing="0" style="width:100%; height:16px;">  
            <tr> 
                <td ID="colNomeEstrutura" style="width:auto;" valign="top">  
                    <asp:Label ID="lblNome" runat="server" Text="">  
                        <%#DataBinder.Eval(Container,"Text") %> 
                    </asp:Label> 
                </td> 
                <td ID="colPermissao" style="width:250px;" valign="top">  
                    <asp:RadioButtonList   
                             ID="optPerm" runat="server" RepeatDirection="Horizontal"   
                             onselectedindexchanged="optPerm_SelectedIndexChanged" > 
                             <asp:ListItem Value="Invisivel">Invisível</asp:ListItem><asp:ListItem Value="SomenteLeitura">Somente Leitura</asp:ListItem><asp:ListItem Value="Escrita">Escrita</asp:ListItem></asp:RadioButtonList></td><td ID="colExpiracao" style="width:100px;" valign="top">  
                    <asp:TextBox ID="txtExp" runat="server" MaxLength="10" Text="" Width="75" /> 
                </td> 
            </tr> 
        </table> 
    </NodeTemplate> 
</telerik:RadTreeView> 

 


I had to declare onnodedatabound and onnodecreated because I was also struggling with the databind to populate by template fields properly, but I got a work around with onnodecreated to make it work. That's probably because I'm populating the treeview nodes after a certain system and user are selected and not on page load, but that's not my main problem right now :)

At code behind I have:

 

        protected void rtvPermissoes_NodeClick(object sender, RadTreeNodeEventArgs e)  
        {  
            RadioButtonList Perm = (RadioButtonList)e.Node.FindControl("optPerm");  
            TextBox Exp = (TextBox)e.Node.FindControl("txtExp");  
            if (Perm.SelectedValue != e.Node.Attributes["Permissao"] ||  
                Exp.Text != e.Node.Attributes["Expiracao"]) //Permissão foi alterada.  
            {  
                AtribuirPermissoesAlteradasAosFilhos(Perm.SelectedValue, Exp.Text, e.Node.Nodes);  
            }  
        }  
 
protected void optPerm_SelectedIndexChanged(object sender, EventArgs e)  
        {  
            RadioButtonList Perm = (RadioButtonList)sender;  
            RadTreeNode node = (RadTreeNode)Perm.Parent;  
            TextBox Exp = (TextBox)node.FindControl("txtExp");  
            if (Perm.SelectedValue != node.Attributes["Permissao"] ||  
                Exp.Text != node.Attributes["Expiracao"]) //Permissão foi alterada.  
            {  
                AtribuirPermissoesAlteradasAosFilhos(Perm.SelectedValue, Exp.Text, node.Nodes);  
            }  
        } 

 

 

 

 

Pretty much the codes are similar and I did it to check when the node click is fired and when the select idenx changed is fired.
Not sure if I will be clear to explain this but while debugging, this routine is not fired when I click at the radio button circle (not the text but right in the circle to select the option), any event is fired at all.
However right after, if I eventually click anywhere in the node it will first fire the selected index changed event and right after node click is fired.
Using this flow I got my goal done. I can determine on which node I'm, I can determine if any setting have been changed (can be the radio button list of the text box as well), and I can call AtribuirPermissoesAlteradasAosFilhos which is a my private method that will loop the child nodes and apply the same selection that the parent node has.
Just as a note when I create the nodes I'm adding to the collection of attributes the selectedValue of the radio button list on Attributes["Permissao"]  and the content of the text box on Attributes["Expiracao"] so I could keep track of it.

My next step was to check what happens when I click on the text of some option on the radio button list. Pretty much the value got selected on the client yet, however the node click event got fired. Debugging it I have found that Perm.SelectedValue had still the old value, so I couldn't retrieve the new value. With this flow the SelectedIndexChangedevent was never fired.

I would like to know if there is any work around in order to get it working.
I'm using Telerik.Web.UI version 2008.3.1314.20

Please let me know if you need more details and sorry for not using english name for methods, I've just copied from my sketch :)
Best regards!

 

 

 

 

Veselin Vasilev
Telerik team
 answered on 16 Feb 2009
3 answers
182 views
I have a hierarchical grid where AutoGenerateColumns is FALSE (i.e. I specify all columns) but most columns I would like to use the specialized Telerik columns (GridBoundColumn, GridDateTimeColumn, GridNumericColumn, etc.), not GridTemplateColumn, but I would like to add validators for these fields when in Insert/Edit modes (I use popup style inserts/edits).

The best thing I have found so far is based on this post. This gets rather interesting, and hacky, because the ItemCreated event handler is for the entire grid and not for the specific MasterTableViews within the hierarchical grid. Is there a better way to do this? I would like to add things such as date ranges, numerical ranges, and a required validator, among other things (pretty simple validations) for this specific problem, but this really should be much more flexible than that, even.

My primary observation is that there is no simple way to just hook up a validator to an edit field, and this is something that should be a relatively trivial thing without requiring templates. I think it would make sense to add a new collection to a Grid, GridValidators, where I could add as many validators as I wanted. Then give each grid column a property, ValidatorToUse and link it up to one of those validators in that collection. Or perhaps allow the use to have several validators assigned to a single column somehow. Something...

And if I'm wrong and this exists, my apologies. I've missed some very obvious things in the past. ;-)

Thanks!
-Shane
Princy
Top achievements
Rank 2
 answered on 16 Feb 2009
3 answers
135 views
Hi,

We are attempting to present confirmation messages using RadAlert using techniques documented here

http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind-all-versions-of-radwindow.aspx

This works in Firefox but not in IE.  My exact code for this is as follows (VB)

                    Dim radalertscript As String = "<script language='javascript'> window.onload = function(){radalert('My message here', 330, 210);}</script>"
                    Page.ClientScript.RegisterStartupScript(Me.[GetType](), "radalert", radalertscript)

Background - Telerik RadControls for ASPAJAX Q3 2008. Also, Our pages use MasterPages and in the masterpage we place a single RadScriptManager. I dont know whether this is relevant or not. If anyone has any ideas on this please help. This has been painful.




Georgi Tunev
Telerik team
 answered on 16 Feb 2009
1 answer
112 views
Hi

If you leave the RadComboBox by pressing the TAB key the OnClientBlur event doesn't gets fired. I'm building some javascript functions which prevent the user from leaving a once selected RadComboBox empty. Meaning i fill back in the once selected values. I'm doing this at the moment he leaves the combobox OnClientBlur. If the user only uses his mouse, everthing works fine. But if he tabs through the form the event doesn' gets fired until you klick somewhere on the page.

What solutions do you offer for my problem? 

Thanks!


Princy
Top achievements
Rank 2
 answered on 16 Feb 2009
2 answers
98 views
I have a radgrid which works really well.  I've extended the functionality to use grouping, but whenever a column is dragged to the grouping area, or dragged from the grouping area back to the columns; an InvalidCastException occurs.

[InvalidCastException: Unable to cast object of type 'Telerik.Web.UI.RadGrid' to type 'Telerik.Web.UI.GridTableView'.] 
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +1692 
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 
 

I've checked my httphandlers section in the webconfig (as a previous thread suggests), but the relevant Telerik.Web.UI.WebResource.axd entry is already present.
<httpHandlers> 
      <remove verb="*" path="*.asmx" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> 
    </httpHandlers> 
    <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </httpModules> 


Any ideas?

Gordon
Top achievements
Rank 1
 answered on 16 Feb 2009
2 answers
175 views
Hi,

I have a RadMenu control in vertical orientation on my page and I would like to be able to fix the width to 100% of it's parent container (a div in this case)

In IE7 and Firefox this seems to work fine, however in IE6 the width of the RadMenu seems to be fixed to the width of the Menu Item with the most amount of text with quite a bit of padding after the text.

Is this a known problem, is there any way to fix it?

Thanks,

Marc
anwar
Top achievements
Rank 1
 answered on 16 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?