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
170
ColumnStyle.EditButton
posted

Can I align the button the the left and place some text on the button i.e. a +/- charcter

Parents
  • 370
    Suggested Answer
    posted

     

    Hi,

    It is not possible to set the text on the button or align it to the left when you set the Style property of the column to EditButton. The easy work around for it is

    - create a UltraTextEditor

    - Add editor buttons to its ButtonsLeft collection.

    - You may add any text to the editor buttons.

    - Assign the ultraTextEditor to the EditorComponent of the column.

     To do so you may use the following code

     [code]

            private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)

            {

                UltraTextEditor editor = new UltraTextEditor();

                EditorButton edButton = new EditorButton();

                edButton.Text = "+";

                editor.ButtonsLeft.Add(edButton);

                e.Layout.Bands[0].Columns[0].EditorComponent = editor;

           }

    [/code]

     

    Thanks

    Vaibhav

     

Reply Children