Hello,
I have code similar to this
So basically, what I'm trying to achieve is to make GridViewDataColumn look and behave like GridViewCommandColumn (currently I handle clicks on the button inside cells CellClick event handler)
My questions are:
Thanks
I have code similar to this
private void OnCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { if (/*some-condition-that-are-always-true-for-all-cells-in-specific-column*/true) { e.CellElement.Children.Clear(); e.CellElement.Children.Add(new RadButtonElement { Text = e.CellElement.Value?.ToString() }); } }
So basically, what I'm trying to achieve is to make GridViewDataColumn look and behave like GridViewCommandColumn (currently I handle clicks on the button inside cells CellClick event handler)
My questions are:
- Are there any performance drawbacks of mine implementation (i.e., related to the fact that the cell formatting event could be fired very often) ?
- Is there a way to dynamically change grid column types. For example, after data binding, a column becomes a GridViewDataColumn but after clicking a button somewhere in a form it changes to GridViewCommandColumn?
Thanks