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

PushButton GroupingGridToExcel

Hi

When I want to export a gridgroupingcontrol that has a pushbutton column, the function GroupingGridToExcel throw the error "reference object not set to an instance of an object", but when i remove the pushbutton column, it works. Is it an known issue?




1 Reply

MA Mahendran Syncfusion Team March 31, 2011 12:30 PM UTC

Hi Sulma,

I am afraid that I was not able to reproduce the reported issue "Reference object not set to an instance of an object" . Also I have created a simple sample to test this issue and it is available in the following link.

Code snippet [C#]

this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.Column!=null && e.TableCellIdentity.Column.Name=="Contact" && e.TableCellIdentity.DisplayElement.Kind== DisplayElementKind.Record )
{
e.Style.CellType = "PushButton";
e.Style.Description = "Click Me";
}
}


Here is sample for your reference

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Sample1738834677.zip

Please have a look at the preceding sample and if still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution?

Regards,
R.Mahendran.



Loader.
Live Chat Icon For mobile
Up arrow icon