ergr - Tuesday, September 17, 2013 5:52 AM:
Hi,
I added one property(list) to a Relationship ItemType. Can I add field event for this field on relationship? I tried by adding this field on the relationship itemtype' s form and added a field event-OnChange. But I think event is not being called on changing value from the relationship grid. I will not open form to fill in that field, just fill that from relationship grid.
Is this the correct way of adding field event for relationship item's field?
Thank you
mendenaresh1357 - Tuesday, September 17, 2013 7:40 AM:
Hi Egr,
You have to use Property Event onEditFinish/ OnChangeCell for your requirement. From the Relationship Itemtype open the Property you added. You should add you method in the "Event" relation tab.
Regards,
Naresh Mende
ergr - Thursday, September 26, 2013 2:40 AM:
Thank you Naresh,
Property Event helped me a lot. Is it possible to disable a Relationship field using Property Event?
mendenaresh1357 - Thursday, September 26, 2013 4:45 AM:
Yes, you can disable a cell on Grid. Look at the APII documentation for Cell class.
You can also use onEditStart Event (for property you want to disable) . In the method add "return false" line. This will disbale the Cell.
ergr - Thursday, September 26, 2013 7:48 AM:
Naresh, Thanks again for your quick reply. Yeah the API reference talks about many methods for a cell, going through that. How do I use a method for a cell? For ex. if I want to add background color to a cell on relationship grid how can I do that. There is a method SetBgColor("") . How to and where to use this for a particular cell?
Let me explain the above ex. clearly, If I add a relationship, one field of the relationship should come up with a color filled in it . I tried calling the above said method in the propertyEvent like top.aras.Cell.SetBgColor("DDD"); . But error states object is not supported. Which could be the correct way to add some color to cell on load?
Worked! I added a client event with OnAfterNew to add color to the Cell. It worked.
Thanks.
mendenaresh1357 - Friday, September 27, 2013 6:01 AM:
You should get the Handle on cell object to use the methods given in API Reference. See below code.
var gridCell = gridApplet.cells(rowIndex, columnIndex);
now you cell object in the variable "gridCell". You can apply all the cell related methods to 'gridCell'
Regards,
Naresh