GridViewCommandColumn Not Filling Cell

2 posts, 0 answers
  1. Paul Patterson
    Paul Patterson avatar
    40 posts
    Member since:
    May 2010

    Posted 16 Jul 2010 Link to this post

    Hi all,

    I created a GridViewCommandColumn for a grid. When the grid is rendered it appears that the button (command column) is sized based on the cell padding. 

    How do I adjust the column so that the command appears to fill the entire cell?

    (see example attached)

    Any advice is appreciated,

    Paul
  2. Paul Patterson
    Paul Patterson avatar
    40 posts
    Member since:
    May 2010

    Posted 16 Jul 2010 Link to this post

    I found the solution - setting the padding of the cell element using the ViewCellFormatting event...

    C#
    private void gridviewAssetChecklist_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
    {
        if ((e.CellElement) is GridCommandCellElement) {
            e.CellElement.Padding = new Padding(0);
        }
     
    }

    Cheers, 

    Paul
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top