Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
384 views
Hi All,

My requirement is to export the grid data into excell sheet and promt user to save this excell file on the click of a radgrid toolbar button.
I have made my set ups for this feature to work at my end like mentioned below :-

1) Added a new GridToolBar button "Export".
    
<telerik:RadToolBarButton Text="Excel" ImageUrl="~/Images/excel.png" CommandName="ExportToExcel" Value="Export" />

2) On page load i have added the code like below :-

if (!Page.IsPostBack)
           {
               rgMyGrid.ExportSettings.ExportOnlyData = true;
               rgMyGrid.MasterTableView.UseAllDataFields = true;
               rgMyGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
               rgMyGrid.ExportSettings.IgnorePaging = true;
               rgMyGrid.ExportSettings.FileName = "CropList";
               rgMyGrid.ExportSettings.OpenInNewWindow = true;
           }
3) Handling the button click of the grid to export the data to Excell file, used code as below :
Ex :-
protected void rtbCommand_ButtonClick(object sender, RadToolBarEventArgs e)
       {
           if (e.Item.Value == "Export")
           {
               ExportGrid();
           }
       }
The ExportGrid method is as below :
protected void ExportGrid()
       {
               rgMyGrid.ExportSettings.ExportOnlyData = true;
               rgMyGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
               rgMyGrid.ExportSettings.IgnorePaging = true;
               rgMyGrid.ExportSettings.FileName = "CropList";
               rgMyGrid.ExportSettings.OpenInNewWindow = true;
               rgMyGrid.MasterTableView.ExportToExcel();               
           
       }

Still it does not seems to be working rather it makes the toolbar to disappear when click on the EXPORT button. :-(

Is this the right way i am going through or need to change the coding any way ?
Please help me in this regard. Thanks in advance.
Les
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
84 views
Hi,

How can I have a combobox which us allow to check items only in order. ie it should not allow to check 2nd item if 1st is not checked.

Thanks
Shinu
Top achievements
Rank 2
 answered on 06 Jul 2012
1 answer
90 views
I hav a grid that loads a detail table when clicking the expand icons.  This is working fine.  The problem is that when I click the icon to collapse, it reloads the detail table.  I have the ViewStateMode set to Enabled on that page.  I do have several of the grids on the page and each is in its own RadAjaxPanel.

Any ideas?
Tsvetoslav
Telerik team
 answered on 06 Jul 2012
1 answer
91 views
Hello,

I am not sure the best way of asking this without it getting to be a book of explanation.  I need to have the grid be able to have a template all via code to allow me to add columns on the fly.  ( I want the user to simply hit a plus button next to the grid or contained within the grid that adds the column to the end of the grid)  The column header needs to contain a dropdown as well that would get filled upon creation.  

When I commit this data to the database I will need to be able to read the value from the dropdown as that is a foreign key on the underlying table.  

Any help or examples would be appreciated.  

Thanks.
Marin
Telerik team
 answered on 06 Jul 2012
1 answer
125 views
Hi,

I've been creating some graphs using the new Telerik HtmlChart control and have had some issues when trying to allocate a DataLabelField to the X-axis. I have ensured that the table headings have no spaces in them as I read that may be a problem.

I am using :

RadHtmlChart1.PlotArea.XAxis.DataLabelsField = "PriorityID"

The data is displayed in the graph correctly but any attempt to set the x axis is not being applied. The SQL I use provides a column of int (1-12) under the "PriorityID" column heading and a count column of int next to it for the actual data points.

Also on a similar vein is an issue based around legends. Again the data is being populated but unfortunately displaying a legend that is not being shown correctly. It seems to appear as a line of colours but very small and missing any labels to explain the data. I have included a picture to demonstrate the issue.

Both these issues are causing serious problems despite the actual graphing of the data being produced, as both limit the relevance of the data shown. Is this due to a shortcoming of the initial version of the control? Or possibly a mismatch between the mappings to take the axis/ legend data out of the datatable?

Thanks in advance,

Tom
Marin Bratanov
Telerik team
 answered on 06 Jul 2012
0 answers
86 views
I have two grid bound columns (numerator) and (denominator) in the telerik grid. Now I am applying Aggregate="Sum " on both the columns.So at the grid footer level it is showing Sum:2100 and Sum:3000 in the grid footer level for both numerator and denominator columns respectively.Now when I am dragging a particular column on the group panel(means we are grouping by that column),then we are getting the above calculation at each group level in group  footer.Now I need to access those group footers in such a way that in the third hidden column's group footer it gives me calculation of 2100/3000.So is it possible to access group footers??    
Anuj
Top achievements
Rank 1
 asked on 06 Jul 2012
6 answers
1.0K+ views
Hi there
 I am using Rad-menu for an application. I want to display rad-menu in following format

Mainmenuitem1: Subitem1-subitem2-subitem3
mainitem2: subitemA- subitemB-subitemC
mainitem3

Vertical Menu Items with Horizontal Submenus
Please advise how to do this.
Thanks
Gandharv
Top achievements
Rank 1
 answered on 06 Jul 2012
1 answer
161 views
Hi

I have created a custom template for the radwindows radconfirm dialogue as follows

<telerik:RadWindowManager ID="RadWindowManager2" runat="server" VisibleTitlebar="false" MaxHeight="50px" KeepInScreenBounds="true " Behaviors="None" Skin="Telerik">
        <ConfirmTemplate >       
        <div class="rwDialogPopup radconfirm">
            <div class="rwDialogText">
                {1}
            </div>
            <div>
                <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
                    <span class="rwOuterSpan"><span class="rwInnerSpan"><%= Localization.GetString("OKConfirm.Text", this.LocalResourceFile)%></span></span></a>
                <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
                    <span class="rwOuterSpan"><span class="rwInnerSpan"><%= Localization.GetString("CancelConfirm.Text", this.LocalResourceFile)%></span></span></a>
            </div>
        </div>
         
         
        </ConfirmTemplate>
    </telerik:RadWindowManager>
 this works fine where i get the localized text for Ok and cancel buttons.

However the issue is that the radconfirm box is draggable out of the screen area there by giveing scrolls nto the page. As show in the image.

How can i prevent this.
Marin Bratanov
Telerik team
 answered on 06 Jul 2012
5 answers
200 views
Hi,

I have a ascx user control on a page which has a cancel button and on the container/parent page is the RadWindow.

How do I show this parent RadWindow in Javascript onclick of the button?

Thanks
rdmptn
Top achievements
Rank 1
 answered on 06 Jul 2012
2 answers
66 views
Hello,
I have developped an application with a lot of RadWindows.
It works well with Chrome, Firefox, Internet Explorer 9, Internet Explorer 8.0.7601.xxx but with Internet Explorer 8.0.6001, it is a real mess.

When I click on a button which should open a radwindow, the browser redirects me to
res //ieframe.dll/acr_error.htm or closes and reopens the tab.
I'm using jquery-1.6.2.js and jquery-ui-1.8.16.custom.min.js .

Have you already encountered these kind of behaviours?

Thank you.
Julien
Top achievements
Rank 1
 answered on 06 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?