Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
246 views
Hi,

I am using Radupload control to upload files. After successful upload of file if page is refreshed then uploaded file is getting re upload. Please provide a solution. I can not use response.redirect() after first time upload.

Thank you.
Genady Sergeev
Telerik team
 answered on 02 Feb 2015
1 answer
52 views
Hi, 

I have a RadComboBox with Load on Demand activated and data is databound when OnItemsRequested event is fired.
  <telerik:RadComboBox ID="cmbVisualizationTemplates" runat="server"
    EnableLoadOnDemand="true"
    EmptyMessage="Select a template"
    Filter="Contains"
    AllowCustomText="false"
    DataTextField="NAME"
    DataValueField="ID_VISUALIZATION_TEMPLATE"
    OnClientItemsRequesting="selectedTemplatesRequesting"
    OnClientSelectedIndexChanged="selectedTemplateChanged"
    OnItemsRequested="cmbVisualizationTemplates_ItemsRequested"
    Style="width: 135px;">
</telerik:RadComboBox>


How can I show a message "No records found" when no items are returned to ComboBox?

Thanks for your help!

Alfonso
Dimitar Terziev
Telerik team
 answered on 02 Feb 2015
8 answers
594 views
hii,,
How to open radasyncupload window onclick of a radbutton??
thnks
Plamen
Telerik team
 answered on 02 Feb 2015
1 answer
356 views
I am trying to create a prototype for online quiz but stuck , can someone help?
My requirement is to create a quiz which will
1) Add the questions / answers dynamically as steps
2) validate the answers and if it is wrong answer add the question back again in the step so that they can retry

And also

I did achieve most of it except that my data and steps are getting mixed, I am sure there is a better way to do it , please help

And also why RadWizard1_WizardStepCreated called everytime there is a change in step

  protected void RadButton1_Click(object sender, EventArgs e)
        {
            //if (RadNumericTextBox1.Value > 0)
            //{
            RadButton button = (RadButton)sender;
            button.Enabled = false;
            List<data> data = new List<data>();
            data = (List<data>)HttpContext.Current.Session["data"];
            for (int i = 0; i < data.Count; i++)
            {
                RadWizardStep step = new RadWizardStep();
                step.ID = "Question"+(i + 1).ToString();                              
                RadWizard1.WizardSteps.Add(step);
            }
            RadWizardStep completeStep = new RadWizardStep();
            completeStep.ID = "Complete";
            RadWizard1.WizardSteps.Add(completeStep);
            RadWizard1.ActiveStepIndex = RadWizard1.WizardSteps[1].Index;
            //}
        }
  protected void RadWizard1_WizardStepCreated(object sender, Telerik.Web.UI.WizardStepCreatedEventArgs e)
        {
            if (e.RadWizardStep.ID == "Complete")
            {
               //complete logic
            }
            else
            {
                List<Data> data = new List<Data>();
                data = (List<Data>)HttpContext.Current.Session["data"];
                Label label = new Label();
                RadioButtonList list = new RadioButtonList();
                list.AutoPostBack = true;
                list.CausesValidation = true;
                list.SelectedIndexChanged += new EventHandler(list_SelectedIndexChanged);
              
                label.Text = data[e.RadWizardStep.Index - 1].Question;                     
                list.Items.Add(data[e.RadWizardStep.Index - 1].A);
                list.Items.Add(data[e.RadWizardStep.Index - 1].B);
                list.Items.Add(data[e.RadWizardStep.Index - 1].C);
              
                e.RadWizardStep.Controls.Add(label);
                e.RadWizardStep.Controls.Add(new Literal() { Text = "<br />" });
                e.RadWizardStep.Controls.Add(list);
                }
                  
                }          
           
        }
  private void list_SelectedIndexChanged(object sender, EventArgs e)
        {
            RadioButtonList RBL = (RadioButtonList)sender;
            List<data> data = new List<data>();
            data wrongAnswer = new data();
            data = (List<data>)HttpContext.Current.Session["data"];
            string s = RBL.SelectedValue.ToString();
            string y =  data[RadWizard1.ActiveStepIndex-1].Answer;
            if(s.Trim() == y.Trim())
            {
               some logic
            }
            else
            {
                some logic  


List<data> ldata= new List<data>();
data.Add(listQuizData[RadWizard1.ActiveStepIndex - 1]);
HttpContext.Current.Session["data"] = ldata; 
         
RadWizardStep step = new RadWizardStep();
step.ID = " Repeat Question";
RadWizard1.WizardSteps.Add(step);
            }
          
          
         
        }
