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

I have 3 combobox in my form Radcombobox1,Radcombobox2,Radcombobox2..

And i have done the following in my design

<tr>
        <td><asp:RequiredFieldValidator id="RequiredFieldValidator1"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox1"  
  InitialValue="Select Country" ValidationGroup="valorg">
</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator id="RequiredFieldValidator7"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox1"  
  InitialValue="" ValidationGroup="valorg">
</asp:RequiredFieldValidator>

Country</td>
        <td>:</td>
        <td>
          
            <telerik:RadComboBox ID="RadComboBox1" Runat="server"
            OnClientSelectedIndexChanging="LoadStates"
                OnItemsRequested="RadComboBox1_ItemsRequested"
                 ShowMoreResultsBox="true" Skin="Windows7"
                
                 >
            </telerik:RadComboBox>
        </td>
        </tr>
        <tr>
        <td><asp:RequiredFieldValidator id="RequiredFieldValidator2"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox2"
  InitialValue="Select State"
   ValidationGroup="valorg">
</asp:RequiredFieldValidator><asp:RequiredFieldValidator id="RequiredFieldValidator10"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox2"
  InitialValue=""
   ValidationGroup="valorg">
</asp:RequiredFieldValidator>State</td>
        <td>:</td>
        <td>
          
            <telerik:RadComboBox ID="RadComboBox2" Runat="server"
             OnClientSelectedIndexChanging="LoadCities"
                OnClientItemsRequested="ItemsLoaded"
                OnItemsRequested="RadComboBox2_ItemsRequested" >
            </telerik:RadComboBox>

        </td>
        </tr>
        <tr>
        <td><asp:RequiredFieldValidator id="RequiredFieldValidator3"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox3"
  InitialValue="Select City" ValidationGroup="valorg">
</asp:RequiredFieldValidator><asp:RequiredFieldValidator id="RequiredFieldValidator11"  
  runat="server" ErrorMessage="*"
  ControlToValidate="RadComboBox3"
  InitialValue="" ValidationGroup="valorg">
</asp:RequiredFieldValidator>City</td>
        <td>:</td>
        <td>:<telerik:RadComboBox ID="RadComboBox3" Runat="server"
        
        OnClientItemsRequested="ItemsLoaded"
                OnItemsRequested="RadComboBox3_ItemsRequested"
        >
            </telerik:RadComboBox>
            </td>
        <td>
          
        </td>
        </tr>
Added below script in Body

<script type="text/javascript">
    //global variables for the countries and cities comboboxes
    var countriesCombo;
    var citiesCombo;

    function pageLoad() {
        // initialize the global variables
        // in this event all client objects
        // are already created and initialized
        countriesCombo = $find("<%= RadComboBox2.ClientID %>");
        citiesCombo = $find("<%= RadComboBox3.ClientID %>");
       
    }

    function LoadStates(combo, eventArqs) {
        var item = eventArqs.get_item();
        countriesCombo.set_text("Loading...");
        citiesCombo.clearSelection();

        // if a continent is selected
        if (item.get_index() > 0) {
            // this will fire the ItemsRequested event of the
            // countries combobox passing the continentID as a parameter
            countriesCombo.requestItems(item.get_value(), false);
        }
        else {
            // the -Select a continent- item was chosen
            countriesCombo.set_text(" ");
            countriesCombo.clearItems();

            citiesCombo.set_text(" ");
            citiesCombo.clearItems();
        }
    }

    function LoadCities(combo, eventArqs) {
        var item = eventArqs.get_item();

        citiesCombo.set_text("Loading...");
        // this will fire the ItemsRequested event of the
        // cities combobox passing the countryID as a parameter
        citiesCombo.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>

In Code Behind i have coded as below


 # region "Page Load"
    protected void Page_Load(object sender, EventArgs e)
    {

       // fn_createlandingpageforclient("Esthetic Smile Dental Clinic", "jks@jks.com", "drdsatish@gmail.com");

        try
        {
            Label1.Text = string.Empty;
            if (!IsPostBack)
            {
                //loadcountry(ddlcountry);
                loadcountry(RadComboBox1);
                //loadstate(ddlstate, ddlcountry.SelectedItem.Text);
                //loadstate(RadComboBox2, RadComboBox1.SelectedItem.Text);
                //loadcity(ddlcity, ddlcountry.SelectedItem.Text, ddlstate.SelectedItem.Text);
                //loadcity(RadComboBox3 , RadComboBox1.SelectedItem.Text, RadComboBox2.SelectedItem.Text);
            }
        }
        catch (Exception ex)
        {
            DAL.UnknownError objUnknownError = new UnknownError();
            objUnknownError.ReturnError(ex.Message);
        }


    }
    # endregion
 # region "Rad Combo box Itemrequested"
    protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {

        //loadstate(RadComboBox2, e.Text);
        
    }

    protected void RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        // e.Text is the first parameter of the requestItems method
        // invoked in LoadCountries method
        //loadcountry(RadComboBox1);
        Session["country"] = e.Text;
        loadstate(RadComboBox2, e.Text);
        
    }

    protected void RadComboBox3_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        // e.Text is the first parameter of the requestItems method
        // invoked in LoadCities method
        //LoadCities(e.Text);
        loadcity(RadComboBox3,Convert.ToString(Session["country"]), e.Text);

    }
    # endregion

