Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
How to add a button to grid cell
posted

Hi, My requirement is, I have to add a button in a perticular cell.

I went through one of your article "How to Add ImageButton to UltraWinGrid cells.". I created a UltraTextEditor control. Added EditorButton control to the ButtonsRight collection. And trying to initialize the control in ultraGrid_InitializeRow event.

private void ultraGrid_InitializeRow(object sender, InitializeRowEventArgs e)
{
 if(e.Row.Index == 15)
 {
  for (int i = 1; i <= 4; i++)
  {
   e.Row.Cells[i].EditorControl = ultraTextEditor1;
  }
 }
}

 

 

 

 

 

In the UI I am not able to see the buttons in the row. Could you kindly let me know how to add a button to a cell in the UltraGrid?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    By default, I think a button will only display in the cell if you hover the mouse over that cell, or if the cell is in edit mode. You can control this behavior using the ButtonDisplayStyle property on the band.

    Note that if the cell is not able to enter edit mode (if you set CellActivation on the column to Disabled, for example), then the button cannot be clicked and will not display.

    If neither of those help you, perhaps you could post a small sample project demonstrating what you have so far and I will check it out and tell you why it's not working. :)

Children
No Data