Drawing Object Click Events

I'm loading a GridWeb control from a .xls file on the server. I have drawing objects (eg. Oval, Rectangles, RadioButtons (form control), etc.) displayed in the grid and would like to be able to capture the click event of these drawing objects. I basically need the name of the control when I click on it (no post back).

I have event code to capture the double click of a cell, but can't figure out how to capture a click event of a drawing object.

Below is my code to load the GridWeb control...

// Gets the web application's path.
string path = Server.MapPath("~");

// Upper level.
path = path.Substring(0, path.LastIndexOf("\\"));
string fileName = path + "\\Data\\TestDoc.xls";

// Clears datasheets first.
GridWeb1.WebWorksheets.Clear();

// Imports from a excel file.
GridWeb1.WebWorksheets.ImportExcelFile(fileName);

GridWeb1.EnableDoubleClickEvent = true;

Thanks to anyone who replies :)

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb.

We have logged your issue for investigation in our database. We will look into this issue and help or advise you asap.

Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41312.

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb.

We need your more help to investigate this issue. Please provide us your source files and the screenshots to illustrate your requirements.

Please also highlight your requirements with red circles inside the screenshots.

It will help us evaluate your requirements more precisely.

Thank you for the reply.

Attached is my source web application. In the zip file is a word doc (READ ME.docx). This describes my requirements.

Hi,


Thanks for your project and template file.

Well, the controls/shapes in the Excel template file are rendered as images/pictures in the GridWeb, so you cannot manipulate them at runtime in the GridWeb. I have logged your project to attach it in your existing ticket “CELLSNET-41312”. It is not an issue rather a limitation in GridWeb control. Anyways, we will look into it soon.

Thank you.


Appreciate the reply Amjad.

I think I know the answer, but is there a way to render the drawing controls as actual radio buttons/checkboxes/ovals vs. images in the GridWeb control similar to how you could create drawing objects on the fly? Doing this, I would assume, would allow one to interact and capture events of that object.

Thanks again.

Hi,

Thanks for your comment/feedback and using Aspose.Cells for GridWeb.

Your Read Me explains your requirements well. Please spare us some time to evaluate these requirements.

We have also logged your comment in our database against the issue id: CELLSNET-41312.

Once, we will have some update for you, we will share it with you asap.

Hi,

Please try the attached Aspose Cells GrideWeb v2.7.14.2003.

We now support the new feature request logged as CELLSNET-41312.

You can use OnShapeSelectedClientFunction to set client javascript function for the event when shapes are clicked.

We have also attached the updated
.aspx page file for sample usage reference.

Thank you.

Thanks Amjad.

I really appreciate the quick turn around, but for drawing shapes like Ovals and Rectangles, I was hoping to get the object's name. So for example, if in the spreadsheet, an oval shape's name is Oval 1, I would like to retrieve that value in the shape.getAttribute() method. I tried 'namevalue' but it comes back null.

Hi,

We will provide you the feature i.e.. retrieving shape's name and shape's type, text representation of shapes, actual control's value of the shape etc.

So, you could get in JavaScript like this:

function onShapeSelected(shape)
{
var name= shape.getAttribute("namevalue") ;
var type=shape.getAttribute("msotype") ;
var text=shape.getAttribute("textvalue") ;
var value=shape.getAttribute("controlvalue") ;
//....................................
}

It will be available in the next version/fix, e.g., Aspose.Cells.GridWeb.2.7.14.2004 that would be delivered in the next week hopefully.

Thank you.

Hi,



Please try the fix: v2.7.14.2004 (GridWeb), we have made enhancements as per my previous post.

Thank you.

I will try it out.

Thanks again for the fab support and turn around.

The issues you have found earlier (filed as CELLSNET-41312) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan