Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
132 views
Hi guys,

I'm pretty new to Telerik and was undering if anyone could help. Apologies if this post is in the wrong forum.
I have a RadGrid which contains several RadComboBoxes one of which enables or disables other TextBox controls on the grid at edit. When I add a new row to the RadGrid and select an entry from the ComboBox it correctly disables/enables the TextBoxes on the data entry form. When I return to the same record in the RadGrid to update the entry the TextBoxes are all enabled. Where should I be setting the TextBox state? I've tried to do this in ItemDataBound and ItemCreated.

The other issue can wait until I've got my head around this one.

Thanks for your time.
Nik Yacc
Top achievements
Rank 1
 answered on 18 Aug 2009
3 answers
315 views
I am trying to Refresh my tree view in an update panel on the right hand side of my page when the user drag's and drop's a single or multiple nodes. on the nodeDrop event it pops up an ajax pop up and takes the quantites for the given node to be dropped, on clicking the ok button it saves it to the database and then i want it to do a refresh on the destination node to bring the new quantities through.

am using the new web service method because where loading +5000 nodes.

Protected Sub DataStoreTreeView_NodeDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs)

        Dim sourceNode As RadTreeNode = e.SourceDragNode
        Dim destNode As RadTreeNode = e.DestDragNode
        Dim dropPosition As RadTreeViewDropPosition = e.DropPosition

        Session("SourceDragNode") = sourceNode
        Session("DropPosition") = dropPosition
        Session("DestDragNode") = destNode

        If destNode IsNot Nothing Then
            If sourceNode.TreeView.SelectedNodes.Count <= 1 Then

                'Capture the Quantity
                Me.QuantityTextBox.Text = "1"
                Me.PartListQtyModalPopupExtender.Show()
                Me.OKButton.Attributes.Add("onFocus", "javascript.this.select();")
                CType(Master.FindControl("AJAXScriptManager"), ScriptManager).SetFocus(Me.OKButton)
                Me.DataStoreUpdatePanel.Update()

                PerformDragAndDrop(dropPosition, sourceNode, destNode)

            ElseIf sourceNode.TreeView.SelectedNodes.Count > 1 Then
                For Each node As RadTreeNode In sourceNode.TreeView.SelectedNodes

                   'need to sort
                Next
            End If
        End If

        destNode.Expanded = True
        sourceNode.TreeView.ClearSelectedNodes()
    End Sub

HERE IS THE OK BUTTON I WANT TO REFRESH AFTER.
 Protected Sub OKButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        'Add the dragged item as a new Part List Item

        Dim strDestValue As String = ""
        Dim intEnd As Integer
        ReDim intPLParent(0)

        If CType(Session("DestDragNode"), Telerik.Web.UI.RadTreeNode).Value = "0" Then
            intPLParent(0) = 1
        ElseIf Left(CType(Session("DestDragNode"), Telerik.Web.UI.RadTreeNode).Value, 2) = "PL" Then
            strDestValue = CType(Session("DestDragNode"), Telerik.Web.UI.RadTreeNode).Value
            intEnd = InStr(strDestValue, "~")

            If intEnd > 0 Then
                intPLParent(0) = Mid(strDestValue, 3, intEnd - 3)
            Else
                intPLParent(0) = Mid(strDestValue, 3)
            End If
        Else
            strDestValue = CType(Session("DestDragNode"), Telerik.Web.UI.RadTreeNode).Value
            intEnd = InStr(strDestValue, "~")

            If intEnd > 0 Then
                intPLParent(0) = Mid(strDestValue, 3, intEnd - 3)
            Else
                intPLParent(0) = Mid(strDestValue, 3)
            End If

        End If

        'Adds the Selected nodes from data store to the DB for creating a PartList.
        AddPartListItem(Session("SourceDragNode"), Session("DropPosition"), Session("DestDragNode"))

        If Me.PartListTreeView.Nodes(0).Nodes.Count > 0 Then
            Me.imgDeletePartList.Visible = True
        Else
            Me.imgDeletePartList.Visible = False
        End If

    End Sub

Yana
Telerik team
 answered on 18 Aug 2009
7 answers
785 views
Hi,

I have a RadTextbox and I'd like to set the value with javascript. Here is my code:
            var textbox = $get('<%= RadTextbox1.ClientID%>' + '_text');  
            textbox.set_value('Test');  
 

But I get an error message Object doesn't support this property or method and if I look in detail I can't find any method like set_value in my object on textbox. I use the last Asp.Net Ajax Controls version.
Jon
Top achievements
Rank 1
 answered on 18 Aug 2009
1 answer
109 views
Hello,

I have a RadComboBox in ListVIew control.  So I can't do:

<tel:radComboBox ... SelectedValue='<%# Bind("") %>' />

because I'm currently getting a binding error?

Why is that, and is there a remedy outside of code?  I understand I can manually assign, but it seems like I shouldn't have to tap into the ItemDataBound event just to set SelectedValue property.

Thanks.
Veselin Vasilev
Telerik team
 answered on 18 Aug 2009
