cancel
Showing results for 
Search instead for 
Did you mean: 

Table with Multilevel Check Box

Former Member
0 Kudos
133

Dear All,

I am having a requirement to enable table with multilevel check box, can some one help me on this i can find tree structure but i want some thing as in  the below image,

Thansk in advance...!

Suneel Manyam

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

is this possible with SAPUI5???

Qualiture
Active Contributor
0 Kudos

Create a table with two columns with checkboxes? Sure. But you will not have a proper hierarchy

Why not simply use a TreeTable with a checkbox in the first column?

Former Member
0 Kudos

Ho Robin,

Thanks for your response, i tried with tree there it is adding me like hierarchy my requirement is to show as above image i dont have any idea how to implement this. please do help me if you can with some sample code.. you can share with matrix layout also iam fine with that as well

Thansk in advance...!

Qualiture
Active Contributor
0 Kudos

If you need to show tabular data and the TreeTable isn't a good fit, then just use a table, and make the first two columns use a checkbox.

It's actually fairly simple, but anyways, here's an example:


<t:Table id="tbl" rows="{/yourdata}">

    <t:columns>

        <t:Column>

            <t:label><Label text="Type" /></t:label>

            <t:template><CheckBox checked="{type}" /></t:template>

        </t:Column>

        <t:Column>

            <t:label><Label text="Value" /></t:label>

            <t:template><CheckBox checked="{value}" /></t:template>

        </t:Column>

        <t:Column>

            <t:label><Label text="HD2" /></t:label>

            <t:template><TextView text="{hd2}" /></t:template>

        </t:Column>

        <t:Column>

            <t:label><Label text="HD3" /></t:label>

            <t:template><TextView text="{hd3}" /></t:template>

        </t:Column>

        <!-- etc -->

    </t:columns>

</t:Table>

Former Member
0 Kudos

Hi Robin,

this is how i want but with out the tree structure

http://jsbin.com/watatomomi/1/edit?js,output

Qualiture
Active Contributor
0 Kudos

But what about the example I gave you earlier (table with two checkboxes) ? See this working example: Edit fiddle - JSFiddle

Former Member
0 Kudos

Thanks for the working demo,

but when i am checking the parent type its child's should be selected like the example i share

Qualiture
Active Contributor
0 Kudos

Well, since you're a developer, I'll leave that as an exercise for you to solve

See the source of the TriStateCheckBox with dependent checkboxes on how to tackle the dependencies. I just gave a hint on how your UI could look like.

Happy coding!