Title: Multiple row in thead Post by: asulhyan on July 20, 2011, 03:56:18 PM I want to know if I want to have multiple row columns in thead; how it can be achieved. I want to do something like below.
Is this supported ? What is the purpose of the columns being a double array, as per my understanding as represented below, I tried to use it for separate rows ? thanks --------- $('#tablett').datagrid({ title:'test', width:500, height:height, nowrap: true, striped: true, collapsible:false, columns:[[{field:'tt1',title:'test1', width: 100}], [ {field:'tt2',title:'TT2', width: 40}, { field:'tt3',title:'TT3', width: 20} ]] ----- <table> <thead> <tr> <th colspan="2">Test1</th> </tr> <tr> <th >Test2</th> <th >Test3</th> </tr> </thead> <tbody> <tr> <td >data2</td> <td >data3</td> </tr> <tr> <td >data5</td> <td >data6</td> </tr> <tbody> </table> Title: Re: Multiple row in thead Post by: stworthy on July 20, 2011, 08:25:11 PM Here is a tutorial on how to create multiple row head for datagrid.
http://www.jeasyui.com/tutorial/datagrid/datagrid9.php Title: Re: Multiple row in thead Post by: asulhyan on July 21, 2011, 09:04:27 AM thanks, that helps. I was doing a mistake of specifying the field id where I was using the colspan; which I think was asking the function to take its width. That appears to be working now.
Now, my next issue I want to specify td height. I don't see the height property here: http://www.jeasyui.com/documentation/index.php# I want to specify the td height to the place where I colspan. Something like: <th colspan="4" style="height: 100px">Item Details</th> Title: Re: Multiple row in thead Post by: asulhyan on July 21, 2011, 11:02:50 AM As a short term solution for my earlier response I am doing the below. I would appreciate if there is a cleaner way to achieve it. thanks.
$( '.datagrid-header' ) .children( 'div' ) .children( 'table' ) .children( 'tbody' ) .children( 'tr::nth-child(1)' ) .css('height','30px'); Title: Re: Multiple row in thead Post by: asulhyan on July 21, 2011, 11:06:39 AM Though I gave example of height attribute. I would like to know if we can add it using style as I will also be adding custom styles to below:
$( '.datagrid-header' ) .children( 'div' ) .children( 'table' ) .children( 'tbody' ) .children( 'tr::nth-child(1)' ) |