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
455
Template Row On Bottom
posted

Hi

I would like to suppress the new template row add to the grid when the existing template row is not filled with valid data. Which event should I cancel to suppress the new template row at the bottom?

Also, I see that  RowEditTemplateRequested  event is not fired at all.

 Is this order of firing these events?

1) RowEditTemplateRequested 

2) IntializeTemplateAddRow,

3)  BeforeRowEditTemplateDisplayed

 

Thanks

 

Parents
  • 469350
    Verified Answer
    Offline posted

    RowEditTemplate is not the same as a TemplateAddRow. These are two totally different areas of functionality. 

    I don't think it's possible to cancel the new TemplateAddRow once you start editing an existing row. What happens is that once you enter a TemplateAddRow and begin to edit a cell, the TemplateAddRow becomes an Add Row and it no longer a TemplateAddRow. So a new TemplateAddRow has to be shown. Otherwise, the AllowAddNew setting would no longer be valid since there would be no template add row. 

    So it seems to me that you have a couple of options.

    1) You could use BeforeRowUpdate and/or BeforeRowDeactivate to prevent the user from leaving the Add Row once they start editing until the row is completely filled in. 

    2) You could set AllowAddNew to No and then add rows to the grid in code or via the AddNewButtons so that you have full control over when the new rows are created. 

Reply Children