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

I have a web app that i'm switching over to use your controls, and i'm trying to load one of the RadComboBox's from a SqlDataReader.  I use them all over the place, and would like not to have to change all of that out due to time constraints.  The dropdown will load the first item, but when i expand it the list willbe empty.  I've also tried loading it using the Items.Add() method with a similar result.  I have set both the DataTextField and DataValueField properties.  If i set EnableLoadOnDemand="true" it loads perfectly, yay.  However it also puts a textbox in the control for users to type, while i'll probably be using this later, on this list i do not need or want it.  I've tried just about everything i can think of and found a couple posts here that said to set AllowCustomText="false" which i've done but it had no effect.   Is there something special i need to do to get the combobox to load from a datareader or items.add() without using EnableLoadOnDemand?  or is there another way to disable the textbox portion of the control?

John
Yana
Telerik team
 answered on 09 Sep 2009
1 answer
77 views
Hi,

i have built a grid, a deatils.ascx (my User Edit form) and i want to call the editmode of the grid with a context menu.

all works fine, i can rightclick a row and the context menu opens. I already implemented that i can edit the record and do the update in the database with the editmode like in the online demo:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

Now i want to do the insertCommand. But i want to provoke the Insert Edit Mode with my context menu and not from the CommandItem of the grid. How can i do that?

thx, Mario


PS.:
I just added "CommandItemDisplay="Top"" to the MasterView properties. Is it default that there is displayd Add Record and Refresh functionality in the CommandItem if im not implementing a CommandItem myself?
Tsvetoslav
Telerik team
 answered on 09 Sep 2009
1 answer
116 views
I would like to edit tab labels in place by double clicking them, then postback to server. Is there an example of doing this or could some please give me an example.
Paul
Telerik team
 answered on 09 Sep 2009
6 answers
220 views
I have a User Control that contains a RadMenu which I use to populate all forms in a web application. I have the need now to selectively disable menu items based on selecting a tabstrip item. I've done a test by placing a RadMenu directly on a page and setting up the RadAjaxManager to update the control from the tabstrip and the menu is rendered properly, disabled or enabled as the case may be. However the User Control containing my real menu does not show up as a control on the RadAjaxManager Property Builder. Is there something I need to do to the User Control containing the RadMenu to make it visible?


Pavlina
Telerik team
 answered on 09 Sep 2009
5 answers
436 views
Hello,
I am trying call a radalert window from code-behind. For this I followed the instructions here.
I registered a RadWindowManager in my Master page and called the radalert from the client page's code-behind.
Here's the code for both of them:
Master:
<form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="MasterScriptManager" runat="server" EnablePageMethods="True" 
        EnableScriptGlobalization="True" EnableTheming="True"> 
        <Services> 
            <asp:ServiceReference Path="~/Ws/KanioService.asmx"></asp:ServiceReference> 
        </Services> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="ramMaster" runat="server"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="ktbMaster"> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadFormDecorator ID="masterFormDecorator" runat="server" DecoratedControls="All" /> 
    <telerik:RadWindowManager ID="rwmKanioMaster" runat="server"> 
    </telerik:RadWindowManager> 
    <div id="container"> 
 
... 
   

client's code-behind:
clientScript = "radalert('" + Resources.GlobalTranslation.selectFirst + "');"; 
RadScriptManager.RegisterStartupScript(this, this.GetType(), "openWindow", clientScript, true); 

Now Firebug gives me the following error:
l is undefined
Ferdinand
Top achievements
Rank 1
 answered on 09 Sep 2009
2 answers
157 views
Hi

I've bound my RadTabStrip to a SiteMapDataSource and want to hide or disable certain tabs depending on SiteMapNodeAttributes. But my settings (enabled/visible) are ignored. 

(GetBool() is a function to test and cast the value, true is the fallback value.)
 
        protected override void OnTabDataBound(telerik.RadTabStripEventArgs e) 
        { 
            e.Tab.Enabled = (e.Tab.DataItem as System.Web.SiteMapNode)["enabled"].GetBool(true); 
            e.Tab.Visible = (e.Tab.DataItem as System.Web.SiteMapNode)["visible"].GetBool(true); 
 
            base.OnTabDataBound(e); 
        } 

The only way to hide a tab was by removing it completly...
 
            if (!(e.Tab.DataItem as System.Web.SiteMapNode)["visible"].GetBool(true)) 
            { 
                this.Tabs.Remove(e.Tab); 
            } 

So when is the right moment to do this? I tried it in OnDataBound but then the DataItem of the node is empty...
Softec
Top achievements
Rank 1
 answered on 09 Sep 2009
10 answers
414 views
Hi,

I'm loading tooltip using radtooltipmanager from the main page. The content of the tooltip is a usercontrol.
I can't get reference to the control inside the usercontrol using javascript.

Main Page :

<%@ Register TagPrefix="pd1" TagName="popup_detail" Src="~/.../collection/WebUserControl.ascx" %> 
 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
 
<script type="text/javascript"> 
 
