Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
158 views
Do you have any performance numbers for the time to upload files comparing your asyncupload to the regular asp:upload control? In this case the files will be .mov or .mp4 movies.  Any numbers, either actual upload onto the server or perceptual, would be greatly appreciated.  Thanks for your help, this is important to us.
Thanks!
Genady Sergeev
Telerik team
 answered on 16 Jul 2014
2 answers
132 views
Hi,

I would like to use multiple paths but from a sql reading loop.
How can I do that?

Of course this isn't working:

while (reader.Read())
{
folderName= (string)reader["folderName"];
viewPaths = new string[] { "~/Documents/" + folderName};
}

Thanks!
Attila
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
179 views
When I click on an item I would like to fill my TextBox with numbers from a column from Grid2 after Grid1 is clicked. Right now if I click on an item in Grid1 it will then run a procedure that will fill Grid2 with data. Here is an example of the current functionality with picture attached. I click an item from Grid1 and it has 3 results, my textbox will still display as an empty textbox. Then I click another item in Grid1 and now my textbox will display the 3 results from the previously clicked item. How can I display the correct numbers in my textbox after an item is selected in Grid1. 

Here are some snippets of what I currently have:
protected void Grid_Product_List_Details_PreRender(object sender, EventArgs e)
    {
        RadGrid grid = (RadGrid)sender;
 
        if (grid.Items.Count > 0)
            {
                RadTextBox1.Text = "";
            }
 
        for (int i = 0; i < grid.Items.Count; i++)
            {
 
                RadTextBox1.Text += grid.Items[i].GetDataKeyValue("number").ToString() + "\n";
            }
        RadTextBox1.DataBind();
 
    }


or I can comment out the above and use this to achieve the same results which are not correct:
protected void Grid_Product_List_Header_SelectedIndexChanged(object sender, EventArgs e)
    {
        RadTextBox1.Text = "";
        for (int i = 0; i < Grid_Product_List_Details.Items.Count; i++)
        {
 
            RadTextBox1.Text += Grid_Product_List_Details.Items[i].GetDataKeyValue("number").ToString() + "\n";
        }    
    }
Princy
Top achievements
Rank 2
 answered on 16 Jul 2014
2 answers
128 views


Hi,

I have grid control that that has master / detail
setup.  I’m trying to get this to export
to excel (html) but I’m having trouble figuring out how to apply 1 type of
formatting to master data and another type of formatting to child data


So for example this code applies formatting to all rows


        
protected void RadGrid1_ExportCellFormatting(object sender, ExportCellFormattingEventArgs e)
{
    GridDataItem item = e.Cell.Parent as GridDataItem;
 
    if (item.ItemType == GridItemType.AlternatingItem)
        item.Style["background-color"] = "#359AFF";
    else
        item.Style["background-color"] = "#2D62FF";
 
}


 Any ideas how I accomplish separate formatting please?

Andy
Top achievements
Rank 1
 answered on 16 Jul 2014
1 answer
203 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
265 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
208 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
120 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
196 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
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?