ClearRange is not working after doing sort

Posted by: sangeetha.chellamuthu on 5 November 2023, 2:57 pm EST

    • Post Options:
    • Link

    Posted 5 November 2023, 2:57 pm EST

    I am sing Same Spread for two different data alternatively. like when we switch from one tab to another ,cleared the spread and populating the particular data to spread. and doing vice versa. its worked fine until the below scenario,

    1.when we do sort and try to switch tab to populate the different data by Clearing the spread. still its hold the previous tab data. and also there is empty rows populated In between and if we do sort in that populated data its working weirdly.

    Kindly help on this.

    SpreadEx.ClearRange(0, 0, -1, -1);

    and doing sorting for the Range of rows not for entire Sheet.

  • Posted 5 November 2023, 9:10 pm EST

    Hi Sangeetha,

    As per our understanding, you are using the same fpspread control instance in two different tabs. You are setting the data source based on the tab page that contains the control.

    We created a sample application based on this understanding. See RangeClear.zip.

    We observed a strange behavior on implementing this use-case. When we switched the tab page after applying range sort on the current tab: the rows of the next tab were already rearranged based on the previous one.

    However, we could not observe the following issue: “still its hold the previous tab data. and also there is empty rows populated In between and if we do sort in that populated data its working weirdly.”

    Additionally, we would like to know how you are using the following code of line:

    SpreadEx.ClearRange(0, 0, -1, -1);

    We request you update the attached sample as per your use-case, so that we could replicate the exact issue on our end and assist you accordingly. [RangeClear.zip]

    Thanks & Regards,

    Aastha

  • Posted 14 November 2023, 12:56 am EST - Updated 14 November 2023, 1:04 am EST

    Hi,

    we are trying the update the same set of rows and columns in spread when we move one tab to another with different data set. in that process when we move from one tab to another we are trying to clear the spread with below line of code

    SpreadEx.ClearRange(0, 0, -1, -1);

    but after doing sorting. spreadEx.datarowcount property shows incorrect values like when i try to loop its jumping values from 1 to 5 and missing the rows in between.

    i have attached the image.

    we are using c# windows app

  • Posted 16 November 2023, 5:16 am EST - Updated 16 November 2023, 5:21 am EST

    Hi Sangeetha,

    Unfortunately, we could not replicate the issue of additional rows on our end. Kindly refer to the following gif to see the behavior:

    We have attached the sample application for reference.[RangeClear_Mod.zip]

    We request you update the attached sample and provide us with the dummy data so that we could replicate the issue on our end. Additionally, please provide the exact steps to replicate the issue.

    Thanks & Regards,

    Aastha

Need extra support?

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

Learn More

Forum Channels