Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
257 views

Hi all, i faced an issue which my radajaxpanel become not working after I clicked the excel export button.

Here is my spec:
1. Using RadAjaxPanel
2. Using ClientEvents-OnRequestStart="onRequestStart" to disable ajax
3. Using CommandItemTemplate and image button in it.
4. Using server-side method to export

Here is the problem:
1. Everything works fine before export excel
2. All the controls in RadAjaxPanel not working after perform the export action.
3. Found that there is no postback after i clicked the export button.

Here is my source code:
RadCodeBlock:
<telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
        <script type="text/javascript">
            function onRequestStart(sender, args) {
                if ( args.get_eventTarget().indexOf("mngBtnExcel2") > 0) {
                    args.set_enableAjax(false);
                }
            }
            function RowContextMenu2(sender, eventArgs) {
                var menu = $find("<%=RadMenu2.ClientID %>");
                var evt = eventArgs.get_domEvent();
 
                if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
                    return;
                }
 
                var index = eventArgs.get_itemIndexHierarchical();
                document.getElementById("radGridClickedRowIndex").value = index;
 
                sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
 
                menu.show(evt);
 
                evt.cancelBubble = true;
                evt.returnValue = false;
 
                if (evt.stopPropagation) {
                    evt.stopPropagation();
                    evt.preventDefault();
                }
            }
        </script>
    </telerik:RadCodeBlock>

RadAjaxPanel:
<telerik:RadAjaxPanel ID="SearchPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="onRequestStart">
                <telerik:RadGrid ID="rgLetter2" runat="server" OnNeedDataSource="rgLetter2_NeedDataSource"
                    AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True"
                    CellSpacing="0" GridLines="None">
                    <ClientSettings>
                        <ClientEvents OnRowContextMenu="RowContextMenu2"></ClientEvents>
                        <Selecting AllowRowSelect="true"></Selecting>
                    </ClientSettings>
                    <GroupingSettings ShowUnGroupButton="false" CaseSensitive="false"></GroupingSettings>
                    <ClientSettings AllowDragToGroup="True">
                        <Selecting AllowRowSelect="True" />
                        <ClientEvents OnRowContextMenu="RowContextMenu2" />
                    </ClientSettings>
                    <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="true" AutoGenerateColumns="false"
                        CommandItemDisplay="Top" DataKeyNames="LetterID" EnableGroupsExpandAll="true"
                        GroupLoadMode="Client" PageSize="50">
                        <CommandItemSettings ShowAddNewRecordButton="false" />
                        <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" Position="TopAndBottom" PageSizes="50,100,150,200"/>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="LSubject" HeaderText="Subject" SortExpression="LSubject"
                                UniqueName="LSubject" FilterDelay="2000" ShowFilterIcon="false" FilterControlWidth="200px">
                                <ItemTemplate>
                                    <a href='<%# Page.ResolveClientUrl("ViewOutgoingLetter.aspx") %>?LetterID=<%# Eval("LetterID") %>'
                                        target="_blank">
                                        <%# Eval("LSubject")%></a>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="Company" HeaderText="Company" SortExpression="Company"
                                UniqueName="Company" FilterDelay="2000" ShowFilterIcon="false">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <table width="100%">
                            <tr>
                                <td align="left">
                                    <a href="#" onclick="return openNewLetterWindow('<%# hfproject.Value %>','<%# hfBU.Value %>');">
                                        <img style="border: 0px; width: 20px; height: 20px;" alt="" src="../App_Themes/MetroRed/Grid/AddRecord.gif" />New</a>
                                </td>
                                <td align="right">
                                    <asp:ImageButton ID="mngBtnExcel2" runat="server" OnClick="btnExcel_Click2" ImageUrl="../App_Themes/MetroRed/Grid/AddRecord.gif"></asp:ImageButton>
                                </td>
                            </tr>
                        </table>
                        </CommandItemTemplate>
                    </MasterTableView>
                </telerik:RadGrid>
                <telerik:RadContextMenu ID="RadMenu2" runat="server" OnItemClick="RadMenu2_ItemClick"
                    EnableRoundedCorners="true" EnableShadows="true">
                    <Items>
                        <telerik:RadMenuItem Text="View" ImageUrl="../App_Themes/Image/VIEW.gif">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Print Preview" ImageUrl="../App_Themes/Image/PRE.gif">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Duplicate" ImageUrl="../App_Themes/Image/COPY.gif">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="Send Attachment(s)" ImageUrl="../App_Themes/Image/EML.gif">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadContextMenu>
                </telerik:RadAjaxPanel>


