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
295
UltraWinGrid - Column Formatting
posted

Hi everyone, 

I'm wondering if it is possible to format the contents of a checkbox column. 

My DTO has a boolean field, ultragrid automatically assigns a checkbox to the column.

I've been given the assignment to provide column formatting on this grid. So instead of just showing the checkbox, now I have to show the text "Full: " followed by the checkbox. Is this possible? 

To make things even harder, the column has to be editable. 

Kind regards!

Tobias

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Tobias,

    Yes, I think this is possible. Do you just want the same text in every cell of the column? Or does the text vary from row to row?If you want the same text in every cell, then it's pretty easy. You just attach an UltraCheckEditor to to cell.


            private void Form1_Load(object sender, EventArgs e)
            {
                this.ultraCheckEditor1.Text = "Full: ";
                this.ultraCheckEditor1.CheckAlign = ContentAlignment.MiddleRight;
            }

            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridBand band = layout.Bands[0];

                band.Columns["Column 1"].EditorComponent = this.ultraCheckEditor1;
            }

Reply Children