Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
208 views
We recently upgraded to the 2014 Q1 release(2014.1.403.35). Since the update some of our grids footers paging next/previous buttons stopped working.

The grid loads the first page fine, then when you click the next button it load the second page, if you then click it again it stays at page two. Using the next button it never goes beyond the second page. The last page button works but if you then click the back button again it wont go to the previous page but all the way back to the first page again.

This only happens when I have AllowPaging="true" The pages with AllowCustomPaging="true" works fine.

I created a PageIndexChanged event for the grid and found the following:

In this example the page has 1210 items, 25 items per page so there is 49 pages.

If I click next page, the NextPageIndex is 1 (the grid then navigates to page 2)
When I click next page again, the NextPageIndex stays 1 (the grid stays on page 2)
If I click last page the NextPageIndex is 48. (it then navigates to page 49)
If you click page back or first page the event does not fire, but it navigates back to the first page.

This leads me to believe that the PageIndex is not being remembered somehow.

Do you have any idea what causes this and how to fix it?

Angel Petrov
Telerik team
 answered on 16 Jul 2014
2 answers
279 views
Hi,I’m having an issue regarding exporting a grid control to Excel. (Via HTML) I have a grid which contains other hierarchal grids.  For example at the moment I can export and it looks like this:



The problem is col10 & col11, they follow the column widths of Col1 & Col2 – the end result being that the data is bunched up

What I’d like to get to is this:



To get this currently involves merging the each complete row in excel, unfortunately this is unrealistic in a live environment.
Is there anything I can do to resolve this?

TIA.
Andy.
Andy
Top achievements
Rank 1
 answered on 16 Jul 2014
4 answers
215 views
Hello,

I am currently working on a project with a RadGrid.

I need only two types of sorting - Ascending and Descending (I
want to turn off “NoSort” option).

