Dynamic visibility on GridButtonColumn?

3 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 07 Feb 2019 Link to this post

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

    Cheers, Rob.

  2. Vessy
    Admin
    Vessy avatar
    2369 posts

    Posted 08 Feb 2019 Link to this post

    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.
  3. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 27 Feb 2019 Link to this post

    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.

Back to Top