Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
200 views
I am needing to use a javascript function to total 5 textboxes as the user types in a money value all within the EditForm template.Normally I just view the source of the web page to grab the funky name that asp.net gives controls but I cannot see the source of the Edit template. My function needs the names of the textboxes to work. Has anyone done this?

Thanks,
Sam


Sam
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
96 views
Hello,

Is there a way to change the name of an uploaded image?  For example the image uploaded maybe named "figure 1.jpg" and I would like to change it to "figure-1.jpg".

Thank You,
Alex
Fiko
Telerik team
 answered on 11 Aug 2009
1 answer
40 views
Hi,

We are developing a project with Telerik Q1 2008 version, and now we were thinking in upgrade to Telerik Q2 2009 version.
Is possible to have both Telerik version in the same project and step by step upgrade each page of our project to Telerik Q2 2009 version.
Or if we want to upgrade to Telerik 2009 Q2 we need to upgrade all project controls.

Thanks, David.
Paul
Telerik team
 answered on 11 Aug 2009
1 answer
90 views
Hi guys,

I have a page with a RadTextBox and asp button on it.  The intention is that a user enters a value into the RadTextBox and hits return.  When they hit return I would like the on_click event for the button to fire.

How do I ensure this happens?

Thanks
Missing User
 answered on 11 Aug 2009
1 answer
127 views
Hi,

I would like to add context menu to my scheduler dynamically - based on one of the custom attributes to show different menu items for each appointment. Is it possible? I couldn't find any examples for this scenario.

Thanks,
Julia
Peter
Telerik team
 answered on 11 Aug 2009
2 answers
125 views
I have a RadGrid (radgrid1) with a FormTemplate. In the FormTemplate there is a TextBox (txtMyValue) and another RadGrid (radgrid2) which has set EditMode to InPlace. When radgrid2_updatecommand is firing, i want to update txtMyValue.Text. How can I reference txtMyValue from radgrid2?

var txtMyValue = radgrid1.MasterTableView.FindControl("txtMyValue") as TextBox -> is giving a null exception.

Anyone?
Roy Halvorsen
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
84 views
Hi There

I've just installed it and run into an issue that I could solve with a other control vender.
I would like to show all possible zip codes as an auto-complete type of list.

I would get the values from a Like expression on my database, ideal via a web service I wrote for this.
Having the zip code I could then set the city as well or show all cities that have a zip code (more like tiny towns ;-) )

How would I do that? Played a bit with the AjaxControlToolkit but did not seem to work to well for me.

Any one have a sugestion?

Thanks

Walter
walter verhoeven
Top achievements
Rank 1
 answered on 11 Aug 2009
6 answers
181 views
I have a RadGrid that contains a TempletedColumnn containing a RadToolBar.  If I add buttons to the toolbar directly, they actually fire the OnClientButtonClicked event as expected.  However, If I add a RadToolBarDropDown, it never expands on click.  It seems like is just fires a postback and the grid row is selected.   Regular RadToolBrButtons do not cause the grid to postback.   What do I need to do to get the RadToolBarDropDown to expand so I can select a child Button?

Thanks, Randy
Veli
Telerik team
 answered on 11 Aug 2009
5 answers
180 views
Hi
I a have a usercontrol that i'm using as an editform for a radgrid. Within the usercontrol there are more than one radcombobox . Two of these combo boxes are country and locations combos. The locations combo depends on the countries combo.  When the selection in the countries combo box change a different set of locations should load in the locations combo.  I wanted to achieve that using the client side events for the combos. I tried to use the code below which is from one of the demos on Telerik website which is using the OnClientSelectedIndexChanging and OnClientItemsRequested events. What is happning in my case is that whenever I set the client side events on these two combos all combos including these two combos stop responding. The dropdowns stop working and don’t expand.  I can't find what is causing this problem Please help me???

This is the client side code I’m using

