Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
157 views
Hi,
I have these two dropdownlists in a Edit Form Template where I tried to set the number of items to show and/or the height but is not producing any effect. please look at the pictures attached.

<EditFormSettings EditFormType="Template">
   <FormTemplate>
      <table class="table">
 
    <telerik:RadDropDownList ID="RadDropDownList2" ItemCountPerRequest="4"
     DefaultMessage="Please select a value" runat="server" DataSourceID="SqlDataSource3"
     DataTextField="minutes" DataValueField="minutes" SelectedValue='<%#Bind("minutes") %>' Skin="Outlook">
        </telerik:RadDropDownList>
 
    <telerik:RadDropDownList ID="RadDropDownList3" runat="server" ItemCountPerRequest="12"
     DataSourceID="SqlDataSource4" DataTextField="hours" DefaultMessage="Please select a value"
     DataValueField="hours" SelectedValue='<%#Bind("hours") %>' Skin="Outlook">
        </telerik:RadDropDownList>
 
      </table>
   </FormTemplate>
</EditFormSettings>
What I would like to achieve is the following:
For the dropdownlist "Minutes" shows only the 4 items
For the dropdownlist "hours" show the first 12" values and then the others only on demand.
How can I fix these dropdownlists to achieve the above scenario?
Thanks for the support,
Felice
Shinu
Top achievements
Rank 2
 answered on 16 Apr 2014
1 answer
295 views
Advanced data binding with NeedDataSource event works perfectly for me when I need paging, sorting, grouping and filtering.
Below is the code snippet from your documentation:

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    String ConnString = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;
    SqlConnection conn = new SqlConnection(ConnString);
    SqlDataAdapter adapter = new SqlDataAdapter();
    adapter.SelectCommand = new SqlCommand("SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address FROM Customers", conn);
 
    DataTable myDataTable = new DataTable();
 
    conn.Open();
    try
    {
        adapter.Fill(myDataTable);
    }
    finally
    {
        conn.Close();
    }
 
    RadGrid1.DataSource = myDataTable;
}

The problem with that approach is that it needs to return all the data from database to let the grid make further data processing. What would you recommend to change in  the code snippet above if there is a million customer records in database and you need to implement paging, sorting and filtering and grouping on each field?
Princy
Top achievements
Rank 2
 answered on 16 Apr 2014
11 answers
847 views
Hi,
I was trying to use your CommandItemSettings to automatically display the Update and Delete buttons, like the AddNewRecordButton, but there is no such option available, I was wondering why? It would be useful to have those buttons available that would apply the command to the selected items in the grid, instead of having to add all to the CommandItemTemplate. These are common operations that one does in the grid...

Regards, Ariel
Princy
Top achievements
Rank 2
 answered on 16 Apr 2014
4 answers
187 views
I have a dropdownlist in template which is bound to a the db:

<telerik:RadDropDownList ID="RadDropDownList1" runat="server"  DataSourceID="SqlDataSource2"
          DataTextField="Pnum"  DataValueField="Pnum" SelectedValue='<%#Bind("Pnum") %>'>
         </telerik:RadDropDownList>

Then  I have a bound column "Project" that I would like to be automatically filled in when a value in the dropdown is selected based on a query:
Select Project from Pnum where Project = dropdown selected value, and save it.

How can I achieve that?
Your help will be appreciated.
Thanks,
Felice
Princy
Top achievements
Rank 2
 answered on 16 Apr 2014
1 answer
173 views
Hi,
i'm trying to detect the upload count on client side and determine if its 0.
If so i want to enable a panel. I've searched on the forum but cannot find a good example of how to detect upload count.

anyone have an example how to do this?

thanks
Shinu
Top achievements
Rank 2
 answered on 16 Apr 2014
2 answers
185 views
Hello, I am reviewing the commenting feature of the radeditor and have a few questions related to closing a comments dialog. For reference, I'm referring to http://demos.telerik.com/aspnet-ajax/editor/examples/comments/defaultcs.aspx. 

1. When a comment is clicked, the comment dialog pops up. Once the dialog is open, it seems that the comment dialog can be closed in one of two ways - either pressing the "cancel" button on the comment dialog once it appears, or, clicking somewhere in the editor outside of a comment. Is it possible out of the box to auto-close the comment dialog when clicking anywhere outside of the comment dialog, regardless of whether you click somewhere in the editor or out of the editor?

2. Is it possible out of the box to have a close widget on the comment dialog? 

Thanks
Shan
Shan
Top achievements
Rank 1
 answered on 16 Apr 2014
1 answer
119 views
is there anyway to determine the Displayed Image Data Key?


Pavlina
Telerik team
 answered on 16 Apr 2014
4 answers
113 views
Hello,