Boyan Dimitrov
Telerik team
 answered on 01 Feb 2015
6 answers
141 views
im trying to update a radlistview control from an treenodepopulate event. when I click on the tree the event handler fires and tree node is expanded but the radlistview display is not updated and i'm trying to figure out why. I have create a single simple file that shows the issue i'm having. thanks

​
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
 
<!DOCTYPE html>
 
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) {
            PopulateTopNodes();
        }
    }
 
    private void PopulateTopNodes()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("id");
        dt.Columns.Add("parent");
        dt.Columns.Add("value");
        dt.Columns.Add("haschild");
 
        dt.Rows.Add(new object[] { 1, "C:", "Documents", "Yes" });
        dt.Rows.Add(new object[] { 2, "D:", "Files", "No" });
 
        foreach (DataRow row in dt.Rows)
        {
            string parent = row["value"].ToString();
            TreeNode newNode = new TreeNode(row["value"].ToString(), parent);
            newNode.PopulateOnDemand = true;
            newNode.Expanded = false;
            newNode.SelectAction = TreeNodeSelectAction.Expand;
            TreeView1.Nodes.Add(newNode);
        }
    }
 
 
    protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
    {
        if (e.Node.NavigateUrl == "")
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("id");
            dt.Columns.Add("parent");
            dt.Columns.Add("value");
            dt.Columns.Add("haschild");
 
            dt.Rows.Add(new object[] { 1, "Documents", "Music", "Yes" });
            dt.Rows.Add(new object[] { 2, "Files", "Folder", "No" });
 
            foreach (DataRow row in dt.Rows)
            {
 
                string parent = row["parent"].ToString() + @"\" + row["value"].ToString();
                TreeNode newNode = new TreeNode(row["value"].ToString(), parent);
                newNode.SelectAction = TreeNodeSelectAction.Select;
                newNode.Expand();
                newNode.NavigateUrl = "page2.aspx";
                newNode.Expanded = true;
                e.Node.ChildNodes.Add(newNode);
            }
 
            //Populate the RadListView
            DataTable dt2 = new DataTable();
            dt2.Columns.Add("file");
            dt2.Columns.Add("size");
            dt2.Rows.Add(new object[] { "file1.txt", "4kb" });
            dt2.Rows.Add(new object[] { "anotherfile.log", "3mb" });
            this.RadListView1.DataSource = dt2;
            this.RadListView1.Rebind();
        }
    }