6 answers
162 views
I am using wcf service to bind rad grid(Q1 2009) via client. I am using item template column and when I change page size, I need to bind grid server side(because when I change page size just data retrieve and template column can't load).

anyone help me?
thank.

Tsvetoslav
Telerik team
 answered on 18 Aug 2009
4 answers
187 views
Hi

My RadScheduler (dll Version 2009.1.514.35) is data bound using a WebService that is specified using the WebServiceSettings property.
Now I wanted to implement a resource type which allows multiple resources to be selected as in the example "Implementing A Provider That Supports Multi-valued Resources". Unfortunately the Advanced form that should display CheckBoxes instead of a ComboBox for the multi valued resource type doesn't do that. Instead, it still shows the combobox.
If I change my application to use the provider directly (not via WebService) the checkboxes are displayed.

Am I doing something wrong or is this a bug or unimplemented feature?

Thanks and best regards

Christian
Peter
Telerik team
 answered on 18 Aug 2009
3 answers
70 views
hi all.
i use telerik rad control Q1 2009
my problem are
1.when i create rad grid, i didn't see 3 column with default data in there and  i got a test " no records to display".
2. when i chose "enable paging" header and column data show in one column, header and column data have the same width, but when i chose "enable scrolling" header and data column do not have the same width. the column data was auto fit this with the column. you can see this image to understand more . http://www.mediafire.com/?sharekey=fef78bbb2fe55b6ed2db6fb9a8902bda
if you need more information please tell me.
please help me, thank all
Iana Tsolova
Telerik team
 answered on 18 Aug 2009
1 answer
135 views

I'm loading a tooltip on demand using RadTooltipManager.  The tooltip displays fine, but throws an exception in javascript when it is closed.  I implemented the centering javascript code to center the tooltip in the screen (as in the Telerik example), and that seems to be what is causing the problem.  When I take the call out, there is no error.  But then, my tooltip isn't centered.  Anyone have any ideas what I'm doing wrong?

Thanks!

 

 

 

 

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" HideEvent="ManualClose" Position="Center" ShowEvent="OnClick" RelativeTo="BrowserWindow" OnClientBeforeShow="OnClientBeforeShow" OnAjaxUpdate="OnAjaxUpdate" >

 

 

</telerik:RadToolTipManager>

 

 

 

<asp:Repeater ID="repeaterResults" runat="server" OnItemDataBound="RepeaterResults_ItemDataBound" Visible="False">

 

<HeaderTemplate>

 

<div class="additionalimagestitle">Additional Tree Images:</div>

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

 

<div class="additionalimages_public">

 

<div class="addimage_public"><asp:Image runat="server" ID="Image" /></div>

 

<div class="addimage_public_title"><asp:Label runat="server" ID="AddImageName"><%# Eval("Name").ToString().Replace("_thumb","") %></asp:Label></div>

 

</div>

 

</ItemTemplate>

 

</asp:Repeater>

 

 

 

protected void RepeaterResults_ItemDataBound(object sender, RepeaterItemEventArgs e)

 

{

 

 

 

if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)

 

{

((

 

 

Image)e.Item.FindControl("Image")).ImageUrl = "/upfiles/assets/" + DataBinder.Eval(e.Item.DataItem, "Folder").ToString() + "/" + DataBinder.Eval(e.Item.DataItem, "Name").ToString();

 

((

 

 

Image)e.Item.FindControl("Image")).AlternateText = DataBinder.Eval(e.Item.DataItem, "Name").ToString();

 

System.Web.UI.WebControls.

 

 

Image img = (System.Web.UI.WebControls.Image)e.Item.FindControl("Image");

 

 

 

 

if (!Object.Equals(img, null))

 

{

 

 

 

string val = "http://www.huntertrees.com/" + img.ImageUrl.Replace( "_thumb", "" );

 

 

 

 

this.RadToolTipManager1.TargetControls.Add( img.ClientID, val, true );

 

}

}

}

 

 

 

 

 

 

 

protected void OnAjaxUpdate( object sender, ToolTipUpdateEventArgs args )

 

{

 

 

 

Image img = new Image( );

 

img.ImageUrl = 

 

 

args.Value;
//***** WHEN I COMMENT THE NEXT LINE OUT, NO ERROR IS GENERATED ON CLOSE *****

 

 

 

 

 

img.Attributes[

 

 

"onload"] = "centerTooltip(this); this.onload = null;";

 

args.UpdatePanel.ContentTemplateContainer.Controls.Add( img );

}

 

 

Svetlina Anati
Telerik team
 answered on 18 Aug 2009
6 answers
423 views
Can you provide me a sample code to pass parameters to my webservice using XMLHTTPPanel.

Thanks
Mojo
Top achievements
Rank 1
 answered on 18 Aug 2009
7 answers
136 views
I am finding lots of problems with version 2008.3 1314 and IE 8, is version 2008.3 1314 compatible with IE 8?
Paul
Telerik team
 answered on 18 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?