I have a radcaptcha with custom httphandler to avoid the image change in postbacks..

While i am saving the Radcombobox2 and Radcombobox3 are loosing the items..

As it is very urgent issue..Please suggest me the solution..


Thanks
Thenmozhi.R
Cori
Top achievements
Rank 2
 answered on 07 Jan 2011
1 answer
121 views
Is there a limit on how many times an appointment can recur? I created an appointment with the following properties:

Start date: 1/9/2003 12:00:00 AM
End date: 1/15/2003 12:00:00 AM

Recurrence rule:
DTSTART:20030109T000000Z
DTEND:20030115T000000Z
RRULE:FREQ=WEEKLY;UNTIL=20981231T000000Z;INTERVAL=1;BYDAY=TH

And sure, it recurs. But only until 3/24/2011. The last entry I get is one showing up from 3/24/2011 through 3/29/2011, and then, no more. Notice how the Recurrencerule says UNTIL=20981231? So how come it stops in 2011?

Naturally, if we move the schedule back one year, i.e.

Start date: 1/9/2003 12:00:00 AM
End date: 1/15/2003 12:00:00 AM

Recurrence rule:
DTSTART:20020109T000000Z
DTEND:20020115T000000Z
RRULE:FREQ=WEEKLY;UNTIL=20981231T000000Z;INTERVAL=1;BYDAY=WE

The last entry I can see is now 3/18/2010 through 3/23/2010.

As far as I know, this behavior isn't documented anywhere. Is this a bug?
Peter
Telerik team
 answered on 07 Jan 2011
1 answer
125 views
Hi all:

I have a RadDateInput set up thus:

 <telerik:RadDateInput ID="dt1" runat="server" Culture="en-US"
      DisplayDateFormat="dd MMM yyyy" Font-Names="Verdana"
      Font-Size="12px" Height="22px" LabelCssClass=""
      Style="z-index: 116; left: 16px; position: absolute; top: 50px" TabIndex="189"
      Width="85px">
    </telerik:RadDateInput>

and when I enter a date, like 2011 1 1, it displays correctly as 01 Jan 2011, however if I then grab the value from the Input, I get: 2011-01-01-00-00-00.

Can anyone tell me how I can drop the extra values (which I assume are for time) and be left with 2011-01-01?

John.




Princy
Top achievements
Rank 2
 answered on 07 Jan 2011
1 answer
75 views
Hi, I have a RadListView in which it has a fieldset inside, and I need to do the following,I'm feeding some fields within this fieldset and I have a DIV, needed to check, after playing all the data inside the fieldset, it has certain value would be found if the DIV witha background color specified, anyone know how I do it?
Radoslav
Telerik team
 answered on 07 Jan 2011
2 answers
155 views
Hi ,

 I am using Radcalendar , while click on the particular date radwindow is opening, i need to display that particular date on the radwindow.
 tell me how to do?
Brown
Top achievements
Rank 1
 answered on 07 Jan 2011
4 answers
280 views
Hi Dear

