1
votes

I have dijit/layout/ContentPane. And I want to place a Table in it. To be exact, I need a table-aligned content with borders. The table looks like this:

-------------------------------
Header 1 | Value 1 | CheckBox 1
Header 2 | Value 2 | CheckBox 2
Header 3 | Value 3 | CheckBox 3
-------------------------------

Is it possible to create it declaratively (I think, I've checked all possible containers for that) or I should take a Grid and make a storage etc. etc.?

Important point: I need not a data-table. I need a layout container, that will act like regular HTML table and I'll be able to put it inside dojo ContentPane and apply styles.

1
Have you looked at TableContainer layout. - frank
Yes, I tried, but I had no luck to implement label-only columns. "Header N" and "Value N" are simple text strings. Maybe I'm missing something simple here ... - Antenka
why don't use the standard HTML <table> element, where each data element represents text or a dojo widget? Can you provide more information what exactly are you trying to achieve? Are you creating the table to display data or interact with the table data? You need to provide more information. - frank
I've started from the regular HTML table. But for some reason, I couldn't change it's styling (I've tried inline and attached css file). And I made an assumption, that it's because I'm constructing all this inside dojo ContentPane. So I decided to find a proper dojo control to make it work. In my case, table needed only as a Layout Container. Not the data-table with all it's attributes. Maybe I'm missing something and it's possible to make regular table styleable ... - Antenka
I've tried one more time with a regular table and it worked :) Must be, I made some mistake in markup previously. Thanks for your time. - Antenka

1 Answers

0
votes

Try to use dgrid. You may follow this link http://dgrid.io/

I have been using it until now. It is quite simple to use, and also, it allows you to easily set the scroll-bar, add events on dgrid-select, and many more. Have you learned about dojo store? Please follow this if you haven't: http://dgrid.io/js/dgrid/demos/laboratory/ (you may ignore it if you already have learned about dojo store)...