-
25 Jan 2013 1:52 AM #1
Grid row body column data
Grid row body column data
Hi,
Would like to have some additional information in a row or within a grid. The information might be static or dynamic. Any help?
Please find the below the image showing an example, how shall it look like.
The following text is what is needed to be put in the grid : 'Source : Informa WCIS Q1' 2012 ' - The shown component is a grid, with 2 columns.Thanks,
Ronz
-
25 Jan 2013 4:39 PM #2
Have you tried http://docs.sencha.com/ext-js/4-1/#!...eature.RowBody and http://docs.sencha.com/ext-js/4-1/#!...x.RowExpander?
If you did, what's it doing that you don't expect, or not doing that you expect it to do?
I have implemented the rowbody feature successfully for both static and dynamic data (e.g., loading additional content on row expand).
If you've tried implementing something already, please share whatever code you can and people will help you out. Good luck!
-
25 Jan 2013 11:48 PM #3
Hi,
Yes. I did try implementing the 'RowBody' feature. My bad, should have updated.
However, the implementation done appends the additional information to each and every row in the grid.
What is required is to have the additional information, for a particular row only.
I will update the code asap.Thanks,
Ronz
-
27 Jan 2013 9:05 PM #4
Here is the code :
Hard-coded the text for now. The text - 'Source : Informa WCIS Q1' 2012' comes in all the rows. Need to fix it only for the last row, so that it appears the same as shown in attached image in my previous posts. Please help.Code:ftype: 'rowbody', getAdditionalData: function(data, rowIndex, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: '<div style="padding: 1em">'+'Source : Informa WCIS Q1' 2012+'</div>', rowBodyCls: "my-body-class", rowBodyColspan: colspan }; } }Thanks,
Ronz
-
28 Jan 2013 4:42 AM #5
Tweaked a bit, and achieved wha I required :
Code:if(record.data.key == 'Performance Segment') { rowBodyMod = '<div style="padding-left: 130px;padding-top:5px">'+'Source: Informatics WCIS Q1, 2013'+'</div>'; }else { rowBodyMod = ''; } return { rowBody : rowBodyMod,Thanks,
Ronz



Reply With Quote