Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / How to make specific rows editable in Ultragrid

How to make specific rows editable in Ultragrid

New Discussion
Skankhunt P
Skankhunt P asked on Dec 7, 2016 5:49 PM

I have few columns that I grouped into some groups in my ultragrid. I want to disable editing on all rows except some columns.

I tried the following

mygrid.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.False;
mygrid.DisplayLayout.Bands[0].Columns["Disposition"].CellActivation = Activation.AllowEdit;
mygrid.DisplayLayout.Bands[0].Columns["Comments"].CellActivation = Activation.AllowEdit;

but it don't seem to work. Now the columns taht Iwant to be edited are also read only and cant type into them.
I readthat IgnoreRowAction needs to be set to true but I couldn't find it on the grid or column.
Any idea on how to make some columns ready only and some columns editable? and also can we enable this readonly thing at Column Group level?
Sign In to post a reply

Replies

  • 0
    Sahaja Kokkalagadda
    Sahaja Kokkalagadda answered on Dec 7, 2016 5:49 PM

    Hi Skankhunt,

    There are properties off the Grid layout override to control whether modifying rows is allowed. If you set these properties then these settings apply to whole Grid. And there are Activation properties off the cells, row, column which take precedence in the order listed.
    In order to edit only certain columns and not edit the rest, you would have to set CellActivation property for each column in the Grid. For example you should do something like this in the Grid InitializeLayout event.


      private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                foreach (UltraGridColumn column in e.Layout.Bands[0].Columns)
                {
                    if (string.Compare(column.Key, e.Layout.Bands[0].Columns[1].Key) == 0)

                        column.CellActivation = Activation.NoEdit;
                    else
                        column.CellActivation = Activation.AllowEdit;
                }
            }

    Please let me know if you have any questions.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Skankhunt P
Favorites
0
Replies
1
Created On
Dec 07, 2016
Last Post
9 years, 9 months ago

Suggested Discussions

Tags

Created by

Created on

Dec 7, 2016 5:49 PM

Last activity on

Feb 25, 2026 9:43 AM