Title: hi, how can I show a tree instead the datagrid in a subgrid? Post by: catpaw on January 09, 2014, 12:28:58 PM I saw this demo:
http://www.jeasyui.com/tutorial/datagrid/datagrid22.php And what I need is show a tree instead the datagrid that is possible?? Title: Re: hi, how can I show a tree instead the datagrid in a subgrid? Post by: stworthy on January 09, 2014, 05:39:46 PM It is easy to display any components in the row detail container. The code below shows how to achieve this functionality.
Code: $('#dg').datagrid({ Title: Re: hi, how can I show a tree instead the datagrid in a subgrid? Post by: catpaw on January 09, 2014, 06:44:59 PM awesome stworthy
:o Im very thankful Title: Re: hi, how can I show a tree instead the datagrid in a subgrid? Post by: catpaw on January 13, 2014, 08:20:43 AM Hi
Continuing with the example, place a tree in the subgrid the tree has a checkbox to true my problem is when : - Open a row (+) and I get the list of tree that row , then I check some options - Close that row (-) - I open the back row ( +) and the options I had checked, no longer remain active eg 1.- -------------------------------------------------------------- | - | row1-colum1 | row1-colum 2 | -------------------------------------------------------------- | | + | subrow1-column1 | subrow1-column1 | --> if open this subrow -------------------------------------------------------------- | | + | subrow2-column1 | subrow2-column1 | -------------------------------------------------------------- | + | row2-colum1 | row2-colum 2 | -------------------------------------------------------------- | + | row3-colum1 | row3-colum 2 | -------------------------------------------------------------- 2.- -------------------------------------------------------------- | - | row1-colum1 | row1-colum 2 | -------------------------------------------------------------- | | - | subrow1-column1 | subrow1-column1 | -------------------------------------------------------------- | * [] Fruits | --> get the tree | --- * [] apple | | --- * [] orange | -------------------------------------------------------------- | | + | subrow2-column1 | subrow2-column1 | -------------------------------------------------------------- | + | row2-colum1 | row2-colum 2 | -------------------------------------------------------------- | + | row3-colum1 | row3-colum 2 | -------------------------------------------------------------- 3.- -------------------------------------------------------------- | - | row1-colum1 | row1-colum 2 | -------------------------------------------------------------- | | - | subrow1-column1 | subrow1-column1 | -------------------------------------------------------------- | * [ / ] Fruits | --> check some items | --- * [ / ] apple | | --- * [] orange | -------------------------------------------------------------- | | + | subrow2-column1 | subrow2-column1 | -------------------------------------------------------------- | + | row2-colum1 | row2-colum 2 | -------------------------------------------------------------- | + | row3-colum1 | row3-colum 2 | -------------------------------------------------------------- 4.- -------------------------------------------------------------- | - | row1-colum1 | row1-colum 2 | -------------------------------------------------------------- | | + | subrow1-column1 | subrow1-column1 | --> close the subrow1 -------------------------------------------------------------- | | + | subrow2-column1 | subrow2-column1 | -------------------------------------------------------------- | + | row2-colum1 | row2-colum 2 | -------------------------------------------------------------- | + | row3-colum1 | row3-colum 2 | -------------------------------------------------------------- 5.- -------------------------------------------------------------- | - | row1-colum1 | row1-colum 2 | -------------------------------------------------------------- | | - | subrow1-column1 | subrow1-column1 | -------------------------------------------------------------- | * [] Fruits | --> open again subrow1 and the options I had selected, no longer remain active | --- * [] apple | | --- * [] orange | -------------------------------------------------------------- | | + | subrow2-column1 | subrow2-column1 | -------------------------------------------------------------- | + | row2-colum1 | row2-colum 2 | -------------------------------------------------------------- | + | row3-colum1 | row3-colum 2 | -------------------------------------------------------------- What I can do to make the boxes I check stay active? here is my code Code: $('#dg').datagrid({ Title: Re: hi, how can I show a tree instead the datagrid in a subgrid? Post by: stworthy on January 14, 2014, 01:19:59 AM To solve your issue, please prevent from re-creating tree component again when expand a row. Try the code below:
Code: onExpandRow: function(indext,rowt){ Title: Re: hi, how can I show a tree instead the datagrid in a subgrid? Post by: catpaw on January 14, 2014, 07:22:07 AM perfect!!!
thank you very much, all your work is amazing ;D |