I've populated TableView as follow Dynamically.
I want data in last 6 columns to be RIGHT aligned.
How can I set alignment of specific columns dynamically?
Thanks.
Related
I have an editable ExtJS grid, whose 1st row has more height then other rows. The editor is defined for every column based on datatypes. As first row's height is more than the other rows and editor is common, neither I am not able to provide the extra padding on cell-editor in first row only.
As shown here.
How can i resize the width of a column according to the length of the data it occupies.
The table has got about 15 columns and i want to show the column heading without resizing it manually. Is there any option for autoresize?
TableView.setColumnResizePolicy() is what you are looking for.
For Example:
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Have a look at below image, which is a QTableWidget :
You can see that it's a rows with alternating color. But you can also see that it's not vertically filled the table. Which gives a --in my perspective-- rather unpleasant appearance.
If the row content is unable to fill the table vertically, how can we make sure that the alternating rows get drawn vertically full?
That's IMHO not possible without subclassing QTableWidget since Qt only colors actual table rows. In your example the table is not entirely filled with rows, so there's no alternating coloring of the whole table.
I'm using an AdvancedDataGrid without the header row (AdvancedDataGrid.showHeaders="false"), my AdvancedDataGrid has 2 columns, where the first one will show a hierarchical data (tree).
The tree may be very long and very deep or may contain a long string in the node label so the user will not be able to see the whole vale of the tree node, I want to be able to resize the column using the vertical separator of the gris (the one displayed/separates between columns) or to be able to define a horizontal scroll bar only for the first column!
How can I accomplish this?!....Any idea ?!
Try to set the Advanced Datagrid tag's attribute 'wordWrap="true"'.
I have a flex data grid.I need to highlight the selected cell of the data grid.can u please help me?
AdvancedDataGrid does have a property selectionMode. Change property value single cell or multiple cells, you can select and highlight cells.
DataGrid automatically highlights the selected row (see the examples)
If you're looking for a table-like component, check out Grid or Tile.
It would also help if you would post your source code so that we would know what you are trying to achieve.
I know data grid automatically highlights the selected row.But I'm not searching for row highlight. I'm searching for cell highlight.For example say if I will click on 1st cell of data grid, instead of highlighting the first row it will only highlight the first cell(row-0,col-0)
Thanks!
by setting datagrid property -> selectionMode="singleCell"