Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
e.GridRow is nothing in RowExported event
posted

Hi

I have 2 columns in a webhierarchicaldatagrid (see below) the 1st one is exported with all the html tags (span, nobr) which is not ideal so I am trying to substitute this value with the non encoded value in column 2. I thought I could extract this value in the RowExported event using the e.GridRow.Items(1).Value but e.GridRow is nothing. I've tried a databind just before the export but still no luck.

I'm on version

Infragistics4.Web.v11.2, Version=11.2.20112.1019

Thanks in advance

 

<

 

 

ig:TemplateDataField Key="FundName" Width="250px">

 

 

 

 

<Header Text="Fund Name" />

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<span><nobr><%# DataBinder.Eval(CType(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "FundName")%>

</nobr></span>

 

 

 

 

</ItemTemplate>

 

 

 

 

</ig:TemplateDataField>

 

 

 

 

<ig:BoundDataField DataFieldName="FundName" Key="FundNamexl" Hidden="true">

 

 

 

 

<Header Text="FundName" />

 

 

 

 

</ig:BoundDataField>

 

 

Parents
No Data
Reply
  • 33839
    posted

    Hi johnnyregan,

    I investigated this and confirmed you are right.  That property actually does not exist in 11.1.  It became visible in 11.2 when the class structure was changed for the exporter event args.  It is not used at all by that event.  The correct way to handle this case is to handle the GridRecordItemExported event on the excel exporter.  This will fire for only grid cells being exported (RowExported fires for all EXCEL sheet rows being exported, so therefore GridRow would still be null in some cases).  You will just need to do your logic in the GridRecordItemExported  event only if eventArgs.GridCell.Column.Key is your key of interest (you could check for index 0 if you want).  Then set  eventArgs.WorksheetCell.Value to what you want.

    regards,
    David Young 

Children