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
575
IsTemplateAddRow == false while IsUnmodifiedTemplateAddRow == true?
posted

Is there a reason IsTemplateAddRow returns false when IsUnmodifiedTemplateAddRow returns true?

 

Analogy - IsColumbianCoffee is true while IsCoffee is false?  :)

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Well, it's a bit complicated and the second property (IsUnmodifiedTemplateAddRow) has a somewhat misleading name.

    Basically, as soon as you click onto a TemplateAddRow, it ceases to be a TemplateAddRow. It becomes an AddRow and it exists in the DataSource. So at that point, IsTemplateAddRow returns false, even if you have not made any changes to the row.

    However, even though it's an AddRow and exists in the data source, the grid still treats it differently than a normal AddRow. If you click away from the row without modifying it, for example, the grid cancels the add row. It would not normally do this, it only does it for an AddRow that is not modified and used to be a TemplateAddRow. So IsUnmodifiedTemplateAddRow really indicates that the row is an unmodified AddRow that will be canceled if there are no changes, because it's being treated as a TemplateAddRow, even though it's technically not a TemplateAddRow any more. \

    But IsUnmodifiedAddRowThatIsBeingTreatedAsATemplateAddRowBecauseItUsedToBeOne was a bit unwieldy as a property name. So we had to abbreviate it a little at the cost of some potential confusion. :)

Children
No Data