This is a migrated thread and some comments may be shown as answers.

RadButtonCommand Without format

1 Answer 18 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alejandro
Top achievements
Rank 1
Alejandro asked on 01 Jul 2011, 10:15 PM
I need to use a command column, but I need the column doesn't show as buttons, that is the cell will be a simple text but the cell will have a functionallity of a button .

thanks.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 04 Jul 2011, 05:06 PM
Hello Alejandro,

Thank you for the question.

In order to achieve your requirement, you can handle the CellFormatting event. This event will allow you to customize the look of the button, making it flat. Please refer to the sample code snippet below:
void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
    // The name of the command column
    if (e.Column.Name == "Command")
    {
        RadButtonElement button = (RadButtonElement)e.CellElement.Children[0];
        button.ButtonFillElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        button.BorderElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    }
}

I hope this helps.

All the best,
Nikolay
the Telerik team
Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Alejandro
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or