Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
1.6K+ views
Hi ,
We are using Telerik Q2 2011 version.
We have requirement of generating excel 2007 files [.xlsx files].

Can RadGrid have export to Excel [.xlsx] functionality ?

I checked the RadGrid export method and not found any suitable methods to generate .xlsx files.
In our current version we don't find any RadGrid1.MasterTableView.ExportToExcel2007(); method. Just  I find RadGrid1.MasterTableView.ExportToExcel(). this can be open .xls files only.

Please I need to close asap this issue, so any one can help me on this


Advance Thanks
Mr.Perfect
Daniel
Telerik team
 answered on 24 Dec 2014
1 answer
229 views
Hi,
I have a dynamic pivotgrid who has to elaborate a lot of data (43000 records and more). At the end the pivot has to show not more then 70 rows.
Sometimes it complete the process but after a refresh it stop working OR it can't complete the process at the first load.

If I use firebug it seems that when it stop working it couldn't find WebResource.axd
Daniel
Telerik team
 answered on 24 Dec 2014
2 answers
168 views
guys, i'd like to be able to switch the ScrollHeight in the code behind based on the pageSize selected on the grid
we do this OnItemDataBound event and set the page size seletable to 15 & 30
if (e.Item is GridPagerItem)
{
RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
PageSizeCombo.Items.Clear();
PageSizeCombo.Items.Add(new RadComboBoxItem("15"));
PageSizeCombo.FindItemByText("15").Attributes.Add("ownerTableViewId", InventoriesRadGrid.MasterTableView.ClientID);
PageSizeCombo.Items.Add(new RadComboBoxItem("30"));
PageSizeCombo.FindItemByText("30").Attributes.Add("ownerTableViewId", InventoriesRadGrid.MasterTableView.ClientID);
PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
}
i've tried to punch into the events of the pagesizecombobox but it's not working - ANY IDEAS/ IM SURE IM MISSING SOMETHING SIMPLE
thanks
rik
Konstantin Dikov
Telerik team
 answered on 24 Dec 2014
1 answer
77 views
guys, i'd like to be able to switch the ScrollHeight in the code behind based on the pageSize selected on the grid

we do this OnItemDataBound event and set the page size seletable to 15 & 30
if (e.Item is GridPagerItem)
{
RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
PageSizeCombo.Items.Clear();
PageSizeCombo.Items.Add(new RadComboBoxItem("15"));
PageSizeCombo.FindItemByText("15").Attributes.Add("ownerTableViewId", InventoriesRadGrid.MasterTableView.ClientID);
PageSizeCombo.Items.Add(new RadComboBoxItem("30"));
PageSizeCombo.FindItemByText("30").Attributes.Add("ownerTableViewId", InventoriesRadGrid.MasterTableView.ClientID);
PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
}

i've tried to punch into the events of the pagesizecombobox but it's not working - ANY IDEAS/ IM SURE IM MISSING SOMETHING SIMPLE
thanks
rik


protected void FixSize(object sender, GridPageSizeChangedEventArgs e)
{
RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
if (PageSizeCombo.SelectedItem.Value == "15")
{
InventoriesRadGrid.ClientSettings.Scrolling.ScrollHeight = 610;
}
else
{
InventoriesRadGrid.ClientSettings.Scrolling.ScrollHeight = 1220;
}
}
Konstantin Dikov
Telerik team
 answered on 24 Dec 2014
1 answer
143 views
Hello,
  I am looking the waiting cursor when data binding in radeditor like same waiting cursor in radgrid control.
This is the basic requirement of all clients when click in refresh button to binding string data. RadEditor should have feature to identify something is processing.
This is confusing to user if large content.
If you have this feature, please explain to me.


I hope you will help me to find this solution.
Thanks.
Misho
Telerik team
 answered on 24 Dec 2014
1 answer
163 views
Hello,

I want to upload multiple file upload for each row in RadGrid in BatchEdit mode.Can you please share a sample project for this scenario?
Genady Sergeev
Telerik team
 answered on 24 Dec 2014
