We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Template Marker display blank instead of NULL for nullable types

I have a class with nullable types that I am binding to template markers. When the nullable type field is null the ApplyMarkers routine displays NULL. Is there anyway to get it to display an empty string instead. Eg: I have the following field

public int? GoalClicks;

When GoalClicks is null ApplyMarkers displays NULL in the Excel spreadsheet cell. I want it to display nothing instead. At the moment it is doing

Goal (Imps)   Goal (Clicks)  Goal(Acqs)

4,000              NULL             NULL

I want it to do

Goal (Imps)   Goal (Clicks)  Goal(Acqs)

4,000                           

Any help with this would be appreciated. Thank you

Regards Ben





3 Replies

SM Saravanan M Syncfusion Team April 25, 2014 07:37 AM UTC

 Hi Benjamin,

 Thank you for contacting Syncfusion support,

Could you please tell your control name with us? It would be helpful to analyze this query further and provide better solution to you.

 Regards,

Saravanan.M



BR Benjamin Rogers April 27, 2014 10:06 PM UTC

It is the ITemplateMarkersProcessor interface on Syncfusion.XlsIO. Eg:

IWorkbook workbook

...

ITemplateMarkerProcessor marker = workbook.CreateTemplateMarkersProcessor();

marker.AddVariable("CampaignDetails", new CampaignDetail[] { dataSource.CampaignDetail });

...

marker.ApplyMarkers();




PM Prasanth M Syncfusion Team May 2, 2014 12:30 PM UTC

Hi Benjamin,

We have created an incident 124503 for the above query. We would like to inform you, to follow the incident 124503 for further updates.

Regards,
Prasanth

Loader.
Live Chat Icon For mobile
Up arrow icon