<script type="text/javascript">

    //global variables for the countries Combo

    var locationsCombo;

    function pageLoad() {

        // initialize the global variables

        // in this event all client objects

        // are already created and initialized

 

        locationsCombo = $find("<%= RadComboLocation.ClientID %>");

    }

    function LoadLocations(combo, eventArqs) {

        var item = eventArqs.get_item();

 

        locationsCombo.set_text("Loading...");

        // this will fire the ItemsRequested event of the

        // locations combobox passing the countryID as a parameter

        locationsCombo.requestItems(item.get_value(), false);

    }

 

    function ItemsLoaded(combo, eventArqs) {

        if (combo.get_items().get_count() > 0) {

            // pre-select the first item

            combo.set_text(combo.get_items().getItem(0).get_text());

            combo.get_items().getItem(0).highlight();

        }

        combo.showDropDown();

    }

</script>  

This is the code for both combos on the ascx pag

<telerik:RadComboBox ID="RadComboCountry" runat="server" AppendDataBoundItems="True"

                        BorderStyle="None" CssClass="DropdownControlGridFormEditor" EnableScreenBoundaryDetection="False"

                        ListTextField="Text" ListValueField="Code" Skin="Outlook" OnClientSelectedIndexChanging="LoadLocations"

                        OnItemsRequested="RadComboCountry_ItemsRequested">

                        <CollapseAnimation Duration="200" Type="OutQuint" />

                    </telerik:RadComboBox>

<telerik:RadComboBox ID="RadComboLocation" runat="server" BorderStyle="None" CssClass="DropdownControlGridFormEditor"

                        DropDownWidth="150px" EnableScreenBoundaryDetection="False" ListTextField="Text"

                        ListValueField="Code" Skin="Outlook" OnClientItemsRequested="ItemsLoaded" OnItemsRequested="RadComboLocation_ItemsRequested">

                        <CollapseAnimation Duration="200" Type="OutQuint" />

                    </telerik:RadComboBox>

And this is the code in the code behind page

protected void RadComboCountry_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

        {

           try{

            SFSUserControl.myUtil.BindCombos(RadComboCountry, "Country", true);

           }

           catch (Exception ex)

           {

               throw new Exception("RadComboCountry_ItemsRequested Error on " + Request.ServerVariables["Script_Name"].ToString() + "" + ex.Message);

           }

        }

 

        protected void RadComboLocation_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)

        {

            try{

                if (SFSUserControl.myUtil.LocationItemExists("Location" + e.Text) == true)

                {

                    SFSUserControl.myUtil.BindCombos(RadComboLocation, "Location" + e.Text, true);

                }

                else

                {

                    RadComboLocation.SelectedValue = "None";

                    RadComboLocation.Enabled = false;

                }

               

             }

            catch (Exception ex)

            {

                throw new Exception("RadComboLocation_ItemsRequested Error on " + Request.ServerVariables["Script_Name"].ToString() + "" + ex.Message);

            }

        }

 

Veselin Vasilev
Telerik team
 answered on 11 Aug 2009
8 answers
146 views
Hi

I am using asp: ScriptManager and UpdatePanel control and under this updatepanel i have placed 3 'Promitheus' version ComboBoxes(DistrictList, SchoolsList and TeachersList) all ComboBoxe's data sources is bind at code behind. 
and bussiness logic is : upon selection of District trigger the event to get school list and upon selection of school trigger event to get teachers list.

Bussiness logic works very greate, but the thing is some times combobox freezes/locks the browser for more than half a minute,

Design Code :

