Hi
Is it possible to programmatically change the Row Header Glyph so that the DGV shows when a row is being edited or not?
It does not always show the correct Glyph. Usually in the case when the row edit is initiated by a custom data grid view cell
If so how?
Thanks
Ewan
The mixin works well once you move the “table-row-header” appearance in appearances and place it in \Themes.
{ "name": "Application.mixin", "appearances": { "table-row-header": { "inherit": "table-row-header", "states": { "focused": { "styles": { "backgroundImage": null } }, "new": { "styles": { "backgroundImage": null } }, "new-selected": { "styles": { "backgroundImage": null } }, "editing": { "styles": { "backgroundImage": null } } } } } }
I can’t get the following mixin to work which should not show the row header glyphs.
I have uncommented
// Add the WisejResources attribute to
// merge js and css embedded resources with the wisej package.
[assembly: Wisej.Core.WisejResources(ExcludeList: “”)]
Mixin is as below and is in the main folder not the \Themes folder
{
“name”: “Application.mixin”,
“table-row-header”: {
“states”: {
“default”: {
“styles”: {
“widthRight”: 1,
“colorRight”: “windowFrame”,
“backgroundColor”: “buttonFace”,
“backgroundRepeat”: “no-repeat”,
“backgroundPosition”: [ “center”, “right” ],
“backgroundSize”: “16px 16px”,
“fillColor”: “windowText”
},
“properties”: {
“padding”: [ 2, 2, 2, 2 ],
“textColor”: “buttonText”
}
},
“selected”: {
“styles”: {
“backgroundColor”: “table-row-background-selected”
},
“properties”: {
“textColor”: “table-row-selected”
}
},
“focused”: {
“styles”: {
//”backgroundImage”: “table-row-indicator”
},
“properties”: {
}
},
“new”: {
“styles”: {
//”backgroundImage”: “table-row-new”,
“fillColor”: “iconLight”
},
“properties”: {
}
},
“new-selected”: {
“styles”: {
//”backgroundImage”: “table-row-new”,
“fillColor”: “windowText”
},
“properties”: {
}
},
“editing”: {
“styles”: {
//”backgroundImage”: “table-row-editing”
},
“properties”: {
}
},
“rightToLeft”: {
“styles”: {
“transform”: “rotateZ(180deg)”
},
“properties”: {
}
}
},
“components”: {
“content”: {
“states”: {
“default”: {
“styles”: {
“backgroundRepeat”: “no-repeat”,
“backgroundPosition”: [ “center”, “left” ],
“backgroundSize”: “20px”
},
“properties”: {
“padding”: [ 0, 2, 0, 2 ]
}
}
}
},
“error”: {
“states”: {
“default”: {
“styles”: {
“backgroundImage”: “icon-error”,
“fillColor”: “invalid”,
“backgroundRepeat”: “no-repeat”,
“backgroundPosition”: [ “center”, “center” ],
“backgroundSize”: “16px”
},
“properties”: {
“padding”: [ 0, 8, 0, 8 ]
}
}
}
}
}
}
}
Thanks for your hekp
Ewan
Hi Luca
The image does not show unless I use cell update(). Presumably the UserPaint needs set when the grid is initially populated
Could you let me know which part of the theme I would need to create a mixin for the hide the default row header glyphs
Many thanks for you help
Ewan
Hi Luca
The image does not show unless I use cell update(). Presumably the UserPaint needs set when the grid is initially populated
Could you let me know which part of the theme I would need to create a mixin for the hide the default row header glyphs
Many thanks for you help
Ewan
The background image is correct. The row header is too narrow.
The paint event is fired when UserPaint is on and in the code you attached it’s turned on probably too late.
The call to cell.Update() is not needed.
Hi Luca
The code I an using is as below as the paint event does not fire when I need it to. In the attached image the Edit Glyph is superimposed over the select Glyph
dgvOfficeStaff.Rows[e.RowIndex].HeaderCell.UserPaint = true;
dgvOfficeStaff.Rows[e.RowIndex].HeaderCell.Style.BackgroundImageLayout = Wisej.Web.ImageLayout.BestFit;
dgvOfficeStaff.Rows[e.RowIndex].HeaderCell.Style.BackgroundImageSource = “table-row-editing”;
dgvOfficeStaff.Rows[e.RowIndex].HeaderCell.Update();
It can be changed (or disabled) in a theme or theme mixin. The header cell background image is supposed to show in addition to the current/editing indicator.
I can’t reproduce the issue you mentioned, can you attach a test case?
Please login first to submit.