hello,
I am using Infragistics wingrid and c#.I am using the Excel Export Functionality to create a .xlsx file.We have written some code for formatting the exported columns from the grid but we are getting unexpected errors as Unable to merge or the columns are exported in wrong arrangement like :
we have one main grid and several child grids , we want the columns of parent grid to be displayed first then the columns of child grid should be displayed but the columns are displayed in a manner like 1st 2 columns of parent are added then 1 of child etc.
Can you please help us , i have registered version of ingragistics.
Thanks & Regards,
Seema Sharma
Hello Seema,
I`m not sure that I understand well your scenario, but I try to reproduce it in a small sample. Could you please take a look at the attached sample and if you think that I didn`t reproduce your issue, feel free to modify this sample and revert it back to me. I`ll be glad to research it for you.
Let me know if you have any questions.
Regards
this is the sample
Could you please tell me the exact place in your source code, where is throwing null reference exception ?
My guess is that Column is null. So you should check to make sure e.GridHeader.Column is not Nothing before you try to access the Tag property.
hi,
The column value is null , but it was working fine in prior version without any change in the code (above specified).
I m not getting how to resolve this , can you please help me.
The column is not null when we use the same code for infragistics 2003.7
Seema Sharma.
Hi,
There are other types of headers besides column headers. There's the grid header (which I don't exports, anyway), but there are also Group headers. So you are probably getting into that event for a Group header and so the column is null.
So just check to see if the Column is nothing and then skip your code that tries to access the Tag.
(not e.GridHeader.Column is nothing andalso e.GridHeader.Column.Tag != null)