5 answers
194 views
Hello,

Everything seems to be working except that I have two labels and I'm getting the wrong rating in my "Your rating is" label. The average rating works fine and displays in the second label. Also, the stars display the correct average on page load. But as soon as I choose a rating, it displays the AVERAGE of the average and what I rated.

For example: If there is an average of 3.6 on page load and then I rate a 5, it will display 3.642857 in the "Your rating is" label.

I have posted the code below. Any help would be greatly appreciated!
Imports System
Imports System.Collections.Generic
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
 
Imports Telerik.Web.UI
Imports System.Data
Imports System.Data.SqlClient
 
Partial Public Class _2014
    Inherits System.Web.UI.Page
 
    Protected Sub RadRating_Rate(sender As Object, e As EventArgs)
        Dim rating As RadRating = DirectCast(sender, RadRating)
        If rating.ID = "RadRating1" Then
 
            Label1.Text = "Your Rating is: " + "<span style='color:Red'>" + RadRating1.Value.ToString + "</span>"
 
            AddRating(RadRating1.Value, "Amanda", 20141)
        End If
 
        If rating.ID = "RadRating2" Then
 
        End If
 
        If rating.ID = "RadRating3" Then
 
        End If
        If rating.ID = "RadRating4" Then
 
        End If
 
    End Sub
 
 
    Public Sub AddRating(ByVal rateVal As Object, ByVal picName As String, ByVal picId As Integer)
 
        Dim cnstr2 = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString())
        Dim cmd2 = New System.Data.SqlClient.SqlCommand("INSERT INTO Ratings(Rating,CreateDate,name,PicID) VALUES (@rating, @date , @name, @picID)", cnstr2)
        cmd2.CommandType = System.Data.CommandType.Text
        cmd2.Parameters.AddWithValue("@rating", rateVal)
        cmd2.Parameters.AddWithValue("@date", Date.Now)
        cmd2.Parameters.AddWithValue("@name", picName)
        cmd2.Parameters.AddWithValue("@picID", picId)
        'cmd2.Parameters.AddWithValue("@ip", ip)
 
        cnstr2.Open()
 
        cmd2.ExecuteNonQuery()
        cnstr2.Close()
 
    End Sub
 
    Public Function GetCount(ByVal picID As Integer) As Decimal
        Dim theCount As Decimal = 0.0
 
        'Dim currentAverageRating As Object = Vehicles.Rows(dataItem.ItemIndex + RadGrid1.CurrentPageIndex * RadGrid1.PageSize)(2)
        Dim cnstr2 = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString())
        Dim rdr As SqlDataReader
        Dim cmd2 = New System.Data.SqlClient.SqlCommand("SELECT AVG(Rating) AS Total FROM Ratings  WHERE PicID = @picID ", cnstr2)
        cmd2.CommandType = System.Data.CommandType.Text
        cmd2.Parameters.AddWithValue("@picID", picID)
        cnstr2.Open()
 
        rdr = cmd2.ExecuteReader
 
        If rdr.HasRows Then
 
            rdr.Read()
            If Not IsDBNull(rdr.GetValue(rdr.GetOrdinal("Total"))) Then
                theCount = rdr.GetValue(rdr.GetOrdinal("Total"))
            End If
        End If
        rdr.Close()
 
        cnstr2.Close()
        Return theCount
    End Function
 
 
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
 
        RadRating1.DbValue = GetCount(20141)
 
        'Label1.Text = "Your Rating is: " + "<span style='color:Red'>" + RadRating1.Value.ToString + "</span>"
        Label2.Text = "Average Rating is: " + "<span style='color:Red'>" + Convert.ToString(Format(GetCount(20141), "#.#")) + "</span>"
    End Sub
 
 
End Class

And here is the HTML:
<telerik:RadRating ID="RadRating1" Precision="Item" Value="0" ItemCount="5" runat="server" AutoPostBack="true" OnRate="RadRating_Rate">
                        </telerik:RadRating>
                        <asp:Label ID="Label1" runat="server" ForeColor="Green"></asp:Label>
                        <asp:Label ID="Label2" runat="server" ForeColor="Green"></asp:Label>
