Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
137 views
Hi,

is it possible to create the context menus dynamically in the client side? And further more is it possible to created them based on some appointment properties? 

I'm looking the documentation but it doesn't say anything regarding that.

regards,

jose
Veronica
Telerik team
 answered on 29 Apr 2011
4 answers
78 views
Hi,

I am using the Radfilter in my vb.net(2008) project.I am using the RadTreeview as the radcomboboxItem in the datafield editor.I mange to build the control dynamically.But when I add new rows for the filter,previously selected value is set to empty.

Please help on this issue..
Public Overrides Sub InitializeEditor(ByVal container As System.Web.UI.Control)
        _combo = New RadComboBox()
        _combo.ID = "MyCombo"
        _combo.Width = 200
        _combo.Height = 180
  
  
        'For the Treeview
        Dim treeItem As New ItemTemplateTreeView(CreateDataSource())
        _combo.ItemTemplate = treeItem
        Dim item As New RadComboBoxItem()
        _combo.Items.Add(item)
        _combo.OnClientDropDownOpened = "OnClientDropDownOpenedHandler"
               container.Controls.Add(_combo)
  
    End Sub
  
  
Public Overrides Function ExtractValues() As System.Collections.ArrayList
        Dim list As ArrayList = New ArrayList()
        list.Add(DirectCast(_combo.Items(0).FindControl("myTreeview"), RadTreeView).SelectedValue)
        Return list
    End Function
  
Public Overrides Sub SetEditorValues(ByVal values As System.Collections.ArrayList)
          
        If Not values Is Nothing And values.Count > 0 Then
            If values(0) Is Nothing Then
                Return
            End If
            'Dim item As RadComboBoxItem = _combo.FindItemByValue(values(0).ToString())
            Dim item As RadTreeNode = DirectCast(_combo.Items(0).FindControl("myTreeview"), RadTreeView).FindNodeByValue(values(0).ToString())
            'If Not item Is Nothing Then
                item.Selected = True
                _combo.Items(0).Text = item.Text
            '   _combo.Items(0).Value = item.Value
            End If
             
        End If
    End Sub
  
Protected Function CreateDataSource() As DataTable
        Dim dataTable As New DataTable()
        dataTable.Columns.Add(New DataColumn("Key", GetType(String)))
        dataTable.Columns.Add(New DataColumn("Name", GetType(String)))
        dataTable.Columns.Add(New DataColumn("ParentId", GetType(String)))
  
        Dim AnalysItems As AnalysListItemList = TryCast(DataSource, AnalysListItemList )
  
        For Each item As CategoryValueListItem In AnalysItems
            Dim dr As DataRow = dataTable.NewRow()
            dr("Key") = item.Key
            dr("Name") = item.Name
            If item.Category = item.Key Then
                dr("ParentId") = DBNull.Value
            Else
                dr("ParentId") = item.Category            End If
            dataTable.Rows.Add(dr)
        Next
        Return dataTable
    End Function
  
Public Class ItemTemplateTreeView
    Implements ITemplate
  
    Private dataTable As DataTable
    Public Sub New(ByVal _dataTable As DataTable)
        '
        ' TODO: Add constructor logic here
        '
        Me.dataTable = _dataTable
    End Sub
    Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
        Dim div As New HtmlGenericControl("div")
        div.ID = "div1"
        div.Attributes.Add("onclick", "StopPropagation(event);")
  
        Dim tree As New RadTreeView()
        Dim item As RadComboBoxItem = DirectCast(container, RadComboBoxItem)
  
        tree.ID = "myTreeView"
        tree.OnClientNodeClicking = "nodeClicking"
        tree.DataTextField = "Name"
        tree.DataFieldID = "Key"
        tree.DataValueField = "Key"
        tree.DataFieldParentID = "ParentId"
        tree.DataSource = dataTable
        tree.DataBind()
  
        div.Controls.Add(tree)
        container.Controls.Add(div)
  
  
    End Sub
  
End Class
Radoslav
Telerik team
 answered on 29 Apr 2011
1 answer
58 views

Hi


I use this on my application , everything is a goof on local,but when i upload project on my hosting space ,many time i got out of memory error in this page . i like it .please help,
is exist any better solution ?
thanks .
Radoslav
Telerik team
 answered on 29 Apr 2011
1 answer
38 views
Ok, so I have a Toolbar which is Width="100%"

The Left side of the toolbar needs Next\Previous buttons, while Right Aligned there needs to be a templated RadCombo container

How can I do this with the control?....is it an option?
Kate
Telerik team
 answered on 29 Apr 2011
1 answer
118 views
I'm hoping for some troubleshooting guidance.  I just installed RadControls for ASP.NET AJAX Q1 2011 SP1.  While there is a Telerik menu, the only menu item in it is "About".

Shouldn't there be something about Upgrade Project...?