function change_image(id_cl, id_modele, photo) 
{ 
var img = $get('<%=popup_detail.FindControl("Image2").ClientID %>'); 
 
img.src = "http://www.iii.com/photos/modeles/2009/" + id_cl + "/l/" + id_modele + "_" + photo + ".jpg"; 
 
}</script> 
 
    </telerik:RadCodeBlock> 
 
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="MiddleRight" 
            Skin="Default" ManualClose="true" Animation="Fade" RelativeTo="BrowserWindow" 
            Width="810px" Height="650px" ShowCallout="False" OnAjaxUpdate="OnAjaxUpdate"  
            ShowEvent="OnClick" /> 

Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs) 
        Me.UpdateToolTip(args, args.UpdatePanel) 
    End Sub 
    Private Sub UpdateToolTip(ByVal args As Object, ByVal panel As UpdatePanel) 
         
        Dim ctrl As Control = Page.LoadControl("WebUserControl.ascx") 
        panel.ContentTemplateContainer.Controls.Add(ctrl) 
    End Sub 

The usercontrol :

<asp:Image ID="Image2" runat="server" /> 
 <a href="#" onclick="change_image(<%=request.querystring("id_cl")%>, <%# DataBinder.Eval(Container.DataItem, "id_modele") %>, <%# DataBinder.Eval(Container.DataItem, "nbrphotos") %>); return false;">blabla</a> 


My problem is here :
var img = $get('<%=popup_detail.FindControl("Image2").ClientID %>');

I can't get reference to the image2.

I tried
var img = $get('<%=Image2.ClientID %>');
var img = document.getElementById('<%=Image2.ClientID %>');
var img = document.getElementById('<%=popup_detail.FindControl("Image2").ClientID %>');

etc ... without sucess.

Thank you







arnaud
Top achievements
Rank 1
 answered on 09 Sep 2009
4 answers
139 views

Hi Telerik supporters,

In the progress of implementing my task, I met a strange behavior in Telerik Radlistbox control.

I have a Radlistbox with 5 items:

Item1

Item2

Item3

Item4

Item5

Select the first three items (item1, item2, item3); drag these three items and drop at the position after item5 (separator points at end of list box).

Nothing happens meanwhile it should be:

 

Item4

Item5

Item1

Item2

Item3

This occurs for a range of items which is equal or greater than 3. The list box reordering works fine while dropping with only one item.

Is there a work around solution? Any advice are all appreciated.

 

Thanks and regards,

PhuongTo

 

Veselin Vasilev
Telerik team
 answered on 09 Sep 2009
1 answer
156 views
The treeview has two to three levels of nodes with checkboxes (CheckBoxes="True" TriStateCheckBoxes="True" CheckChildNodes="True"). The intention is to allow the user to select one node out of all of them. Upon selecting, all nodes except the one that they have selected are disabled. Upon unchecking the previously checked node, all the nodes within the tree are re-enabled. For some reason this only works as long as the user selects any of the most child nodes within the tree. If an intermediate/parent or root node is selected, it can not be de-selected. Upon debugging I see that I am always getting a value of "e.Node.Checked=true" upon NodeChecked! However the client side code does indicate correctly that the state of the checkbox has changed.

<telerik:RadTreeView ID="TreeViewRoles" runat="server" CheckBoxes="True" TriStateCheckBoxes="True" CheckChildNodes="True" Skin="WebBlue" OnClientNodeChecked="onNodeClicked" OnNodeCheck="TreeViewRoles_NodeCheck" Height="290px"></telerik:RadTreeView>

The following code works just fine if the node is a child most node:

Protected Sub TreeViewRoles_NodeCheck(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles TreeViewRoles.NodeCheck
    
If e.Node.Checkable Then
        
Dim checked As Boolean = e.Node.Checked

        'Assuming that the tri-state was partly an issue this work around was tried but with no effect…

        Dim checkedState As Telerik.Web.UI.TreeNodeCheckState = e.Node.CheckState

        checked = IIf(checkedState = Telerik.Web.UI.TreeNodeCheckState.Checked, True, False)
        
Dim NodeUniqueID As String = e.Node.Attributes("UniqueID").ToString()
        
For Each rootNode As Telerik.Web.UI.RadTreeNode In TreeViewRoles.Nodes
            
EnableNode(rootNode, Not checked, NodeUniqueID)
        
Next
    
End If

End Sub

  

Private Sub EnableNode(ByVal node As Telerik.Web.UI.RadTreeNode, ByVal enable As Boolean, ByVal checkedNodeUniqueID As String)

    If node.Nodes.Count > 0 Then
        
For Each childNode As Telerik.Web.UI.RadTreeNode In node.Nodes
            
EnableNode(childNode, enable, checkedNodeUniqueID)
        
Next
    
End If
    
If node.Attributes("UniqueID").ToString() <> checkedNodeUniqueID Then node.Enabled = enable
    
Debug.Print("Node:" + node.Attributes("UniqueID").ToString() + " Checked: " + node.Checked.ToString() + " / " + PadText(node.CheckState.ToString() + " NodeName: " + node.Text)

End Sub


The following client side code shows that the checkbox's state has changed:

function onNodeClicked(sender, args)

{

    var node = args.get_node();

    alert("Level:" + node.get_attributes().getAttribute("NodeLevel") + "\nChecked:" + node.get_checked() + "\n");

}


Is there something that I am missing with respect to tri-state checkboxes in the nodes? Why am I not getting the checked=false when a user unchecks it?

Yana
Telerik team
 answered on 09 Sep 2009
3 answers
302 views
I have a fixed size RadWindow opening as a modal popup window for my application.  Within this window I have multiple time/date pickers with some near the edge of the window, how can i make the calendar or time popup float above the window rather than make the window's scroll bars appear?  is it even possible since the window is an iFrame and the popups are within the frame?
Shinu
Top achievements
Rank 2
 answered on 09 Sep 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?