This is a migrated thread and some comments may be shown as answers.

CSV button show return false

5 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atul
Top achievements
Rank 1
Atul asked on 12 Sep 2013, 07:10 AM
 I am trying to export RadGrid data to CSV format but the button is not working
 i added onRequestStart also but nothing is happening. Then i find
 the issue from firebug it firstly finding my grid and experotCSV function and
 then returning to false.

if(!$find('gvLoginDetail_ctl00').exportToCsv()) return false;__doPostBack('gvLoginDetail$ctl00$ctl02$ctl00$ExportToCsvButton','')
It is a default function of RADGRID tell me
how to remove the below line.

if(!$find('gvLoginDetail_ctl00').exportToCsv()) return false;

5 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 12 Sep 2013, 12:50 PM
Hello,

I have checked in my local code as well as in telerik live demo but i am not able to find "return false;" in the button click event.

Please check the attached screenshot.

Thanks,
Jayesh Goyani
0
Atul
Top achievements
Rank 1
answered on 12 Sep 2013, 01:58 PM
Yes i solve the issue of return false. But still i am not able to export CSV.
I am binding the grid on search and on item-command i am giving instruction to export CSV
if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
                {
                    ConfigureExportCsv();
                }
 
 
public void ConfigureExportCsv()
        {
            gvLoginDetail.ExportSettings.IgnorePaging = chkIgnorePaging.Checked;
            gvLoginDetail.ExportSettings.OpenInNewWindow = chkExportDataInNewBrowserWindow.Checked;
        }
and needDatasource is filling the grid.

I exception i am facing plz guide me.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 13 Sep 2013, 04:30 AM
Hello,

Can you please temporary disable/comment/remove the RadAjaxPanel/RadAjaxManager to check that export functionality?

Using above statement if you are able to export the Grid then the issue is Ajaxify grid.

If still you are not able to resolved this then please provide your code.

Thanks,
Jayesh Goyani
0
Atul
Top achievements
Rank 1
answered on 14 Sep 2013, 04:58 AM
I recreated the form,
Firstly i was binding the dropdown clientside and now i changed it to server side.
On dropdown select radgrid is binding.

I add
<telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel2"
                runat="server">
                <ClientEvents OnRequestStart="onRequestStart" />
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="BtnSearch">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="gvLoginDetail" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="gvLoginDetail">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="gvLoginDetail" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
 Now export is working.
But jayesh my dropdown stop binding. please elaborate on that.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Sep 2013, 12:32 PM
Hello,

Can you please provide your code?

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Atul
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Atul
Top achievements
Rank 1
Share this question
or