PDA

View Full Version : [CLOSED] Command Column alignment + header text not working



machinableed
Apr 10, 2012, 3:01 AM
It appears that Command Columns in the gridpanel ignore the align and text attributes? For example, in the code below the column header text "Product Instance" doesn't appear and the image is left aligned:


columnModel.Columns.Add(Html.X().CommandColumn()
.Align(Alignment.Center)
.Text("Product Instance")
.Width(30)
.Commands(commands => {
commands.Add(Html.X().GridCommand()
.Icon(Icon.Outline));
}));


If I use a standard column, the text/alignment seems correct... am I doing something wrong here or is this a bug?

Daniil
Apr 10, 2012, 8:57 AM
Hi,

Aligning in cells is not supported with commands.

I can suggest the following solution.

Example

<style type="text/css">
.x-grid-cell-Column1 .cell-imagecommand-value {
width: 77%;
}
</style>

<ext:Column
ID="Column1"
runat="server"
Text="Test1"
DataIndex="test1"
Align="Center">
<Commands>
<ext:ImageCommand Icon="Accept" />
</Commands>
</ext:Column>