Hi
I have two ultragrids.
On one when you click the row selector the row does not highlight, this is good. If I wanted to let it highlight the row then I could comment out this line of code so I know I am in the right place:
this.SecuritiesGrid.DisplayLayout.Override.ActiveAppearancesEnabled = Infragistics.Win.DefaultableBoolean.False;
I have another grid and no matter what I do the blue highlight when clicking on the row selector, or clicking the selector then moving up and down with the arrows, will not switch off.
I have tried setting it in the grids properties sheet, in code in the InitializeLayout, and a few other places. It will not switch of the blue row highlight. I have some row configuration in InitializeRow where I change the font of the cells dependent on data but I have even switched that off (i.e. not called my method) and still the blue highlight appears.
I have tried the Reset on ActiveRowAppearance I think it was and ActiveCell Appeareance I think (I saw another forum post) but the options were disabled anyway and I nothing was changed to be reset in the first place.
Is there something that overrides the override for this property that I am missing?
Thanks
Paul
Hello ,
Thank you for posting. Try setting ‘SelectTypeRow’ to none.
this.ultraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.None
If this doesn't help then i would like to know if you have appstylist applied to the application? Try to exclude it and if possible share with me to reproduce the issue at my end.
Let me know if you have any question.
Regards,
Divya Jain
Hi Divya,
I just found out I can't delete a row by clicking the row selector and then the delete button when the setting above is SelectType.None.
What can I send you to try to reproduce this if I don't know what setting is doing it? I can't send the whole application that's for sure.
The Delete key deletes the selected rows. So if you have no selected rows, there's nothing to delete.
You could re-implement this to delete the active row pretty easily, though:
private void UltraGrid1_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Delete: if (!e.Control && !e.Shift && !e.Alt) { var activeRow = this.ultraGrid1.ActiveRow; if (null != activeRow) activeRow.Delete(); } break; } }
Thanks Mike.
I had thought about that but what concerns me is the slightest change in one thing seems to then have a knock on effect. A case in point being that we got rid of the highlight and then can't delete the row by pressing the delete button having just clicked upon the row selector.
I have two grids, how can one not highlight when you select the row and the other does highlight when you select the row, I want consistency hence trying to figure out the property that is different between the two.
The key_down was to be my last resort.
Thanks veyr much,
Thanks Mike, that's the one.
It's not so much that I don't like the blue, it is that I couldn't get them to look the same and did not know was the difference.
Now I can safely decide which I prefer and have them looking the same.
Much appreciated,
Another way to go would be to leave SelectTypeRow set to Single. And then turn off the SelectedAppearances:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { var layout = e.Layout; var ov = layout.Override; ov.SelectedAppearancesEnabled = DefaultableBoolean.False; ov.AllowDelete = DefaultableBoolean.True; ov.SelectTypeRow = SelectType.Single; }