</script>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">
    </telerik:RadScriptManager>
 
    <telerik:RadSplitter runat="server" ID="RadSplitter1" Orientation="Vertical" Width="100%" BorderWidth="0" BorderColor="White" Height="760px" BorderSize="0">
         <telerik:RadPane runat="server" ID="MidPane" Scrolling="None" Width="49%" >
              <telerik:RadTabStrip ID="RadTabStrip1" ShowBaseLine="True" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">
                  <Tabs>
                      <telerik:RadTab runat="server" Text="Directory Tree" PageViewID="PageView1" Font-Bold="true" ScrollChildren="true" Selected="True">
                      </telerik:RadTab>
                  </Tabs>
              </telerik:RadTabStrip>
              <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"  Width="99%">
          
                 <telerik:RadPageView ID="PageView1" runat="server" width="100%" height="660px">                     
         
                        <asp:TreeView ID="TreeView1" runat="server" OnTreeNodePopulate="TreeView1_TreeNodePopulate"
                            ImageSet="XPFileExplorer" NodeIndent="15" ShowLines="false">
                            <ParentNodeStyle Font-Bold="False" />
                            <HoverNodeStyle Font-Underline="False" ForeColor="Black" />
                            <SelectedNodeStyle Font-Underline="False" Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black"
                                HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
                            <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                                NodeSpacing="0px" VerticalPadding="2px" />
                        </asp:TreeView>
                     
                 </telerik:RadPageView>
                </telerik:RadMultiPage>
 
        </telerik:RadPane>
 
        <telerik:RadPane runat="server" ID="RadPane1" Scrolling="None" Width="49%">
                 
              <telerik:RadTabStrip ID="RadTabStrip2" ShowBaseLine="True" runat="server" MultiPageID="RadMultiPage1" Skin="Office2007" SelectedIndex="0">
                  <Tabs>
                      <telerik:RadTab runat="server" Text="Details" PageViewID="PageView1" Font-Bold="true" ScrollChildren="true" Selected="True">
                      </telerik:RadTab>
                  </Tabs>
              </telerik:RadTabStrip>
 
              <telerik:RadMultiPage ID="RadMultiPage2" runat="server" SelectedIndex="0"  Width="99%">
                 <telerik:RadPageView ID="RadPageView1" runat="server" width="100%" height="660px">
                         
                     <telerik:RadListView ID="RadListView1" runat="server" AllowPaging="false" ItemPlaceholderID="itemPlaceholder">
                         <LayoutTemplate>
                            <table style="width: 730px; background-color: #D9DFDF;">
                                <tr>
                                    <th id="Th1" runat="server">
                                        Name
                                    </th>
                                    <th id="Th2" runat="server">
                                        Size
                                    </th>
                                </tr>
                                <tr runat="server" id="itemPlaceholder" />
                            </table>
                        </LayoutTemplate>
                        <EmptyDataTemplate>
                            No files in this folder.
                        </EmptyDataTemplate>
                        <ItemTemplate>
                            <tr id="Tr2" runat="server" >
                                <td>
                                    <asp:Label ID="Name" runat="Server" Text='<%#Eval("file") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="Size" runat="Server" Text='<%#Eval("size") %>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </telerik:RadListView>
                 </telerik:RadPageView>
                </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
     
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="TreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    </form>
</body>
</html>
Jason Bourdette
Top achievements
Rank 1
 answered on 31 Jan 2015
2 answers
172 views
I have toyed around with adding title="test" to the <tr> and <td> tags that get generated when sending the RadGrid to Excel with no success.  Is there a way with HTML Excel to push tooltips across?
Dan
Top achievements
Rank 1
 answered on 30 Jan 2015
3 answers
333 views

 

Hello,

<
telerik:GridTemplateColumn UniqueName="StatusColumn" HeaderText="Approved Status">

 

 

<ItemTemplate>

 

 

<asp:Label id="lblStatus" runat="server">

 

<%

# DataBinder.Eval(Container.DataItem, "status") %>

 

 

</asp:Label>

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:DropDownList id="ddlApprovalStatus" runat="server" />

 

 

</EditItemTemplate>

 

 

<ItemStyle Width="40px" />

 

 

</telerik:GridTemplateColumn>

I need to find this lblStatus in ItemDataBound event. How can i do that?
I tried these ways, but always got Null in labelStatus

 

 


Label
labelStatus = (Label)item["StatusColumn"].FindControl("labelStatus");

 

 

 

Label

 

labelStatus = (Label)((Telerik.Web.UI.GridEditableItem)(e.Item)).Parent.FindControl("labelStatus");

 

 

 


Thanks
Amarinder

Pedro
Top achievements
Rank 1
 answered on 30 Jan 2015
1 answer
160 views
I have been trying to figure out how to get the Click event of a button that  is created in an ITemplate for a menu item to bubble up to the top menu item layer.

I have a multi layer menu (for an intranet site, multiple top level and children/children layers)

