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
345
Unable to add row by Band.addNew()
posted

Hi,

I am creating two web forms. When user click the "Get Item" button in the master form, another form will pop-up and show a list of available items. After user selected some items, the second form will call "window.opener.grid.Bands[0].addNew()" to create some new rows on the master form and then fill the data.

My problem is, after user added a few rows, if they deleted some of them, and then add again, the "Bands[0].addNew()" function will return null, i.e. add new row failed.

I guess the problem is that the active row is null after a row deleted. I have tried to set the row right above the deleted row to "active" and "selected", but the problem still exists.

Does anybody know how to solve this problem?

Adam

Parents
No Data
Reply
  • 345
    Suggested Answer
    posted

    Hi,

    After trying for a long time, I found that the active row becomes null when I insert a row in the second form. After I set the active row, problem no longer exists.

    The key here is to set the active row in the second form instead of the master form. Because even if you set the active row in master form, it will be reset to null in the second form.

    BTW, I forgot to mention my infragistics version. I'm using 10.1.

    Adam

Children
No Data