cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adding applet events to i5Grids and i5Charts

Former Member
0 Likes
519

Hi Experts,

I have been trying to add a RowSelection event to a UI5 grid and am unable to.

I am not using MVC but adding charts and grids in the HTML pages in place of applets.

I have seen through the discussion in thread

But I am unable to find the right property to use to add these events.

I have tried to find the property in the UI5 libraries but I guess this is of no avail as the chart I am using (com.sap.xmii.grid.init.i5Grid) is MII specific.

I couldnot find any mention of properties in MII help.

I have also tried to add these in addProps as

var addProps = '{'+

    '"QueryTemplate":"<path to template>",'+

    '"DisplayTemplate":"<pathe to template>",'+

    '"RowSelection ":"<function>",'+

    '"Content-Type":"image/png"'+

'}';

Please advise.

Maaz

Accepted Solutions (1)

Accepted Solutions (1)

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Maaz,

You can use the following function to register for rowselection in i5Grid.

    

     function funcToBeCalledOnRowSelect() {

          alert("Row selected!!");

     }

    

     var g = new com.sap.xmii.grid.init.i5Grid(....);

     g.registerRowSelectionEventHandler(funcToBeCalledOnRowSelect);

For this event to get triggered, Allow Selection should be true and Allow Cell Selection should be configured as false for the i5Grid.

Do let me know if you still face issues.

Regards,

Ria

Former Member
0 Likes

Hi Ria,

Thanks for the prompt reply.

Is there any help or document refrence that provides details of these functions.

Following this I will be using the i5Grid Object Methods aswell and I donot see any help for that aswell anyways will try it first before I post any queries.

Also, can I assume that to add an event I can use the function register<Event>EventHandler where <Event> are the events described in the help document?

Regards

Maaz

RiaNinan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Maaz,

You can access the js doc for i5Chart & i5Grid by using the following URL:

http|s://<host>:<port>/XMII/JSDOC/i5ChartAllClasses.html

Alternatively there is a menu item in the workbench which launches the above documentation url as shown below:

Hope this helps!

Regards,

Ria

Former Member
0 Likes

Thanks Ria,

Thank you very much.

This also drew my attention to the script assistant.

Not sure how I missed this out.

Regards

Maaz

Answers (0)