Right now we have the Telerik.Web.UI.dll in our BIN directory. Should manually replace that  (just copy / paste over it), or is there a "better" way to make sure references and all that are all squared away?

Erjan Gavalji
Telerik team
 answered on 29 Apr 2011
3 answers
542 views
I have a user control that is taking a long time to load (15-20 seconds) mainly because there are many data entry fields and loops to load each field. It is optimized as best I can (one db roundtrip, caching, etc.), but it has nested RadTabStrip controls and other things.

How can I allow a page to load and then, after it has loaded, fire off a server-side (update panel?) call to load my custom user control? Ideally, I want a progress bar that I can interact with as the user control loads.

So, in theory:

1. Page loads.
2. OnLoad, the user control is initialized.
3. A progress bar is displayed in place of the user control.
4. Events fired in the child controls bubble up to the Page to update the progress bar.
5. After the control is loaded, the progress bar is removed and the user control is displayed.

Is this possible using the TelerikRadAjaxManager and Telerik progress bar?
Iana Tsolova
Telerik team
 answered on 29 Apr 2011
4 answers
129 views
I have a pretty simple page.  I have an Ajax Manager, two Ajax Panels and a very few other controls outside of either panel.  In the top Panel, it is just two radio buttons.  Depending on which button is clicked, I want the bottom panel to hide or unhide using the panel's .visible property.  The default is hidden when the page loads.  I have  breakpoint in my code (VS2010) for the _CheckedChanged event of both radio buttons and when I click the radio buttons, neither one seems to fire these event.

All I want to do is show or hide the lower panel full of controls.


AjaxManger code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rbDonationTypeGeneral">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlILMO" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rbDonationILMO">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlILMO" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>


Radio-button Panel: (that hides/unhides ILMO panel below)
<telerik:RadAjaxPanel ID="pnlDonationType" runat="server" height="59px"
    width="300px">
    <asp:RadioButton ID="rbDonationTypeGeneral"
        runat="server"
        Checked="True"
        GroupName="grpDonationType"
        Text="   General Donation" />
    <br />
    <asp:RadioButton ID="rbDonationILMO"
        runat="server"
        GroupName="grpDonationType"
        Text="   In Loving Memory Of..." />
</telerik:RadAjaxPanel>




ILMO Panel:  (this is the panel that hides or un-hides depending on which radio button is selected above)
<telerik:RadAjaxPanel ID="pnlILMO" runat="server" height="373px" width="717px" Visible="False">
    A charitable contribution has been made to the Foundation:
    <br />
    <br />
    <b>In loving memory of:</b>
        <telerik:RadTextBox ID="txtILMO_Name"
            Runat="server"
            Width="175px"
            Wrap="False">
        </telerik:RadTextBox>
         
    Cared for in (city):
        <telerik:RadTextBox ID="txtHospiceCity"
            Runat="server"
            Width="175px"
            Wrap="False">
        </telerik:RadTextBox>
        <br />
        By (donor):
        <telerik:RadTextBox ID="txtDonorName"
            Runat="server"
            Width="260px"
            Wrap="False">
        </telerik:RadTextBox>
             
    E-mail:
        <telerik:RadTextBox ID="txtDonorEmail"
            Runat="server"
            Width="246px"
            Wrap="False">
        </telerik:RadTextBox>
        <br />
        Phone:
        <telerik:RadMaskedTextBox ID="txtDonorPhone"
            runat="server"
            Mask="(###) ###-####"
            Width="80">
        </telerik:RadMaskedTextBox>
            
    Address:
        <telerik:RadTextBox ID="txtDonorAddress"
            Runat="server"
            Width="452px"
            Wrap="False">
        </telerik:RadTextBox>
        <br />
        City:
        <telerik:RadTextBox ID="txtDonorCity"
            Runat="server"
            Width="260px"
            Wrap="False">
        </telerik:RadTextBox>
            
    State:
        <telerik:RadComboBox ID="cmbDonorState"
            Runat="server"
            DataSourceID="USStates"
            DataTextField="name"
            DataValueField="abbreviation"
            MarkFirstMatch="True"
            Skin="Forest" Width="150px">
        </telerik:RadComboBox>
            
    Zip:
        <telerik:RadTextBox ID="txtDonorZip"
            Runat="server"
            Width="103px"
            Wrap="False"
            MaxLength="10">
        </telerik:RadTextBox>
        <br />
        <br />
        <br />
        <b>Please send an acknowledgement to:</b><br /> Name:
        <telerik:RadTextBox ID="txtAcknowledgement_Name"
            Runat="server"
            Width="622px"
            Wrap="False">
        </telerik:RadTextBox>
        <br />
        Address:
        <telerik:RadTextBox ID="txtAcknowledgement_Address"
            Runat="server"
            Width="608px"
            Wrap="False">
        </telerik:RadTextBox>
        <br />
        City:
        <telerik:RadTextBox ID="txtAcknowledgement_City"
            Runat="server"
            Width="260px"
            Wrap="False">
        </telerik:RadTextBox>
            
    State:
        <telerik:RadComboBox ID="cmbAcknowledgement_State"
            Runat="server"
            DataSourceID="USStates"
            DataTextField="name"
            DataValueField="abbreviation"
            MarkFirstMatch="True"
            Skin="Forest"
            Width="150px">
        </telerik:RadComboBox>
            
    Zip:
        <telerik:RadTextBox ID="txtAcknowledgement_Zip"
            Runat="server"
            Width="105px"
            Wrap="False">
        </telerik:RadTextBox>
    <br />
    <br />
    <br />
