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
145
Grid Navigation
posted

Hi,

I'm trying to get the following behavior from an ultragrid and I don't know exactly where to start.

I have a purchase order items grid that should behave this way: 

1. Some of the columns should be disabled(grayed out), they should be skipped when tabbing.
2. Some of the rows should be completly disabled(kit item rows)
3. When I press enter key the grid should select the next cell right below the current one(changing price or quantity for each product for example).

 I'm planning to subclass the grid and override the default behavior. Is there any sample on this or can you please give me some hints?

Thanks,
Cosmin Onea

Parents
  • 17259
    Verified Answer
    Offline posted

    Disable Tab Stop:

    ultraGrid1.DisplayLayout.Bands[0].Columns[0].TabStop = false;

    Disable column:

    ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.Disabled;

    Disable row:

    ultraGrid1.Rows[0].Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled;

    Enter key:

    private void ultraGrid1_KeyUp(object sender, KeyEventArgs e)

    {

    if (e.KeyData == Keys.Enter)

    {

    ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.
    UltraGridAction.BelowCell);ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);

    }

    }

Reply Children