I looked into your documentation and saw that setting:
 [http://www.telerik.com/help/aspnet-ajax/grid-controlling-sorting-modes.html]

VB.NET:
RadGrid1.MasterTableView.AllowNaturalSort = False

But unfortunately it does not work for me.

Please see the following video:

http://youtu.be/2oZ-y7J1P2c 


It gives me all 3 options (Ascending, Descending, NoSort).

Thanks for your help,

Daniel.
Daniel
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
122 views
Hi,
  i need a help.I want a floating search box,like that,when i will click on a search icon,then a search box will appear.otherwise,the search box will be hidden.
Magdalena
Telerik team
 answered on 16 Jul 2014
1 answer
207 views
When DropDownTree sits near other expanding controls (e.g. standard date pickers), causes these controls to sit behind DropDownTree. I tried every solution like sitting inline style, enforcing z-index to .RadDropDownTree_Default, making other controls' z-index attribute too much bigger than 100000 and enforcing style via jquery, but in any case, expanded controls fall behind the input (textbox) area of RadDropDownTree.

How can I enforce low z-index values on RadDropDownTree so that it does not sit above other expanding controls?
Shinu
Top achievements
Rank 2
 answered on 16 Jul 2014
1 answer
1.0K+ views
hi
i have combo box i use it in  user control and this is code for it
code of  all user control

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DirectSales.ascx.cs"
    Inherits="SallingSystem.GUI.Layer.DirectSales1" %>
<br />
    <script type="text/javascript">
        function pageLoad() {
        }
        ///*********************************************************************************///
        function OnClientDropDownClosed(sender, args) {
            var radcombobox = $find('<%=RedComboItem.ClientID %>').get_text();
                alert(radcombobox);
            }
        ///*********************************************************************************///
    </script>
<div id="DirectSalesControls" runat="server">
    <telerik:RadComboBox ID="RadComboTreasury" runat="server" Width="100px" DataSourceID="ODSTreasury"
        DataTextField="Name" DataValueField="ID" MarkFirstMatch="True" ResolvedRenderMode="Classic">
    </telerik:RadComboBox>
    <telerik:RadComboBox ID="RadComboSaler" runat="server" Width="150px" DataSourceID="ODSSaler"
        DataTextField="Name" DataValueField="ID" MarkFirstMatch="True" ResolvedRenderMode="Classic">
    </telerik:RadComboBox>
    <telerik:RadComboBox ID="RedComboItem" runat="server" AppendDataBoundItems="True"
        Width="545px" HighlightTemplatedItems="true" DropDownWidth="565px" EmptyMessage="Choose a Product"
        DataValueField="Value" DataTextField="Text"
        OnClientDropDownClosing="OnClientDropDownClosed" oninit="RedComboItem_Init" >
        <HeaderTemplate>
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td id="Td1" runat="server" style="width: 100px;">
                        Product Price
                    </td>
                    <td id="Td2" runat="server" style="width: 100px;">
                        Product Code
                    </td>
                    <td id="Td3" runat="server" style="width: 330px;">
                        Product Name
                    </td>
                </tr>
            </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table cellspacing="0" cellpadding="0">
                <tr>
                        <td style="width: 100px;">
                            <asp:Label ID="lblProductPrice" runat="server"><%# DataBinder.Eval(Container, "Text")%></asp:Label>
                        </td>
                        <td style="width: 100px;">
                            <asp:Label ID="lblproductCode" runat="server"><%# DataBinder.Eval(Container, "Attributes['ProductCode']")%></asp:Label>
                        </td>
                        <td style="width: 330px;">
                            <asp:Label ID="lblProductName" runat="server"><%# DataBinder.Eval(Container, "Attributes['ProductName']")%></asp:Label>
                        </td>
                </tr>
            </table>
        </ItemTemplate>
    </telerik:RadComboBox>
    <telerik:RadNumericTextBox ID="RadNumTextIncrease" runat="server" Width="120" Label="Increase">
    </telerik:RadNumericTextBox>
    <telerik:RadNumericTextBox ID="RadNumTextDiscount" runat="server" Width="150" Label="Discount">
    </telerik:RadNumericTextBox>
    <telerik:RadNumericTextBox ID="RadNumTextTotale" runat="server" Width="110" Label="Totale">
    </telerik:RadNumericTextBox>
    <telerik:RadButton ID="RadBtnSave" runat="server" Text="Save" OnClick="RadBtnSave_Click">
    </telerik:RadButton>
    <br />
    <asp:ObjectDataSource ID="ODSTreasury" runat="server" SelectMethod="GetTreasuryDetails"
        TypeName="SallingSystem.DataBussinessLayer.TreasuryDBL"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ODSSaler" runat="server" SelectMethod="GetDirectSalerDetails"
        TypeName="SallingSystem.DataBussinessLayer.DirectSalerDBL"></asp:ObjectDataSource>
</div>

and this is code behind for it too

protected void RadBtnSave_Click(object sender, EventArgs e)
        {
            // check if user not leave the field of item free
            if (RedComboItem.SelectedValue != "" && RedComboItem.Text != "Choose a Product" && RadNumTextTotale.Text != null && RadComboTreasury.SelectedValue != null && RadComboSaler.SelectedValue != null)
            {
                var objDirectSalesOperation = new DirectSalesOperation();
                objDirectSalesOperation.UserID = Convert.ToInt32(Session["LoginUserID"]);
                objDirectSalesOperation.TreasurID = Convert.ToInt32(RadComboTreasury.SelectedValue);
                objDirectSalesOperation.SalerID = Convert.ToInt32(RadComboSaler.SelectedValue);
                objDirectSalesOperation.ItemID = Convert.ToInt32(RedComboItem.SelectedValue);
                objDirectSalesOperation.TotalePrice = Convert.ToInt32(RadNumTextTotale.Text);
                var objDirectSalesOperationDAl = new DirectSalesOperationDAL();
                var Result = objDirectSalesOperationDAl.InsertNewSalesOperation(objDirectSalesOperation);
                if (Result >= 1)
                {
                    // inserted right
                    // hide the control who i use in insert new sales order
                    DirectSalesControls.Style.Add("display", "none");
                }
                else
                {
                    // not inserted
                    
                }
            }
            else
            {
              // some data mast inserted not inserted  
 
            }
        }

        protected void RedComboItem_Init(object sender, EventArgs e)
        {
            // create object from IteamDBL
            IteamDBL objIreamDBL = new IteamDBL();
            // create list of Iteam object
            List<Iteam> lstIteam = new List<Iteam>();
            // call method who get all iteam details
            lstIteam = objIreamDBL.GetIteamDetails();
            // create loop to add the list of object to cobobox
            foreach (var objiteam in lstIteam)
            {
                // create object of comboBoxIteam
                RadComboBoxItem comIteam = new RadComboBoxItem();
                /// give every item of object created value text and and more attribute more
                /// in comboBox i created
                comIteam.Value = objiteam.ID.ToString();
                comIteam.Text = Convert.ToString(objiteam.SalesPrice);
                comIteam.Attributes.Add("ProductCode", objiteam.CodeNumber);
                comIteam.Attributes.Add("ProductName", objiteam.Name.ToString());
                // if i want get all data as value in code behind
                //comIteam.Value += ":" + objiteam.Name;
                // add the object of combo item i create to the comboBox i want in page
                RedComboItem.Items.Add(comIteam);
                // bind the data after i add all value i want in item i create of combo box item
                comIteam.DataBind();
            }
        }

and in clinte side i need to access the value and text of item combo box
i try all what i find in site like (get_value , get_text) but it is not work with me get the empty massage or get null
so i need t know h i can access the combo box text and value in client side 

thanks
Ahmed Salem
 
Shinu
Top achievements
Rank 2
 answered on 16 Jul 2014
2 answers
146 views
Hi Sir,

I am having an issue, After double clicking on RadGrid Record then  through GetDatakeyValue i am getting vaue but not getting value with thousand operator.
 
-->Suppose in Raggrid displayed Amoun Field values is:$1,500.00
-->by using GetDataKeyValue getting value is:1500 not like the above.

If you have an idea please suggest to me sir.

Script:<script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            var grid = $find("<%= RadGrid1.ClientID %>");
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var key = MasterTable.getCellByColumnUniqueName(row, "EmpID");
            var ID = key.innerHTML;
            MasterTable.fireCommand("DblClick", ID);
        }
    </script>

 ASPX:
---------

                <telerik:GridBoundColumn DataFormatString="{0:C2}" DataField="Amount" HeaderText="Amount"
                    UniqueName="Amount" Visible="true" Display="true" HeaderStyle-HorizontalAlign="Center"
                    ItemStyle-HorizontalAlign="Center">
                </telerik:GridBoundColumn>

 Code Behind:
 ------------------
   protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
    
        if (e.CommandName == "DblClick")
        {
           GridDataItem item = (GridDataItem)RadGrid1.SelectedItems[0];
           Session["Amount"] = item.GetDataKeyValue("Amount").ToString();
        }
   }

  
Venkateswarlu
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
95 views
I want a grid with only  column names and filtering option visible initially. Only when user click on a Search button, the rows will be displayed accordingly. How can I achieve this?
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
1 answer
107 views
HI,
is there any to Hide "Today" on FastNavgationPopup?
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
4 answers
141 views
Hello, I am a junior programmar. Recently, I have been requested by using telerik AJAX to plot the html5 chart. Unfortunately, I am facing some kinds of minor problems.

1. Does event handler exist for the range selector?(Attachment: 1.JPG)
For some reasons, I need to keep track with the 'from' and 'to' date of the range selector. I need to put the 'from' and 'to' date to the textbox when the user slides the navigation bar. However, I can't put the rangeselector to the event class. So, it can't be done.
Does HtmlChart include something like http://www.telerik.com/help/winforms/rangeselector-properties-and-events.htmlelector-properties-and-events.html ?

2. Can Appearance of X-axis be changed?(2.JPG)
The another problem is that when the selection range is small, the displayed X-axis only display the time. It makes the users don't know what the date is.

3. HTML5 Chart is slow in IE
I have read many articles that related to HTML5 and IE, and try to add radstylesheet,scriptmanager......html5shiv.js. After doing everything that I know, it is faster but not fast enough. The tooltip only appears if I move the mouse towards the point many times. What else can I do? Can the future package be improved?

I hope you can answer the questions. Thank you.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
Maxson Junior
Top achievements
Rank 2
 answered on 16 Jul 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?