I have a radTreeView that has many nodes and sub-nodes. 
I want to add a AjaxLoadingPanel so it will display horizontally with the "+" being selected by the user.
Is this possible?

Thank you,
Jerry
Jerry
Top achievements
Rank 1
 answered on 15 Apr 2014
1 answer
291 views
Hi,
Right now we are using asp.net upload file control. I was looking around to see if I can use Rad Async upload control to meet our requirements:
1) multi file upload
2) When page loads, file upload control (pop up box) should open in set default location like C:\Company1\downloadFiles.
3) Post back, retain file path in display box (textbox) of upload control.
4) After upload is done, control should removed file names or box should be empty.

Please let me know if all these are done by rad async upload control.

Thank you.
Boyan Dimitrov
Telerik team
 answered on 15 Apr 2014
1 answer
277 views
i am having an issue with radCombobx item inserted from the client side,two problem are occurring :

i have a radGrid with client selecting when i select a row onRowSelected  client side function is fired and a combobox item is added to the combobox,the combobox have the checkboxes property set to true and EnableCheckAllItemsCheckBox="true"
  • first problem : when i click on check all items all the statically added items are checked but the new added one from the client side are not
  • second problem : i have added a server side oncheckedchanged function to radcombobox ,when i check a static item it fires the server side function but when i check the added one from the client side it does not fire the event

can someone please explain why this behavior is occurring because i can't understand the problem :/ here is my code

  <telerik:RadComboBox ID="Country_dd"  EnableCheckAllItemsCheckBox="true"  runat="server"
                              CheckBoxes="true"  AutoPostBack="true"  EnableLoadOnDemand="true"
                              OnItemChecked="Country_dd_CheckedChanged" >
                                <Items>
                                <telerik:RadComboBoxItem Text="asd" />
                                </Items>
                            </telerik:RadComboBox>
 
<telerik:RadGrid ID="ServiceCountryGrid" runat="server" AllowSorting="true" OnNeedDataSource="ServiceCountryGrid_NeedDataSource"
                        SkinID="RadGridSkin" DataKeyNames="COUNTRY_ID" AllowMultiRowSelection="true"
                        ShowHeader="true" OnItemDataBound="Grid_ItemDataBound" >
                        <ClientSettings >
                            <ClientEvents OnRowSelected="Row_Selected" OnRowDeselected="Row_Selected" />
                            <Selecting UseClientSelectColumnOnly="true" AllowRowSelect="true"  />
                            <Scrolling AllowScroll="true" ScrollHeight="400px" />
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="false" ShowHeadersWhenNoRecords="true">
                            <Columns>
                                <telerik:GridClientSelectColumn HeaderTooltip="Allow All" UniqueName="SelectCountries"
                                    HeaderStyle-Width="100px" ItemStyle-Width="100px">
                                </telerik:GridClientSelectColumn>
                                <telerik:GridBoundColumn UniqueName="COUNTRY" HeaderText="<%$ Resources:Strings,Country %>"
                                    DataField="COUNTRY_NAME">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="COUNTRY_ID" DataField="COUNTRY_ID" Display="false"></telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="<%$ Resources:Strings,Profile%>" UniqueName="GRDPROFILE">
                                    <ItemTemplate>
                                        <asp:DropDownList class="grdCountryProfiledd" ID="GrdProfile_dd" DropDownWidth="196"
                                            Enabled="false" runat="server" DataTextField="PROFILE_NAME" DataValueField="PROFILE_ID">
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>

javascript function :

function Row_Selected(sender, eventArgs) {
           var ServiceCountryGrid = $find("<%= ServiceCountryGrid.ClientID %>");
            
           var selectedValue = $("#Profile_dd option:selected").val();
          
           var MasterTable = ServiceCountryGrid.get_masterTableView();
           var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
           var GrdProfile_dd = $("#" + row.get_element().getElementsByTagName("select")[0].id);
 
           if (!row.get_selected()) {
               GrdProfile_dd.attr("disabled", "disabled");
               GrdProfile_dd.val(selectedValue);
               var combo = $find("<%=Country_dd.ClientID %>");
               combo.trackChanges();
               combo.get_items().remove(combo.findItemByValue(row._element.cells[2].innerHTML));
               
               combo.commitChanges();       
           }
           else {
               GrdProfile_dd.removeAttr("disabled");
               var value = row._element.cells[2].innerHTML;
               var text = row._element.cells[1].innerHTML;
               var combo = $find("<%=Country_dd.ClientID %>");
               var comboItem = new Telerik.Web.UI.RadComboBoxItem();
               comboItem.set_text(text);
               comboItem.set_value(value);
               combo.trackChanges();
               combo.get_items().add(comboItem);
               
               combo.commitChanges();       
             
           }
       }

please someone provide me a clear answer for this behavior
Boyan Dimitrov
Telerik team
 answered on 15 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?