</telerik:RadAjaxPanel>






Event code of the radio buttons:
Protected Sub rbDonationTypeGeneral_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbDonationTypeGeneral.CheckedChanged
    pnlILMO.Visible = False
End Sub
 
Protected Sub rbDonationILMO_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbDonationILMO.CheckedChanged
    pnlILMO.Visible = True
End Sub


Can someone please tell me what I'm missing or doing wrong.  Thanks.
Iana Tsolova
Telerik team
 answered on 29 Apr 2011
2 answers
333 views

How do I setup RadGrid.SelectedIndexChanged programatically?  I get the following error

"No overload for 'RadGrid1_SelectedIndexChanged' matches delegate 'System.EventHandler' "

I am trying to capture when the user clicks the "Go" button


:
:
:
RadGrid RadGrid1 = new RadGrid();
RadGrid1.DataSourceID = "SqlDataSource1";
RadGrid1.MasterTableView.DataKeyNames = new string[] { "Jobnumber" };
RadGrid1.Skin = "Default";
RadGrid1.Width = Unit.Percentage(100);
RadGrid1.PageSize = 5;
RadGrid1.AllowPaging = true;
RadGrid1.AllowSorting = true;
RadGrid1.AutoGenerateColumns = false;
RadGrid1.MasterTableView.PageSize = 15;
RadGrid1.GridLines = GridLines.Both;
RadGrid1.SelectedIndexChanged +=new EventHandler(RadGrid1_SelectedIndexChanged);  // Not work Generates error
:
:
:
       GridButtonColumn buttonColumn = new GridButtonColumn();
       buttonColumn.HeaderText = "Select File";
       buttonColumn.CommandName = "Select";
       buttonColumn.ButtonType = GridButtonColumnType.PushButton;
       buttonColumn.Text = "Go";
       buttonColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;

       RadGrid1.MasterTableView.Columns.Add(buttonColumn);
:
:
:
:



    protected void RadGrid1_SelectedIndexChanged(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Select")
        {
 
        }

    }







Pat
Top achievements
Rank 1
 answered on 29 Apr 2011
1 answer
115 views
I have two related menu's a horizontal top menu and a vertical childmenu

In the top menu I only want to show one level of items ie. those that are child of root! (level1)
and in the vertical menu I want to show child items of current selected item (level2,3 and 4 in a treeview)

when I select an item level1 in the radmenu it gets highlighted and when I select an item level 2,3 or 4 in the treeview I want the level 1 parent item in the radmenu to be highlighted as this does work when I dont have MaxDataBindDepth="1" in the Radmenu but then I get the dropdown menu showing all child items which I dont want. Is there a way of solving this with another function than MaxDataBindDepth="1" I saw MaxLevel in the documentation but it didnt work. (My client has RadControls ASP.NET-AJAX 2011Q1)

(MasterPage)
<
tr:RadMenu ID="mnuNavRoot" runat="server" MaxDataBindDepth="1" Flow="Horizontal" DataSourceID="smdsNav" /> 
<asp:SiteMapDataSource ID="smdsNav" runat="server" ShowStartingNode="false" SiteMapProvider="AspNetSqlSiteMapProvider" /> 
  
(ASPX Page)
 <tr:RadTreeView ID="tvNaviMain" runat="server" ShowLineImages="false" DataSourceID ="smds1">
</tr:RadTreeView
<asp:SiteMapDataSource ID="smds1" runat="server" ShowStartingNode="false" SiteMapProvider="AspNetSqlSiteMapProvider" /> 

If root = true Then 
     tvNaviMain.MaxDataBindDepth = 1
Else 
     smds1.StartingNodeOffset = 1 
End If

 

 

Any suggestions?

 

 

 

 

 

 

Magnus
Top achievements
Rank 2
 answered on 29 Apr 2011
1 answer
162 views
Good day,
Is it possible to call a tooltip on checkbox click and then call different content inside said tooltip when the checkbox is unchecked? - How exactly would I go about that?
Thanks so much!
Marin Bratanov
Telerik team
 answered on 29 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?