<table> 
                <tr> 
                    <td class="AdminLabels"> 
                        LEA: 
                    </td> 
                    <td> 
                        <telerik:RadComboBox ID="ddlLEA" runat="server" AutoPostBack="True" MarkFirstMatch="True" 
                            NoWrap="True" OnSelectedIndexChanged="ddlLEA_SelectedIndexChanged" Skin="Default" 
                            Width="480px" Height="500px"> 
                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                            <ExpandAnimation Type="OutQuart"></ExpandAnimation> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
                <tr> 
                    <td style="vertical-align: top"> 
                        <div class="floatLeft"> 
                            <div class="AdminLabels"> 
                                School: 
                            </div> 
                            <div class="AdminLabels"> 
                                Acadamic Year: 
                            </div> 
                            <div class="AdminLabels"> 
                                Are you a TITLE I School: 
                            </div> 
                            <div class="AdminLabels"> 
                                Teacher List: 
                            </div> 
                        </div> 
                    </td> 
                    <td style="vertical-align: top"> 
                        <div> 
                            <asp:UpdatePanel ID="updtpnlSchools" runat="server"> 
                                <ContentTemplate> 
                                    <div class="AdminLabels"> 
                                        <telerik:RadComboBox ID="ddlSchool" runat="server" Width="480px" AutoPostBack="True" 
                                            MarkFirstMatch="True" NoWrap="True" OnSelectedIndexChanged="ddlSchool_SelectedIndexChanged" 
                                            Skin="Default" AllowCustomText="True" Height="500px"> 
                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                            <ExpandAnimation Type="OutQuart" /> 
                                        </telerik:RadComboBox> 
                                    </div> 
                                    <div class="AdminLabels"> 
                                        <telerik:RadComboBox ID="ddlFiscalYear" runat="server" Width="75px" DataSourceID="SqlDataSource_FiscalYears" 
                                            DataTextField="FiscalYear" DataValueField="FiscalYear" AutoPostBack="True" MarkFirstMatch="True" 
                                            NoWrap="True" Skin="Default"  
                                            onselectedindexchanged="ddlFiscalYear_SelectedIndexChanged" Height="200px"> 
                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                            <ExpandAnimation Type="OutQuart" /> 
                                        </telerik:RadComboBox> 
                                    </div> 
                                    <div class="AdminLabels"> 
                                        <telerik:RadComboBox ID="ddlTitleone" runat="server" MarkFirstMatch="True" 
                                            NoWrap="True" Width="75px" Height="250px" RadComboBoxImagePosition="Right"> 
                                            <Items> 
                                            <telerik:RadComboBoxItem Value="--?--" Text="--?--" /> 
                                            <telerik:RadComboBoxItem Value="N" Text ="No" /> 
                                            <telerik:RadComboBoxItem Value="Y" Text ="Yes" /> 
                                             
                                            </Items> 
                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                             
                                            <ExpandAnimation Type="OutQuart" /> 
                                        </telerik:RadComboBox> 
                                    </div> 
                                    <div class="AdminLabels floatLeft"> 
                                        <asp:UpdatePanel ID="updpnlTeacher" runat="server"> 
                                            <ContentTemplate> 
                                                <telerik:RadComboBox ID="ddlTeachers" runat="server" MarkFirstMatch="True" 
                                                    NoWrap="True" Skin="Default"  AllowCustomText="True" 
                                                    Width="200px" Height="500px"> 
                                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                                    <ExpandAnimation Type="OutQuart" /> 
                                                </telerik:RadComboBox> 
                                            </ContentTemplate> 
                                            <Triggers> 
                                                <asp:AsyncPostBackTrigger ControlID="ddlSchool" EventName="SelectedIndexChanged" /> 
                                                <asp:AsyncPostBackTrigger ControlID="ddlFiscalYear" EventName="SelectedIndexChanged" />                                                 
                                            </Triggers> 
                                        </asp:UpdatePanel> 
                                    </div> 
                                    <asp:Button ID="btnload" Style="float: right" runat="server" Text="Display Teacher Information." 
                                        OnClick="btnload_Click" /> 
                                </ContentTemplate> 
                                <Triggers> 
                                    <asp:AsyncPostBackTrigger ControlID="ddlLEA" EventName="SelectedIndexChanged" /> 
                                </Triggers> 
                            </asp:UpdatePanel> 
                        </div> 
                        <asp:SqlDataSource ID="SqlDataSource_FiscalYears" runat="server" ConnectionString="<%$ ConnectionStrings:EdSHConnectionString %>" 
                            SelectCommand="hqtSP_FiscalYears" SelectCommandType="StoredProcedure"></asp:SqlDataSource> 
                        <asp:HiddenField ID="HiddenField1" runat="server" /> 
                    </td> 
                </tr> 
            </table> 

