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
2165
Default value for a bool column
posted

I have this in a grid column (summarized):

p.For(pa => pa.IsGood).HeaderText("The product is good?").DataType("bool");

and

p.ColumnSetting().ColumnKey("IsGood").DefaultValue("false")

But it always shows the column like checked when adding a new row, like if default value is true. I also tried this:

p.ColumnSetting().ColumnKey("IsGood").DefaultValue("unchecked")

and

p.ColumnSetting().ColumnKey("IsGood").DefaultValue("0")  // Zero.

Nothing works. The only thing that works is:

$("#MyGrid").igGridUpdating("option", "columnSettings")[1].defaultValue = false; // Say [1] is the column "IsGood"

How to make it works with Razor??

  • 17590
    Offline posted

    Hello Luis,


    I created the following case for you: CAS-153252-K8Q1R0 and will update you through it. You could see it in your account in the 'Support Activity' page.

    Please let me know if you need any additional information regarding this matter.