When I use LayoutTemplate  in design time it`s work correctly but in runtime when i use "Page.LoadTemplate" method for loading template when DataBind() fired it thrown exception :

"

The RadListView control does not have an item placeholder specified.

"

RadListView1.PageSize = (int)contentList.PageSize;
RadListView1.DataSource = contents;
RadListView1.LayoutTemplate = Page.LoadTemplate(contentList.LayoutTemplate);
RadListView1.ItemTemplate = Page.LoadTemplate(contentList.ItemTemplate);
RadListView1.VirtualItemCount = totlaCount;
RadListView1.DataBind();

Best Regards.
temperory temperory
Top achievements
Rank 1
 answered on 07 Jan 2011
0 answers
104 views
Hi Telerik Team,

I need a little help on showing the item number in the footer template of the radcombobox. I have tried your demo in your website (see below) but the value of the Items.Count is not showing.. The way I bind my data is through looping to my collections and add the data by Items.Add method instead of DataBind() method. I did this approach for some reasons. Please help me.

    Protected Sub cboConsultant_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles cboConsultant.ItemsRequested
        For Each user As Usr In Usr.GetPeerUsersForJob
            Dim item As New RadComboBoxItem
            item.Text = user.ContactName
            item.Value = user.UserId
            item.Attributes.Add("ContactEmail", user.ContactEmail)
            cboConsultant.Items.Add(item)
            item.DataBind()            
        Next

    End Sub

.vb:
 Protected Sub RadComboBox1_DataBound(sender as Object, e as EventArgs)
            'set the initial footer label
            CType(RadComboBox1.Footer.FindControl("RadComboItemsCount"), Literal).Text = Convert.ToString(RadComboBox1.Items.Count)
        End Sub

.aspx:
 <FooterTemplate>
            A total of
            <asp:Literal runat="server" ID="RadComboItemsCount" />
            items
        </FooterTemplate>

Regards,
masterlopau
Juan Paulo
Top achievements
Rank 1
 asked on 07 Jan 2011
4 answers
182 views
I have a radgrid with 3 radiobutton in each row as a group. Either 1 will be selected and rest 2 will be not. My requirement is to show a count of radiobutton's selected for a particular page at the buttom of the grid(not footer). For eg. Not Mine:2, Remove:4, Keep: 4. The way that i thought of iterating through the MasterTable rows and get the radiobutton control but as it is in rad grid I cant get those. Please provide a solution.

Thanks in advance.

<telerik:RadGrid ID="grvReviewerView" runat="server" AutoGenerateColumns="False"
ShowFooter="true" GridLines="Both" EnableEmbeddedBaseStylesheet="true" EnableEmbeddedSkins="true"                                               AllowPaging="true" PageSize="10" AllowSorting="true" Skin="Office2007" OnDataBound="grvReviewerView_DataBound"                                                  OnNeedDataSource="grvReviewerView_NeedDataSource" AllowFilteringByColumn="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" OnItemDataBound="grvReviewerView_ItemDataBound">                                                  <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder">
<Scrolling AllowScroll="true" UseStaticHeaders="true" EnableVirtualScrollPaging="true"                                                          FrozenColumnsCount="3" />
<ClientEvents OnRowClick="UpdateCount"/>
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
<Animation AllowColumnReorderAnimation="true" AllowColumnRevertAnimation="true" />
<Selecting UseClientSelectColumnOnly="true" />
  </ClientSettings>
  <PagerStyle AlwaysVisible="true" />
 <MasterTableView TableLayout="Fixed" AutoGenerateColumns="False" AllowMultiColumnSorting="true" GroupLoadMode="Client">
<Columns>
<telerik:GridTemplateColumn HeaderText="Not Mine" UniqueName="NotMine" AllowFiltering="false" HeaderStyle-Width="50px">
<ItemTemplate>
<asp:RadioButton ID="rdbNotMine" runat="server" GroupName="ReviewStatus" Checked='<%# Convert.ToBoolean(Eval("NotMine")) %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-Width="50px" HeaderText="Remove Access" UniqueName="RemoveAccess"
AllowFiltering="false">
<ItemTemplate>
<asp:RadioButton ID="rdbRemoveAccess" runat="server" GroupName="ReviewStatus" Checked='<%# Convert.ToBoolean(Eval("RemoveAccess")) %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
 <telerik:GridTemplateColumn HeaderText="Keep Access" UniqueName="KeepAccess" AllowFiltering="false" HeaderStyle-Width="50px">
<ItemTemplate>
<asp:RadioButton ID="rdbKeepAccess" runat="server" GroupName="ReviewStatus" Checked='<%# Convert.ToBoolean(Eval("KeepAccess")) %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
<custom:CustomFilterClass DataField="Legacy_ID" FilterControlWidth="163px" HeaderText="User Legacy ID"
SortExpression="Legacy_ID">
<HeaderStyle Width="160px" />
<ItemTemplate>
<asp:Label ID="lblUserLegacyID" Text='<%# Eval("Legacy_ID") %>' runat="server"></asp:Label>
</ItemTemplate>
</custom:CustomFilterClass>
<custom:CustomFilterClass DataField="NT_Login" FilterControlWidth="163px" HeaderText="NT Name"
SortExpression="NT_Login">
<HeaderStyle Width="160px" />
<ItemTemplate>
<asp:Label ID="lblNTLogin" Text='<%# Eval("NT_Login") %>' runat="server"></asp:Label>
</ItemTemplate>
</custom:CustomFilterClass>
</Columns>
<AlternatingItemStyle />
<ItemStyle />
<HeaderStyle Wrap="false" />
<FooterStyle />
<NoRecordsTemplate>
 No Data
</NoRecordsTemplate>
</MasterTableView>
</telerik:RadGrid>
Debojyoti
Top achievements
Rank 1
 answered on 07 Jan 2011
4 answers
165 views

I have been running Rad controls on my development machine with no problems at all, i tried to install the project at staging environement. unfortunately, whenever i try to run a certain page I get a javascript error in webresource.axd file.

the page that i'm trying to view has Radtabstrip, Muiltpage control, RadAjax & other Rad controls. I'm not sure what is causing this javascript error, but at some point while trying to debug it stops at a line where it points to TabStrip.

any one facing this issue?

Harshal
Top achievements
Rank 1
 answered on 07 Jan 2011
0 answers
70 views
Hi,
I am using RadTabStrip + RadMultiPage and it i am using Telerik 2008.2.826.20 version.
I coverted the classic RadTabStrip.Net2 to Telerik 2008.2.826.20. After that it started throwing javascript error "Children" is null or not an object.
The error occures in Telerik.Web.UI.WebResource.axd. (var _bd=_ba.children||_ba.childNodes;) where _ba is null.

Any help is appreciated.

Thanks,
Harshal.
Harshal
Top achievements
Rank 1
 asked on 07 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?