see my attached UI design as reference, How can I change the sentence 'Drag a field here to group by that field' and restyle the ultradatagrid as above image? Please give me some advice and any code example will be appreciated.
Thanks,
Hello,
It seems to me that the grid on the picture is using some style. At the following links you could find how to create and use own styles :
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/AppStyling_Getting_Started.html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/AppStyling_Creating_a_Style_Library.html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/Win_Setting_Up_Your_Application_for_Styling.html
also please look and on following link for more information about styling of WinGrid:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/WinGrid_Styling_WinGrid.html
About the text you could use the following property :
this.ultraGrid1.DisplayLayout.GroupByBox.Prompt = "Desired text here";
Let me know if you have any further questions.
Thanks for your reply. It does help me. Any suggestion about the image button in datagrid?
I added the image button into my grid. But you can see the backcolor is different to the other cells.
The alternative row color didn't apply to the image button. Please help me on this.
Thanks
Could you please let me know if you are using AppStylist for this grid or you are styling the grid via the appearance objects. If you are using AppStylist could you provide the isl file that you are useing in order to investigate this further for you .
I am waiting for your response.
In order to cancel PopUp to be displayed when you deleting a row, you should handle On BeforRowsDeleted event of the grid and put there following code line:
e.DisplayPromptMsg = false;
Let me know if you need any further assistance with styling of the grid.
Yes, this help me to change the back color. There is another question
private void ultraGrid1_ClickCellButton(object sender, CellEventArgs e) { try { if (e.Cell.Column.Key == "Remove") { e.Cell.Row.Delete();
}
I use above code to delete row from grid. there is a popup window to let me confirm the delete automatically. How can I block the popup?
In your Button.isl file you have set an image for background image, so in your code you should make this image transparent in order to be able to set a backcolor for the button in the grid. You could handle OnInitializeRow event of the grid an put there following code:
if (e.Row.IsAlternate && e.Row.Band.Index == bnadindex &&e.Row.Cells["ButtonColumn"].EditorResolved != null)
{
e.Row.Cells["ButtonColumn "].ButtonAppearance.BackColor = ultraGrid1.DisplayLayout.Override.RowAlternateAppearance.BackColor;
e.Row.Cells["ButtonColumn "].ButtonAppearance.ImageBackgroundAlpha = Alpha.Transparent;
Let me know if you have any further questions or if this is not what you are looking for.
I used the AppStylist for all of the Ultrabuttons. I use the grid appearance object for data grid directly. Attached is the button stylist for you reference.