Hey all,
I am trying to export to Word on one of my radgrids. I have used this tool before and it has worked flawlessly. However I am running into an issue with one that I am trying to implement now.
I have a grid that has two exportable="false" columns that are supposed to disappear in the downloaded file. Currently what happens is that I lose the pager from top and bottom, the exportable columns disappear and nothing starts to download upon button click.
From before, exportable="false" columns have always worked for me as well as the export to word. I tested the other exports and none work. They all currently do the same thing. To my knowledge, I haven't implemented anything differently in my NeedsDataSource or ItemDataBound.
Anyone got any ideas as to why this is happening?
I am trying to export to Word on one of my radgrids. I have used this tool before and it has worked flawlessly. However I am running into an issue with one that I am trying to implement now.
I have a grid that has two exportable="false" columns that are supposed to disappear in the downloaded file. Currently what happens is that I lose the pager from top and bottom, the exportable columns disappear and nothing starts to download upon button click.
From before, exportable="false" columns have always worked for me as well as the export to word. I tested the other exports and none work. They all currently do the same thing. To my knowledge, I haven't implemented anything differently in my NeedsDataSource or ItemDataBound.
Anyone got any ideas as to why this is happening?
7 Answers, 1 is accepted
0

Alexander
Top achievements
Rank 1
answered on 30 Jun 2014, 10:02 PM
The columns are corresponding to GridTemplateColumns if anyone is wondering. One of the columns has two buttons inside. And the other has just a single button. As per before, I was able to use export with the exportable="false" on gridtemplatecolumns just like the one I am working with. They also had buttons in them as well.
0
Accepted

Princy
Top achievements
Rank 2
answered on 01 Jul 2014, 06:02 AM
Hi Alexander,
Please note that if you are Ajaxifying your Grid, you need to cancel it during export. The exporting feature works only with regular postbacks. This means, that the asynchronous postback should be canceled when performing an export.
More information on this topic is available below:
Export from ajaxified grid
Exclude controls from ajaxifying
Provide your code if this doesn't help.
Thanks,
Princy
Please note that if you are Ajaxifying your Grid, you need to cancel it during export. The exporting feature works only with regular postbacks. This means, that the asynchronous postback should be canceled when performing an export.
More information on this topic is available below:
Export from ajaxified grid
Exclude controls from ajaxifying
Provide your code if this doesn't help.
Thanks,
Princy
0

Alexander
Top achievements
Rank 1
answered on 01 Jul 2014, 02:02 PM
Hey Princy, thank you so much for responding!
I am not pulling in the information via ajax (I think) as I do not have a RadAjaxManager in my code at all.
What I do is load the information for all but the two columns in question in the NeedDataSource. Then in the ItemDataBound I load the button controls within the columns with their onclicks by using FindControl.
I am not pulling in the information via ajax (I think) as I do not have a RadAjaxManager in my code at all.
What I do is load the information for all but the two columns in question in the NeedDataSource. Then in the ItemDataBound I load the button controls within the columns with their onclicks by using FindControl.
0

Alexander
Top achievements
Rank 1
answered on 01 Jul 2014, 03:58 PM
On another page, I have autopostback enabled and whenever I change the sort order of a column, the page seems to 'refresh' like an autopostback should. However on my current page, it doesn't seem to change like that. Instead it just loads the information. Even though in the behind code, I have an If page.IsPostBack, it shows it to be a PostBack. Not sure how that is happening unfortunately.
0

Alexander
Top achievements
Rank 1
answered on 01 Jul 2014, 07:47 PM
It is not in an update panel either. Unfortunately I have realized that nothing on my page is causing the autopostback to refresh the page. I am going to attempt to figure that and then I believe my radgrid will export successfully.
0
Hi Alexander,
Please make sure you are not using an asp:UpdatePanel. Basically the described behavior is commonly observed when an ajax is enabled. Also you could check out the MasterPage for any ajax controls if you are using one.
Regards,
Kostadin
Telerik
Please make sure you are not using an asp:UpdatePanel. Basically the described behavior is commonly observed when an ajax is enabled. Also you could check out the MasterPage for any ajax controls if you are using one.
Regards,
Kostadin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Alexander
Top achievements
Rank 1
answered on 03 Jul 2014, 12:16 PM
Thanks Kostadin/Princy! I found out my page was inside another module that had an update panel surrounding my page. So while it looked like I didn't have an update panel, there truly was one on my work.
Thanks to both of you!
Thanks to both of you!