Code Behind:(Page_Load)
        protected void Page_Load(object sender, EventArgs e) 
        { 
           if (!IsPostBack) 
            { 
                try 
                { 
                    TeacherInfo1.Visible = false; 
 
                    ddlFiscalYear.SelectedValue = getfiscalyear().ToString(); 
 
                    ddlLEA.DataSource = dds.Districts();//dds is a object used to verify user 
                    ddlLEA.DataTextField = "District"; 
                    ddlLEA.DataValueField = "testdistrictID"; 
                    ddlLEA.DataBind(); 
                    ddlLEA.Enabled = dds.EnableDistritcts; 
                    if (dds.EnableDistritcts) 
                        ddlLEA.AllowCustomText = true; 
                    else 
                        ddlLEA.AllowCustomText = false; 
 
 
                    ddlSchool.DataSource = dds.Schools(AppropriateParameter); 
                    ddlSchool.DataTextField = "School"; 
                    ddlSchool.DataValueField = "testschoolID"; 
                    ddlSchool.DataBind(); 
                    ddlSchool.Enabled = dds.EnableSchools; 
                    if (dds.EnableSchools) 
                        ddlSchool.AllowCustomText = true; 
                    else 
                        ddlSchool.AllowCustomText = false; 
 
                    ddlTeachers.DataSource = dds.Teachers(AppropriateParameters); 
                    ddlTeachers.DataTextField = "TeacherName"; 
                    ddlTeachers.DataValueField = "TeachernameID"; 
                    ddlTeachers.DataBind(); 
                } 
                catch (Exception ex) 
                { 
                    ErrHandler.WriteError(ex, ex.Message); 
                } 
            } 
 
    } 

Code Behind:(Ajax triggering events)
 
    protected void ddlLEA_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            try 
            { 
                //update school list 
                ddlSchool.DataSource = dds.Schools(Appropriateparameters) 
                ddlSchool.DataTextField = "School"; 
                ddlSchool.DataValueField = "testschoolID"; 
                ddlSchool.DataBind(); 
                ddlSchool.Enabled = dds.EnableSchools; 
 
                //update teachers list 
                ddlTeachers.DataSource = dds.Teachers(Appropriateparameters); 
                ddlTeachers.DataTextField = "TeacherName"; 
                ddlTeachers.DataValueField = "TeachernameID"; 
                ddlTeachers.DataBind(); 
 
            } 
            catch (Exception ex) 
            { 
                ErrHandler.WriteError(ex, ex.Message); 
            } 
        } 
        //School Selected 
        protected void ddlSchool_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            try{ 
            //update teachers list 
            ddlTeachers.DataSource = dds.Teachers(Appropriateparameters); 
            ddlTeachers.DataTextField = "TeacherName"; 
            ddlTeachers.DataValueField = "TeachernameID"; 
            ddlTeachers.DataBind(); 
 
            School school = new School(); 
            school.EntityID = int.Parse(ddlSchool.SelectedValue.ToString()); 
            school.FiscalYear = int.Parse(ddlFiscalYear.SelectedValue.ToString()); 
            ddlTitleone.SelectedValue = school.Title(); 
            ddlTitleone.Enabled = school.Enabled; 
 
            //ddlTeachers.Focus(); 
            TeacherInfo1.Visible = false; 
            } 
            catch (Exception ex) 
            { 
                ErrHandler.WriteError(ex, ex.Message); 
            } 
        } 
 

District List returns 750 rows/items.

Please help me.
Veselin Vasilev
Telerik team
 answered on 11 Aug 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?