Christopher Kane

Ramblings of a Software Architect

Recent posts

Tags

Categories

Navigation

Pages

Archive

Blogroll

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Disabling a row in a Grid based off of a value in the source

So I needed to disable a row in a Grid based on a value in one of the columns. I found an example on Microsoft’s website and wanted to document it here:

Overwriting the ‘active’ method on the datasource:

public int active()
{
    int ret;

    ret = super();
    if (MDSI_ConfigurationLine.MDSI_ConfigurationLineStatusId == 'CLOSED')
    {
        MDSI_ConfigurationLine_ds.allowEdit(false);
    }
    else
    {
        MDSI_ConfigurationLine_ds.allowEdit(true);
    }

    return ret;
}

You need to make sure you have the else to allowEdit otherwise all of rows will be disabled.
Posted: Jul 14 2009, 19:47 by ckane | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under:

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading