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
Weird defaultValue behaivor
posted

I have something like this:

@(Html.Infragistics()
.Grid(Model.MyModel.AsQueryable())
.ID("MyGrid")
.AutoGenerateColumns(false)
.AutoGenerateLayouts(false)
.AutoCommit(true)
.AggregateTransactions(true)
.PrimaryKey("Key")
.Columns(pColumn =>
{
pColumn.For(p => p.Points).HeaderText("Points").Width("15%").DataType("number");
})
.Features(pFeatures => pFeatures.Updating()
.EnableAddRow(true)
.EnableDeleteRow(true)
.EditMode(GridEditMode.Row)
.ShowDoneCancelButtons(false)
.ColumnSettings(pC =>
{
pC.ColumnSetting().ColumnKey("Points").Required(true).EditorOptions("dataMode:'int',minValue:0,").ReadOnly(true).DefaultValue("100"); //The helper only accepts strings.
}))
.DataBind()
.Render()
)

When I see ui.values["Points"] in the debbuger (using Chrome) during the rowAdding event it will show a string or a number depending on ReadOnly value. If ReandOnly(true) then it is a string (it shows: "100"), but if ReadOnly(false) then it is a number (it shows: 100). This is a very obscure behavior and could break your logic. Is there a good reason for this? Is it a bug?

Parents
No Data
Reply
  • 20255
    Offline posted

    Hello,

    Thank you for reporting this.

    I have managed to invoke the issue base on your explanation.

    To ensure that it will receive attention, I have logged this behaviour   in our internal tracking system with a Development ID of 186061.  The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.

    I will leave this case open and update you with any new information after the review.  You can also continue to send updates to this case at any time.

    You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.

Children
No Data