Quick question, how do I append a cell on the top of my Grid with Image in it?
I have a grid that is exported to Excel and now it requires the company logo on the top of the page; position A1,1A
From what I can see, the grid position starts at Band[0] as the top label. How do I append a cell on top of it and insert an image? I tried to add a new column, and insert a new row to it but this just added a new column at the end and the image is not showing.
string _logoPath = Server.MapPath("~/include/images") + "/myLogo.jpg";
UltraGridRow ImageRow = new UltraGridRow(); ImageRow.Style.BackgroundImage = _logoPath; myGrid.GridMain.Rows.Add(ImageRow, true, true);
Any pointer is appreciated. Thanks in advance.
Hello InfraUser ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thank you for posting in our forum.
If you just need to add the image to the excel report you could manually create a worksheet and add an image to a specific row and cell in the way described in our documentation here:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=ExcelEngine_Add_an_Image_to_a_Worksheet.html
Then you could use one of the overloads of the UltraWebGridExcelExporter’s Export methods in which you can define the worksheet and the start row and column the grid should be exported to. For example if you want the grid to start from the 1st row and 0 column :
this.UltraWebGridExcelExporter1.Export(this.UltraWebGrid1, worksheet,1,0);
Please refer to the attached sample and let me know if you’re trying to achieve something similar.
Developer Support Engineer II