Within one, I have created a 2nd generation child that spawns another child that has a custom template the adds a text box and a button for a quick entry method.

 MAIN MENU / IT / DO SOMETHING / (iTemplate Textbox + Button)

What I need is to be able to (hopefully) to capture the event at the menu item click event to handle the event in the same page and not in the ITemplate (I am able to intercept the click event in the ITemplate class)

The Menu Item Createion is a follows:

Dim _JobLines As New RadMenuItem
_JobLines.Text = "Clear Job Lines"


.Add(_JobLines) ' Adds to the parent menu

Dim _JobLinesTextBox As New RadMenuItem ' This is the menu item with the custom ITemplate instantiation
Dim _template As New Custom_Rad_Templates.TextBoxTemplate()
_template.InstantiateIn(_JobLinesTextBox)

_JobLines.Items.Add(_JobLinesTextBox)

ITemplate Class:

Class TextBoxTemplate
Implements ITemplate

Public Event Go_Click(sender As Object, e As EventArgs)

Public Sub InstantiateIn(ByVal container As Control)
Dim txtEntry As New TextBox()
txtEntry.ID = "txtEntry"
Dim cmdGo As New Button
cmdGo.ID = "cmdGo"
cmdGo.Text = "Go"


AddHandler cmdGo.Click, AddressOf cmdGo_Click
container.Controls.Add(txtEntry)
container.Controls.Add(cmdGo)

End Sub

Public Sub cmdGo_Click(sender As Object, e As EventArgs)

         RaiseEvent Go_Click(Me, e) ' (This is where I lose the event)
End Sub


Public Sub InstantiateIn1(container As Control) Implements ITemplate.InstantiateIn

End Sub
End Class


Im sure this has been done before, just cant find any clear help on the issue.

Thanks
​
Boyan Dimitrov
Telerik team
 answered on 30 Jan 2015
1 answer
224 views
Hello,

I'm having a lot of trouble figuring this out.  I have a web user control that loads inside a tabstrip tab.  This user control has a button on it.  When the user clicks on this button a RadPageView is loaded with another web user control as a modal popup window.  The modal window has several RadComboBoxes and a few RadTextBoxes.  I want to use a CustomValidator(s) to validate the combobox(s). If nothing has been selected the validation should fail.  The CustomValidator has the setting for ClientValidationFunction set for a JavaScript function.  I cannot get my code to execute the client-side validation function for the CustomValidator.

If anyone can help me figure this out I'd really appreciate it.  I've been struggling with this for the past week. 

Thanks.

The button and the validation summary are ajaxified within the RadAjaxManager that resides in the Master Page for the application:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" ClientIDMode="Static">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnAdd">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnAdd" />
                <telerik:AjaxUpdatedControl ControlID="pnlValidatorSummary" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

This is the markup for the RadWindow:
<telerik:RadWindowManager ID="rwmWindowManager" runat="server" EnableEmbeddedSkins="true" Skin="Metro" PreserveClientState="true">
    <Windows>
        <telerik:RadWindow ID="rdwAddNewAHU" runat="server" Modal="true" OnInit="rdwAddNewAHU_Init"
            Height="550" Width="600" Behaviors="Close" DestroyOnClose="true" ReloadOnShow="true" ShowContentDuringLoad="false" OnClientClose="OnClientClose">
            <ContentTemplate>
                <telerik:RadMultiPage ID="rmpAddNewAHU" runat="server" SelectedIndex="0">
                </telerik:RadMultiPage>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
 
<asp:Button ID="btnAddNewAHU" runat="server" OnClientClick="openwin();return false" Text="Add New AHU" Visible="false" />
 
<telerik:RadScriptBlock ID="rsbInventory" runat="server">
    <script type="text/javascript">
        function openwin() {
            window.radopen(null, "rdwAddNewAHU");
        }
    </script>
</telerik:RadScriptBlock>

