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

Dynamic visibility on GridButtonColumn?

2 Answers 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 08 Feb 2019, 12:55 AM

Is there any way to make a GridButtonColumn visible or not based on bound data?

Cheers, Rob.

2 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 08 Feb 2019, 02:28 PM
Hi,

Sure, Rob - you can use a GridButtonColumn based on static data by defining it in a similar way:
<telerik:RadGrid ID="RadGrid2" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView>
        <Columns>
             <telerik:GridButtonColumn Text="Some button" ButtonType="PushButton"></telerik:GridButtonColumn>
            <telerik:GridBoundColumn DataField="EmployeeId"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>



Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Rob Ainscough
Top achievements
Rank 1
answered on 27 Feb 2019, 07:40 PM

Hi Vessy,

Not sure you understood my question ... but I was able to resolve using the ItemDataBound event and setting the Button.Visible property.

Cheers, Rob.

Tags
Grid
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Rob Ainscough
Top achievements
Rank 1
Share this question
or