Ianko
Telerik team
 answered on 24 Dec 2014
7 answers
232 views
When I enter a span tag in the editor content, the DOM inspector shows it as a font tag.

You can see this on the demos. Just clear the content in the editor, go the html view, and type in very simple html like this: <span>hello</span>

Switch to design view and check it in the inspector - it is now called 'font'. The actual html is not changed (it is still a span), but the inspector gets it wrong.

​
Ianko
Telerik team
 answered on 24 Dec 2014
2 answers
89 views
Hi!
When I insert an appointment in advanced form, the start/end time combos have items until 17:30, while I set the business hour to 20:00.

How can I have those combos have items to 20:00?

Thanks!
Mavel
Top achievements
Rank 1
 answered on 24 Dec 2014
1 answer
449 views
Hello all:

I followed the online documentation, but cannot get the RadTabStrip to correctly change the page when clicked. I used a RadTabStrip, Added a MultipageView, and then added page views but nothing changes when I click the tabs. The code is shown below. Note I am using CodeBehind files so need to have the Tab change action in the code behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
  <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
    </script>
</telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div style="z-index: 102; left: 0px; width: 800px; position: absolute; top: 0px; height: 1000px">
      <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" OnAjaxRequest="RadAjaxPanel1_AjaxRequest" Height="692px" Width="798px">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">
          <Tabs>
            <telerik:RadTab runat="server" Selected="True" Text="Store Information" PageViewID="RadPageView1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="General Information" PageViewID="RadPageView2">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#CCC0DA" Text="Fruits">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4BD97" Text="Nuts &amp; Ginseng">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#C4D79B" Text="Vegetables">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#B7DEE8" Text="Fish &amp; Shell Fish">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="#E6B8B7" Text="Beef &amp; Veal">
            </telerik:RadTab>
          </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Height="365px" SelectedIndex="0">
          <telerik:RadPageView ID="RadPageView1" runat="server" Height="360px" Width="787px">
            <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="Store Information"></asp:Label>
            <asp:Label ID="Label2" runat="server" Font-Bold="True" Text="Store Name:"></asp:Label><asp:TextBox ID="txtStoreName" runat="server"></asp:TextBox>
            <asp:Label ID="Label3" runat="server" Font-Bold="True" Text="Store ID Number:"></asp:Label><asp:TextBox ID="txtStoreID" runat="server"></asp:TextBox>
            <asp:Label ID="Label4" runat="server" Font-Bold="True" Text="Corporate Name:"></asp:Label><asp:TextBox ID="txtCorpName" runat="server"></asp:TextBox>
            <asp:Label ID="Label5" runat="server" Font-Bold="True" Text="Store Address:"></asp:Label><asp:TextBox ID="txtAddress1" runat="server"></asp:TextBox>
            <asp:Label ID="Label6" runat="server" Font-Bold="True" Text="City, State, Zip:"></asp:Label><asp:TextBox ID="txtCityStateZip" runat="server"></asp:TextBox>
            <asp:Label ID="Label7" runat="server" Font-Bold="True" Text="Store Phone Number:"></asp:Label><asp:TextBox ID="txtStorePhone" runat="server"></asp:TextBox>
            <asp:Label ID="Label8" runat="server" Font-Bold="True" Text="PACA License #:"></asp:Label><asp:TextBox ID="txtPACA" runat="server"></asp:TextBox>
          </telerik:RadPageView>
          <telerik:RadPageView ID="RadPageView2" runat="server" Height="360px" Width="787px">
          </telerik:RadPageView>
        </telerik:RadMultiPage>
        <asp:TextBox ID="txtDebug" runat="server" style="z-index: 102; left: 6px; width: 400px; position: absolute; top: 548px; height: 400px" TextMode="MultiLine"></asp:TextBox>
            

      </telerik:RadAjaxPanel>


    </div>
    </form>
</body>
</html>

Plamen
Telerik team
 answered on 24 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?