This is the code I use to load the RadPageView with the popup user control:
private void LoadMyUserControl(string controlName, Control parent)
{
    parent.Controls.Clear();
    RadPageView pageView = new RadPageView();
    UserControl ctrl = (UserControl)LoadControl(controlName);
    string userControlID = controlName.Split('.')[0];
    ctrl.ID = userControlID.Replace("/", "").Replace("~", "");
    pageView.Controls.Add(ctrl);
    parent.Controls.Add(pageView);
}
 
protected void rdwAddNewAHU_Init(object sender, System.EventArgs e)
{
    int roleID = ApplicationInformation.GetRoleID();
     
 
    switch (roleID)
    {
        case 1: //Read Only
            btnAddNewAHU.Visible = false;
            break;
        default: //Suggesters and Approvers
            btnAddNewAHU.Visible = true;
            LoadMyUserControl(@"~/Modules/EspsMT/wucInventoryAddAHU.ascx", rmpAddNewAHU);
            rdwAddNewAHU.OpenerElementID = btnAddNewAHU.ClientID;
            break;
    }           
}

This is the markup for my popup user control "wucInventoryAddAHU.ascx":
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wucInventoryAddAHU.ascx.cs" Inherits="FACApps.Module.ESPSMT.wucInventoryAddAHU" %>
 
<telerik:RadScriptBlock ID="rsbInventory" runat="server">
    <script type="text/javascript">
    <!--Initialize the controls on the popup window during close-->
    function OnClientClose(sender, eventArgs) {
        var comboBoxes = ['cmbBuildings',
            'cmbAHUManufacturers',
            'cmbAHUTypes',
            'cmbAHUConfigurations',
            'cmbAHUHousingVersion',
            'cmbAHUSpecialUse',
            'cmbAHULocation',
            'cmbAHUCanisters',
            'cmbAHUCommissionMonth',
            'cmbAHUCommissionYear'];
 
        var textBoxes = ['txtAHUUnitTag',
            'txtAHUAccessRequirements',
            'txtAHUComments'];
 
        for (i in comboBoxes) {
            ctrl = comboBoxes[i];
            comboBox = $find(ctrl);
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).select();
            comboBox.updateClientState();
            comboBox.commitChanges();
        }
 
        for (i in textBoxes) {
            ctrl = textBoxes[i];
            textBox = $find(ctrl);
            textBox.set_value(null);
        }
 
        document.getElementById('vsValidationSummary').style.display = 'none';
    }
 
    function clientValidationBuildings(sender, args) {
        if ($find("<%=cmbBuildings.ClientID%>") > 0) {
            alert("valid");
            arg.IsValid = true;
            }
            else {
            alert("not valid");
            arg.IsValid = false;
            }
        }
    </script>
</telerik:RadScriptBlock>
 
<div style="margin-left: 10px;">
    <asp:Panel ID="pnlValidatorSummary" runat="server">
        <asp:ValidationSummary ID="vsValidationSummary" runat="server" Width="480px" BorderStyle="None" ForeColor="Red" HeaderText="* Please enter required values." ClientIDMode="Static" ValidationGroup="vgp"></asp:ValidationSummary>
    </asp:Panel>
