Remove unboud rows

Posted by: k-v-sangeetha on 8 September 2017, 1:14 pm EST

  • Posted 8 September 2017, 1:14 pm EST

    Hi,


    After adding 3 unbound rows I have binded the data to the Spread.


    fpS1.Sheets[fpS1.ActiveSheetIndex].AddUnboundRows(0, 3);
    fpS1.Sheets[fpS1.ActiveSheetIndex].DataSource = dstData.Tables[0];


    How to remove the unbound rows from the spread without disturbing the data binded to it.


    Thanks,


    Sangeetha

  • Replied 8 September 2017, 1:14 pm EST

    This is not really the correct way to go about things.  Given your code all you are doing is adding rows since you are not bound yet.  You should call AddUnboundRows after you do your binding.  Then you can remove those rows when you want or don't update the database and the rows will not be added.
  • Replied 8 September 2017, 1:14 pm EST

    Hi,


    You are correct. Now I have added the unbound rows after binding the data to the spread. Unbound rows are appearing along with the bound rows.


    While navigating between the Sheets in the spread, whenever "ActiveSheetChanged" event occurs I have to check whether the Sheet has any unbound rows , if the sheet does not have unbound rows I have to add unbound rows to the sheet.. How to do this check ?


    I think unbound rows are getting cleared during "ActiveSheetChanged" event.


    Thanks,


    Sangeetha

  • Replied 8 September 2017, 1:14 pm EST

    There is an IsRowBound property you can use to check if a row is bound or not.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels