Hello,
I have tried to customing a gridview row with html view like it is recommended in a few posts.
The result is not which i want, I want something like this:
[--colLeft--][----------------------col-----------------------]
[------------------------------------col-------------------------]
[--colLeft--][--colLeft--][--colLeft--][------col--------]
When I resize the gridviewI want to colLeft stay at left like:
[--colLeft--][----------------------------------------col------------------------------------]
[-----------------------------------------col---------------------------------------------------]
[--colLeft--][--colLeft--][--colLeft--][-----------------col----------------------------]
To make that I have used this C# code:
It works but when I'm resizing the gridview, cells are automaticly re-arranged (size and location) and centered so columns I want to fix on the left side (colLeft) moving. Like that:
[-------colLeft------][----------------------------------------col----------------------------------------------------]
[-----------------------------------------col----------------------------------------------------------------------------]
[-------colLeft------][-------colLeft------][------colLeft------][-----------------col----------------------------]
My question is How can I fix columns size to X pixels and location to left to make what I want?
Thanks
I have tried to customing a gridview row with html view like it is recommended in a few posts.
The result is not which i want, I want something like this:
[--colLeft--][----------------------col-----------------------]
[------------------------------------col-------------------------]
[--colLeft--][--colLeft--][--colLeft--][------col--------]
When I resize the gridviewI want to colLeft stay at left like:
[--colLeft--][----------------------------------------col------------------------------------]
[-----------------------------------------col---------------------------------------------------]
[--colLeft--][--colLeft--][--colLeft--][-----------------col----------------------------]
To make that I have used this C# code:
// Row struct in html view
this
.htmlView =
new
HtmlViewDefinition();
this
.htmlView.RowTemplate.Rows.Add(
new
RowDefinition());
this
.htmlView.RowTemplate.Rows.Add(
new
RowDefinition());
this
.htmlView.RowTemplate.Rows.Add(
new
RowDefinition());
this
.htmlView.RowTemplate.Rows[0].Cells.Add(
new
CellDefinition(
"IsLocked"
, 0, 1, 1));
this
.htmlView.RowTemplate.Rows[0].Cells.Add(
new
CellDefinition(
"name"
, 0, 3, 1));
this
.htmlView.RowTemplate.Rows[1].Cells.Add(
new
CellDefinition(
"details"
, 0, 4, 1));
this
.htmlView.RowTemplate.Rows[2].Cells.Add(
new
CellDefinition(
"preview"
, 0, 1, 1));
this
.htmlView.RowTemplate.Rows[2].Cells.Add(
new
CellDefinition(
"insert"
, 0, 1, 1));
this
.htmlView.RowTemplate.Rows[2].Cells.Add(
new
CellDefinition(
"remove"
, 0, 1, 1));
this
.htmlView.RowTemplate.Rows[2].Cells.Add(
new
CellDefinition(
"link"
, 0, 1, 1));
It works but when I'm resizing the gridview, cells are automaticly re-arranged (size and location) and centered so columns I want to fix on the left side (colLeft) moving. Like that:
[-------colLeft------][----------------------------------------col----------------------------------------------------]
[-----------------------------------------col----------------------------------------------------------------------------]
[-------colLeft------][-------colLeft------][------colLeft------][-----------------col----------------------------]
My question is How can I fix columns size to X pixels and location to left to make what I want?
Thanks