Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
118 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
80 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
174 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
170 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
137 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
1 answer
94 views
Hi,

I try to design the Grid as something like an Catalog (Dateitems in several Columns).

It should look like this:

+--------+   +--------+  +--------+
|  Item1 |    | item2  |   | Item3  |
+--------+    +--------+  +--------+

+--------+   +--------+  +--------+
| Item4   |    | item5  |   | Item6  |
+--------+    +--------+  +--------+

I found an Sample at this site using TableLayou="fixed" - but this property is in my Version of the Grid not avalilable (V. 1.0.2.0)
Do you have any other way to use the Grid as described above?

Best Regards,
Georgi Krustev
Telerik team
 answered on 11 Aug 2009
1 answer
83 views

I wanted to know which control I would use to create a menu like the one present on the Telerik ASP.NET AJAX Demos.  I need menu that allows for hierarchy that is visually relatively simple (e.g. text and arrows).  If the current page is in the menu items as a sub-item of a section, the menu also needs to expand the applicable parent section and select the current page from the menu.

 

For example: When visiting the following URL, http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/vertical/defaultcs.aspx, the Functionality section within TabStrip is expanded and the Vertical item is selected.

Paul
Telerik team
 answered on 11 Aug 2009
2 answers
106 views
Hello,

We are using the grouping features of RadGrid. The detail rows contain several columns with numeric data which needs to be aggregated up the group headers. This all works fine.

However, the group header contains a single cell which contains all of the information, like so:

<td colspan="3"><p>XYZ, count: 7, frequency: 75%</p></td>

We want the count and frequency statistics to appear in their own columns (e.g. aligned with the detail columns), like this:

<td><p>XYZ</p></td><td><p>count: 7</p></td><td><p>frequency: 75%</p></td>

How can we do this?

Thanks!
Veli
Telerik team
 answered on 11 Aug 2009
2 answers
123 views
Hi,

I'm using RadControls for ASPNET AJAX Q1 2008 version 2008.1.619. I'm facing a bug with Mozilla 3.5. By default, my dock is collapsed. When I click the expand button, the dock does not expand. There is no javascript error in the Mozilla error console. Also, this work fines in IE 7.

Anyone has an idea on how to fix this ?

see the code sample below to reproduce the problem.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadDock.aspx.cs" Inherits="RadDock" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager>  
     
        <telerik:RadDockZone runat="server" id="RadDockZone1" EnableEmbeddedSkins="true"
        <telerik:RadDock id="RadDock1" Collapsed="true" Skin="Web20" EnableEmbeddedSkins="true" EnableDrag="false" DefaultCommands="ExpandCollapse" runat="server"
            <TitlebarTemplate> 
                TitleBar name 
            </TitlebarTemplate> 
            <ContentTemplate> 
               <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
                </p> 
                <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 
                </p> 
                 
            </ContentTemplate> 
        </telerik:RadDock> 
    </telerik:RadDockZone> 
    </div> 
    </form> 
</body> 
</html> 
 

Thanks

Pierre
Pierre
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
64 views
Hello, I have a bit an issue with ToolTips and Webservices.

In this scenario, I have a Tooltip that needs to periodically check a Webservice for results. Sometimes there are no results, so the Webservice returns null. I would like to catch these nulls and prevent the Tooltip from displaying "null" or an empty balloon, and the place to do that would seem to be clientbeforeShow, but the Webservice does not appear to be called until after this event. By the time we reach OnClientShow, it is too late to stop the Tooltip from appearing. Is there another way to go about this?

Additionally, how does one cause the ToolTip to initiate another Webservice call from the client-side. Is this possible?

Thank-you in advance!
Svetlina Anati
Telerik team
 answered on 11 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?