Dear All,
I am using Ultrawebgrid in my application.
I have added 3 ultragridcolumns, two are hyperlinks and one is button.
Depending on the condition hyperlink are visible for only the specified row and button aur visible for all the rows.
I just want to hide the button only for the specified row.
Can you please help me out.
Thanks,
Preet Sahani.
I think that is the only way that you Reset() it and then apply your style again.
If there is any other way I do not know of that.
Nope, that has no effect. It's not a templated column. Simply Type=Button.
you can try this thing if it is a UltraGridColumn.
e.Row.Cells.FromKey("DeleteButton").Value = null;
if it is TemplateColumn try to clear Template.
I think you are right - the whole column is being hidden/un-hidden in my code. I tried Reset() and nothing happens
I tried this and it works but removes all borders and colours etc.
e.Row.Cells.FromKey("DeleteButton").Style.CustomRules = "display:none;";
Is there a way to simply change the cell contents without affecting the styling?
I think you just want to hide button for that perticuler row not whole grid.
if that is the case then you are doing wronge thing.
what you are doing is hiding whole column not just one cell by doing
e.Row.Cells.FromKey("DeleteButton").Column.Hidden = true;
I guess for the last row button should be showed and column hidden should be made false so it is showing column in whole grid.
try this thing. put a value in the last row for which you do have to hide button and it should hide whole column instead of just that thing. that will make confirm of what I am saying.
you can do this thing.
e.Row.Cells.FromKey("DeleteButton").Reset()
and then set stylesheet whatever is set for that row. because this will remove style also.