Devexpress XtraGrid columns Text Alignment - devexpress

Devexpress XtraGrid columns Text Alignment .?
Example:

You can set your grid column text properties from below settings, please refer screen shot

The VAlignment property that you are referring to will simply vertically align the column header text, not rotate it to be displayed vertically.
There are several example tickets in the DevExpress support center with sample projects demonstrating how to achieve this behavior via the GridView's GridView.CustomDrawColumnHeader event.
See:
How to rotate BandedGridColumn or GridColumn caption ?
Xtra Grid Vertical Headers
Display a GridView column header text vertically

Related

Center data displayed in an XRLabel in DevExpress

I have a DevExpress XtraReport where I want a field with text to be displayed in the middle of the row regardless of size.
The data is bound to an XRLabel but it will not align to the center of the label.
I have tried setting it via TextAlign and also via style and setting the stylepriority to true for text align but it still is not aligning to the center.
I am referring to the label with the "FinalNotices.PracticeName" in the picture below.
Thanks

Grid view-Clickable and Expandable row

How can i make the rendered grid view row clickable and expandable on click of a row.
The row when click must expand down with few text fields.Then when click again must collapse.
Is this possible in Rendered Grid view.I want to populate database records in this grid view,hence i can not use html table for this purpose.
Appreciate ur help

Flex - Hide DataGrid Columns and Show Header and Header Text

Is there a way to hide all the DataGrid columns, and not make them included in layout, and still show the header row along with its header text?
I was able to make the DataGrid columns not visible, and not included in layout, but that makes the header text no longer appear.
If no data comes back from the data provider, I want all the columns to disappear and then the header row still be visible along with its text.
Any helps is appreciated. If I cannot figure it out, I guess I will just not show the entire grid at all, but I really want the header row with its text to still be visible.
FYI - In the place of the grid columns, I have a message alert appear, which is why I still want the header row with its text, but I need to not have the columns included in the layout, or visible so I can display the alert message.
Thanks
A DataGrid allows you to set the rowCount, which is the number of visible rows. Note that the header row is considered a row, so if you want to show just the header, set the rowCount to 1. Hope that helps.

wordWrap="true" does not work in Flex Datagrid

in Flex Datagrid, I need to support line wrap function in one column.
In theory I need to set wordWrap="true" and variableRowHeight="true". It works well.
But the problem is that if in the cloumn I set itemRenderer="lc.monitoring.logviewer.components.CustomColumnRenderer" properties, then the line wrap funciton does not take effect. It seems that the line wrap function can not work with itemRenderer in the datagrid column.
Any one can help me about this.
Don't use Label - it is for displaying a single line of text.
The Label control displays a single line of noneditable text. Use the Text control to create blocks of multiline noneditable text.
mx.controls.Text supports multiline text and wordwrap
If the control is not as wide as the text, the text will wordwrap. The text is always aligned top-left in the control.
You should try to override measure and updateDisplaylist inside your itemrenderer.
Your item renderer does not know how to resize the height in order to allow showing info inside the dg

Flex 3 LinkButton width: Distorted Skin Image

I am using linkButtons with a background skin inside a linkBar with a dataProvider. A couple of the labels from the linkButtons are too long and distort the linkButton skin. How can I make all of the linkButtons labels the same width?
You can use an item renderer to render a set of data the way you wish.
You can include most of the components in custom renderers.
Check out the following articles
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html
and
http://www.switchonthecode.com/tutorials/flex-using-item-renderers
Hope that helps!
Cheers,
Ernani
If you want the width to be based on the text then you have to pre-measure your text to figure out the max width and then pass that width into the itemRenderers.

Resources