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("~");
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.
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.
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.
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.
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