PDA

View Full Version : RowExpander plugin question



Krixus90
26 Sep 2014, 6:37 AM
Hello,

I am using a rowexapender plugin in my grid and I would like to change it a little bit.
I want to move the '+' icon in the beginning of the row on the last position. I also need to change the icon of this button. Is it possible?

Thank you very much!

slemmon
29 Sep 2014, 10:58 PM
Hi,

I'm afraid there's not a way to do this by config. You'll have to extend the RowExpander plugin and start to work with some private methods (so beware that your derived class can break as the frame matures and future versions are released). You'll set the position of the expander column, the +/-, in the addExpander method.

And you'll edit the +/- renderer markup (classes setting the background image) in the getHeaderConfig method.

asahoo
7 Oct 2014, 2:57 AM
your requirement can be detailed in 3 steps

1. Removing the +/- Icon from the first column of the grid
2.Using the different Icon (in last column of the grid ) for expand/Collapse
3.Row Expansion and Collapse action

1.In order to remove the default +/- Icon you need to overwrite the rendered of getHeaderConfig of the row expander in your code.
2.For using different icon you can add an action column to your grid as last column and you can provide customized icon in that.
3. on the click of that icon you need to perform the required task and change the Icon.