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

  I am following the example of the related comboxes.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

 I have two related comboboxes and an add button Once the user selected from both the radComboBox_filters and radCombox_E comboxes, he can add the selection to the listbox RadListBox_EFilters on the right side.

My problem is that radComboBox_filters does not display "Select filters" at the top of the comboxBox because I want to display "select filters" at the top of the combox. Also, If I select something from the RadCombobox_filters, the radCombox_E will be populated with data. Once I select something from the radcombox_e and click the add button, radCombox_E gets cleared out. I don't want the radCombox_E to be cleared out just becasue I clicked on add button.
How can I fix that because I don't want the readCombox_e to be cleared out once i push the add button. Below is my code.
<script type="text/javascript">
    var ECombo;
     
function pageLoad() {
      
    ECombo = $find('<%= RadPanelBar1.Items[0].Items[0].FindControl("RadComboBox_E").ClientID %>');
  
}
  
function RadComboBox_E_Load(combo, eventArgs) {
  
    var item = eventArgs.get_item();
  
    ECombo.set_text("Loading...");    
    if (item.get_index() > 0) {
  
       ECombo.requestItems(item.get_textElement().innerText, false);
    }
    else {
        ECombo.set_text(" ");
        ECombo.clearItems();
  
    }
}
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>
  
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="1500px" BackColor="#E6E6E6" ExpandMode="MultipleExpandedItems">
            <Items>
                <telerik:RadPanelItem runat="server" Text="Filters" Expanded="true">
                    <items>
                        <telerik:RadPanelItem Text="">
                            <ItemTemplate>
                                <table width="20%" cellpadding="0" cellspacing="0">
    <tr>
        <td style="width:10%">
        Filters:
         <telerik:RadComboBox ID="RadComboBox_filters" 
                runat="server" 
                Width="200px" 
                  
                OnClientSelectedIndexChanging="RadComboBox_E_Load" 
                onitemsrequested="RadComboBox_filters_ItemsRequested" EmptyMessage="Select Filters" HighlightTemplatedItems="true" Filter="StartsWith"></telerik:RadComboBox>
  
          </td>
          <td> </td>
          <td style="width:10%">
           E:
            <telerik:RadComboBox ID="RadComboBox_E" 
                runat="server" 
                ClientIDMode="Static"
                Width="200px" 
               OnClientItemsRequested="ItemsLoaded" onitemsrequested="RadComboBox_E_ItemsRequested" MarkFirstMatch="true" EmptyMessage="Please Select.."/>
        </td>
        <td> </td>
         <td> </td>
          <td> </td>
        <td style="width:10%"><br />
                <telerik:RadButton ID="RadButton_Add" runat="server" Text="Add" 
                       onclick="RadButton_Add_Click">
                        <Icon SecondaryIconCssClass="rbAdd" SecondaryIconRight="4" SecondaryIconTop="4" />
                    </telerik:RadButton>
          
        </td>
        <td style="width:10%">
             <telerik:RadListBox runat="server" ID="RadListBox_EFilters"  AutoPostBack="false"
                    SelectionMode="Single" Width="600px" Height="200px" AllowDelete="true">
                    </telerik:RadListBox>
        </td>
        <td style="width:80%"> </td>
      
    </tr>
  
  
</table>
  
  
                            </ItemTemplate>
                        </telerik:RadPanelItem>
                    </items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>

Any help will be appreciated.

Anjali
Top achievements
Rank 1
 answered on 12 Jul 2011
2 answers
158 views
Hi All, I am using the Demo code for using the automatic editing features of the grid, but regardless of if I "edit" a record or "Insert" a record, only the "Update" ever shows, "Insert" Button never does. Using the following code:
Q1 2011
RadGrid settings
           AllowAutomaticInserts="true" 
           AllowAutomaticUpdates="true" 
           AllowAutomaticDeletes="true"  
    
    
Command buttons:  "Insert" Button never shows. 
    <td colspan="99"
        <asp:Button 
            ID="btnUpdate" 
            Text="Update" 
            runat="server" 
            CommandName="Update" 
            Visible='<%# !(Container is Telerik.Web.UI.GridInsertionObject) %>'> 
        </asp:Button
        <asp:Button 
            ID="btnInsert" 
            Text="Insert" 
            runat="server" 
            CommandName="PerformInsert"
            Visible='<%# Container is Telerik.Web.UI.GridInsertionObject %>'> 
        </asp:Button
Thanks,

Matt


Matt
Top achievements
Rank 1
 answered on 12 Jul 2011
6 answers
94 views
My RadGrid shows a Popup for Insert and Edit actions on a row.

In the Popup, I need to set a RadTexbox.Enabled = True/ False based on the value of a RadComboBox in the Popup.

Is there an example demonstrating this?

Thank you,