.cs:
protected void btnExcel_Click2(object sender, EventArgs e)
    {
        //rgLetter.ExportSettings.Excel.Format = (GridExcelExportFormat)Enum.Parse(typeof(GridExcelExportFormat), "ExcelML");
        rgLetter2.ExportSettings.IgnorePaging = true;
        rgLetter2.ExportSettings.ExportOnlyData = true;
        rgLetter2.ExportSettings.OpenInNewWindow = true;
        rgLetter2.MasterTableView.ExportToExcel();
    }

Hope you guys can help me on this, i has been stuck by this issue more than 2 days.. T.T ... Thanks guys...



Princy
Top achievements
Rank 2
 answered on 26 Mar 2014
5 answers
244 views
Hi
I'm using Tabstrip control in my application which contains 5 diffrent tabs.
I want to open each tab by using the key board tab key.
When I do tab its selecting the tab but then I need to press the enter button.
How can I open the tab whenever I press the tab key without enter(pressing the enter key)?
By accesskey aslo I need to press the enter once I select the tab using ALT+ACCESKEY combination.
Please help me regarding this ASAP.
Bozhidar
Telerik team
 answered on 26 Mar 2014
1 answer
832 views
I'm having an issue updating content on a master page, using strongly typed controls. 

On my master page, i have public classes that expose the .visible property of an asp.net panel, the content page sets the param to true or false. I have a radajaxmanager on master page and proxy on sub page, however I am unable to ajaxify the panels on the master.

For the solution I would prefer not to use FindControl()

Can someone point me in the correct direction?
Shinu
Top achievements
Rank 2
 answered on 26 Mar 2014
1 answer
195 views

Export to excel doesn't work for TreeListTemplateColumn

pls see below.

https://demos.telerik.com/aspnet-ajax/treelist/examples/export/excelexportbasics/defaultcs.aspx 
Shinu
Top achievements
Rank 2
 answered on 26 Mar 2014
3 answers
117 views
I'm having a radgrid on a page that contains 6 columns including a dropdownlist. The dropdown list value can be changed by the user at runtime. There is a save button (asp:button) and I'm looking to get all values of the row/columns on a button click on the page. Please help how to extract all the values from the grid. Many thanks.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2014
2 answers
132 views
Hi,

Some of our users are finding it difficult to grasp the difference between a RadToolBarSplitButton  and a RadToolBarDropDown.
It seems that the subtle difference in the vertical offset of the dropdown arrow is not sufficient.

So, we'd like to add a thin vertical bar (like a separator) between the image and the dropdown arrow on the split button.
One solution that comes to mind is to add this bar to the image itself, but the image changes so we'd need to modify all of the images.

Is there some other technique that we could employ to accomplish this?

Thanks in advance for any advice.

Jim
jlj30
Top achievements
Rank 2
 answered on 25 Mar 2014
1 answer
177 views
We used a RadHtmlChart and its DataSource is a dataset that is populated by a method able to recover data form MS SQL Server and Oracle. Our application gives to RadHtmlChart is always a dataset.

What we are facing is the following: 

The RadHtmlChart does not display the chart when it receives the data from Oracle database. But when we test our application in debug mode, we can see that this dataset and filled RadHtmlChart is receiving data without accusing errors, but the chart is not displayed.
Márcio
Top achievements
Rank 2
 answered on 25 Mar 2014
5 answers
173 views
Hello,

I have a combo box inside a GridTableView. It is populated on demand (Load on demand)
I want to make that ComboBox the other two TextBox controls to be populated with appropriate data when the ComboBox's index is changed.
How do i do that?

Thank you so much 
Jugoslav
Top achievements
Rank 1
 answered on 25 Mar 2014
2 answers
224 views
Just like the title says.  The EmptyMessage in a RadTextBox  wraps fine in Chrome and FireFox but shocker, it does not wrap correctly in IE.  Any ideas what CSS style I have to set to get it to wrap correctly?  See attached.
john81
Top achievements
Rank 1
 answered on 25 Mar 2014
2 answers
65 views
I have an application that I am working on where I am using the Sunset skin.  Everything works find when running the site but when in the development environment I get this error for all the rad controls that reference the sunset skin



I am using VS 2013 and telerik controls version 2013.3.1114.40.  I have the reference to Telrik.Web.UI.Skins in the project.
Frank
Top achievements
Rank 1
 answered on 25 Mar 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?