</div>
<div style="margin-left: 10px;">
    <p>Select a building:</p>
 
    <telerik:RadComboBox ID="cmbBuildings" runat="server" Width="480" MaxHeight="300" OnDataBound="cmbBuildings_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true" ValidationGroup="vgp"></telerik:RadComboBox>
    <asp:CustomValidator ID="cv" ValidateEmptyText="true" ClientValidationFunction="clientValidationBuildings" EnableClientScript="true" ControlToValidate="cmbBuildings" runat="server" ValidationGroup="vgp">*</asp:CustomValidator>
 
 
    <hr />
 
    <p>Enter New Air Handler Unit Details:</p>
 
    <asp:Label runat="server">Air Handling Unit Tag:</asp:Label><telerik:RadTextBox ID="txtAHUUnitTag" runat="server" ClientIDMode="Static"></telerik:RadTextBox><br />
 
    <asp:Label runat="server">Select Manufacturer:</asp:Label><telerik:RadComboBox ID="cmbAHUManufacturers" runat="server" MaxHeight="150" OnDataBound="cmbAHUManufacturers_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
    <br />
 
    <asp:Label runat="server">Select Type:</asp:Label><telerik:RadComboBox ID="cmbAHUTypes" runat="server" MaxHeight="150" OnDataBound="cmbAHUTypes_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Select Configuration:</asp:Label><telerik:RadComboBox ID="cmbAHUConfigurations" runat="server" MaxHeight="150" OnDataBound="cmbAHUConfigurations_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Select Housing Version:</asp:Label><telerik:RadComboBox ID="cmbAHUHousingVersion" runat="server" MaxHeight="150" OnDataBound="cmbAHUHousingVersion_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Special Use:</asp:Label><telerik:RadComboBox ID="cmbAHUSpecialUse" runat="server" MaxHeight="150" ClientIDMode="Static" NoWrap="true">
        <Items>
            <telerik:RadComboBoxItem Text="--Select--" Value="-1" />
            <telerik:RadComboBoxItem Text="No" Value="0" />
            <telerik:RadComboBoxItem Text="Yes" Value="1" />
        </Items>
    </telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Select Location:</asp:Label><telerik:RadComboBox ID="cmbAHULocation" runat="server" MaxHeight="150" OnDataBound="cmbAHULocation_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Access Requirements:</asp:Label><telerik:RadTextBox ID="txtAHUAccessRequirements" runat="server" Rows="1" ClientIDMode="Static"></telerik:RadTextBox><br />
 
    <asp:Label runat="server">Canisters:</asp:Label><telerik:RadComboBox ID="cmbAHUCanisters" runat="server" MaxHeight="150" ClientIDMode="Static" NoWrap="true">
        <Items>
            <telerik:RadComboBoxItem Text="--Select--" Value="-1" />
            <telerik:RadComboBoxItem Text="0" Value="0" />
            <telerik:RadComboBoxItem Text="3" Value="3" />
        </Items>
    </telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Comments:</asp:Label><telerik:RadTextBox ID="txtAHUComments" runat="server" Rows="5" ClientIDMode="Static"></telerik:RadTextBox><br />
 
    <asp:Label runat="server">Test/Commission Month:</asp:Label><telerik:RadComboBox ID="cmbAHUCommissionMonth" runat="server" MaxHeight="150" OnDataBound="cmbAHUCommissionMonth_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Label runat="server">Year:</asp:Label><telerik:RadComboBox ID="cmbAHUCommissionYear" runat="server" MaxHeight="150" OnDataBound="cmbAHUCommissionYear_DataBound" AllowCustomText="false" ClientIDMode="Static" NoWrap="true"></telerik:RadComboBox>
 
    <br />
 
    <asp:Button ID="btnAdd" runat="server" Text="Enter Air Handler" OnClick="btnAdd_Click" CausesValidation="true" ValidationGroup="vgp" />
</div>

This is the server-side code for the button 'btnAdd':
protected void btnAdd_Click(object sender, EventArgs e)
{
    if (Page.IsValid)
    {
        int roleID = ApplicationInformation.GetRoleID();
        switch (roleID)
        {
            case 3: // Suggesters
            case 5: // Suggesters
                //Perform some task
                break;
            case 7: // Approvers
            case 9: // Approvers
                //Perform some task
                break;
        }
    }
}









Shawn
Top achievements
Rank 1
 answered on 30 Jan 2015
15 answers
612 views
Hi,

I am using telerik dropdowntree with webservice binding as suggested in this link http://demos.telerik.com/aspnet-ajax/dropdowntree/examples/populatingwithdata/webserviceandclienttemplates/defaultcs.aspx

My requirement is to get selected item from database and show selected item in dropdowntree with webservice  demand on load. I need solution to this as soon as possible, could you please suggest a way?
Ivan Danchev
Telerik team
 answered on 30 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?