Rick

Rick
Top achievements
Rank 1
 answered on 12 Jul 2011
1 answer
88 views
I am using a asyncupload that works locally but wont upload to the server I've went through a few different tutorials to try to get figure it out with no luck. Any directions would be great.

Thanks
Curt
Curt
Top achievements
Rank 1
 answered on 12 Jul 2011
4 answers
64 views
Hi, is there a way to remove editform for certain grids? We would appreciate if the arrow keys could still be present in that grids, thanks.
Murilo
Top achievements
Rank 1
 answered on 12 Jul 2011
3 answers
249 views
I have an issue with File Explorer.

I want that my files folder in which all the files will go when some one upload using File explorer should not be under root directory.
For example my Application is on D drive under projects and all the files will go to E://Files folder.

When I put this files folder inside my root directory than I am easily able to give virtual path to FileExplorer and it works fine.
But in my case the Files folder is out side the root directory and I am not able to provide virtual path to File Explorer.

Can't we give only physical path to file explorer?

Please provide the solution for this.
Dobromir
Telerik team
 answered on 12 Jul 2011
1 answer
74 views
Hello
I just downloaded the demo SofiacarRental. I just can't make it run. I got an error exception about the

SofiaCarRentalEntityDiagrams.
I can't see any note that explain how to get started with it. Witch version of SQLExpress do I have to use?
And do you have any documentation about this demo somewhere?
Thank you
Myriam

Kosta Hristov
Telerik team
 answered on 12 Jul 2011
1 answer
73 views
My culture is Thai (th-TH) therefore my year format is 2554 (but en-EN is 2011)
and problem is when I click  > to change month my year 2554 it auto change to 2011 and when I click < to change back to old month it 
show year 2011 too

Please help me.
Maria Ilieva
Telerik team
 answered on 12 Jul 2011
5 answers
152 views
Hi,

  I have two listboxes, On my left side of list boxes, I have some items, when i transfer the items to the right side listbox, I add two checkboxes before those items. Everything works fine when the transferMode = move, but when I changed the transferMode=Copy then when I move the item from the left listbox to the right listbox, the checkboxes appear in the right list box, but items don't appear.
I am not sure what am I doing wrong. below is my code
<td style="width:"10%" >
           ag: <br />
               <telerik:RadListBox runat="server" ID="RadListBox_Unselectedag" AutoPostBack="false"
               Width="120px" Height="200px" 
               TransferToID="RadListBox_selectedag" AllowTransfer="true" TransferMode="Copy"
               AutoPostBackOnTransfer="true" SelectionMode="Multiple" AllowDelete="false" AllowReorder="false" ontransferred="RadListBox_Unselectedag_Transferred" >
           </telerik:RadListBox>
       </td>
       <td style="width:"2%">aselected <br />
           <telerik:RadListBox runat="server" ID="RadListBox_selectedag" AllowDelete="true" AllowReorder="false"
               AutoPostBack="false" SelectionMode="Multiple" Width="140px" Height="200px"    >
               <ItemTemplate>
                 
                  <asp:CheckBox ID="chkAD" runat="server" />
                   <asp:CheckBox ID="chkAS" runat="server" />
                   <asp:Label ID="lblagSelected" runat="server" Text='<%# DataBinder.Eval(Container,"Text") %>'></asp:Label>
               </ItemTemplate>
                
           </telerik:RadListBox>
         
       </td>
       <td>

My code behind looks like this

protected void RadListBox_Unselectedag_Transferred(object sender, RadListBoxTransferredEventArgs e)
        {
            foreach (RadListBoxItem item in e.Items)
            {
                item.DataBind();
            }
        }

Anjali
Top achievements
Rank 1
 answered on 12 Jul 2011
2 answers
88 views
Hi,

In my applicationn i had a RadDatePicker with the following syntax:

<telerik:RadDatePicker ID="txtDate" Runat="server" Skin="Sunset" 
                 FocusedDate="" MinDate="01/01/2006" ShowPopupOnFocus="True" TabIndex="20" 
                 Width="155px" MaxDate="01/01/2020">
                    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                         ViewSelectorText="x" Skin="Sunset"></Calendar>
                                       <DatePopupButton ImageUrl="" HoverImageUrl="" TabIndex="20"></DatePopupButton>
                    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="MM/dd/yyyy" TabIndex="20"></DateInput>
             </telerik:RadDatePicker>

My requirement is i need to bind 10 days back date from today's date to RadDatePicker with the following syntax:

txtDate.SelectedDate =DateTime.Now.Date.AddDays(-10);

Here i am getting the following error:

Value of '7/2/2011 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
Parameter name: SelectedDate

Any one please suggest me the solution for this?

Thanks in advance...
Maria Ilieva
Telerik team
 answered on 12 Jul 2011
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?