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

exporting/printing column

5 Answers 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
david ocasio
Top achievements
Rank 1
david ocasio asked on 08 Nov 2009, 09:11 PM
is there a way during an export event to tell which column is being referenced

i dont see a way in the eventargs

thanks
dco

5 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 09 Nov 2009, 04:06 PM
Hello,

Currently there is no such way however we can improve this definitely! Can you share some more about your scenario?

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
david ocasio
Top achievements
Rank 1
answered on 09 Nov 2009, 07:26 PM
Sure,

I have a grid which is being used as a worksheet for entry of quantity of stock that is being moved from one location
to another.

In order for the user to make an intelligent decision about what to pick a number of fields are displayed.
and this grid is printed (a pick sheet) as reference as they go out to get the stock.

This is fine in the grid but needs to be massaged when printed.
Tts too wide and needs  some better styling

I currently
insert <br> in header names where i wanted them to make the header two lines tall
insert a <span> in numeric cells so i can apply text alignment to the fields

not for the faint of heart --> I have done a very bad thing <--
but it works so who cares

i count the number of rows that have been exported and when it hits a predertimined count
i inject a page break and reproduce the header from the top of the table.
of course i know that this code is very fragile and will break if you ever change the HTML
your export routines are producing but ill deal with that when it comes.

So what would be cool for me in your export routine

  1. a style attribute that could be applied to the underlying value on a "table" basis and then on a "td" and "tr" basis.
  2. a class attribute that could be applied to the underlying value on a "table" basis and then on a "td" and "tr" basis.
  3. an indicator as to what type of export we are doing (excel, printing etc)
  4. a reference to the cell/row from the grid that is being exported in your export event.

Now if you wanted to go totally crazy.

  1. An OuterHTML attribute that could be overrided in the export event for each of the items reported assembled.
  2. An InnerHTML attibute that could be overrided in the export event for each of the items being assembled.

of course antying you can do will be appreciated

thanks for listening vlad
dco






0
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 12 Nov 2009, 02:46 PM
Found one more problem on the export topic discussed here

i dont think the export uses the binding convertors

that is the raw data from the column is being sent
this is of course "most" of the time wrong.
what the grid shows is normally what you want to export not the data that drove the output.

this compounds the need to know the name of the columns or a ref to the datacolumn
so it is easier to apply the normal convertor to the data

if i am mistaken about the convertors let me know what i am missing

thanks
dco
0
Vlad
Telerik team
answered on 13 Nov 2009, 07:46 AM
Hello,

We've fixed the problem with converter and this will be included in our latest internal build today. You will find also Context property of the event arguments where you can check the current UI element or column.

We will do our best to provide other enchantments as soon as possible!

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 13 Nov 2009, 11:22 AM
that sounds perfect

thanks vlad
dco
Tags
GridView
Asked by
david ocasio
Top achievements
Rank 1
Answers by
Vlad
Telerik team
david ocasio
Top achievements
Rank 1
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or