Use a generic horizontal scroll for c1datagrid and RowDetailsTemplate

Posted by: ducpv.2901 on 7 August 2018, 7:39 pm EST

    • Post Options:
    • Link

    Posted 7 August 2018, 7:39 pm EST - Updated 4 October 2022, 12:15 am EST

    Hi everyone,

    How can I use a generic horizontal scroll for c1datagrid and RowDetailsTemplate

    Thanks!

  • Posted 8 August 2018, 10:09 pm EST

    Hi,

    Before we proceed further with solution, I would like to confirm whether you want to replace the horizontal scrollbar shown for grid and nested detailed grid OR do you want to have a common scrollbar for scrolling grid and its nested grid ?

    If your requirement is the first one, then you may use the Style (you may get it from C:\Program Files (x86)\ComponentOne\WPF Edition\C1WPFDataGrid.4\XAML location ) and then try to find the element with name: HorizontalScrollBar and replace it/customize it as per your requirements. And finally use this style in XAML for your C1DataGrid

    However, if your requirement is latter one, then I would like to ask you how do want to scroll both outer and inner datagrid with a single horizontal scrollbar. That is when moving the scrollbar how should the scrolling be performed? Should it first scroll the outer grid or inner grid completely? Or should it perform scrolling simultaneously? Or any other ideas?

    Thanks,

    Ruchir

  • Posted 9 August 2018, 12:56 pm EST

    Hi,

    First of all I would like to thank you for your answer.

    And I want to when moving the scrollbar should it perform scrolling simultaneously. You can fix issue?

    Thanks.

  • Posted 12 August 2018, 4:20 pm EST

    Hi,

    We are working on your requirement and will get back to you soon.

    ~Ruchir

  • Posted 13 August 2018, 10:12 pm EST

    Hello,

    Upon researching over this requirement, we found that there are many following issues related to implementing it:

    1. If you want to perform scrolling simultaneously, then you would be willing to hide one of the horizontal scrollbars , probably the internal one. If this is done, then the end-user would not be able to view the right columns without scrolling the parent grid.
    2. If the child grid has columns more or less than the parent grid, then scrolling wouldn’t work properly. Since the unit of scroll for parent would be different than that of child and this will lead to further issues.
    3. If there are multiple child grids expanded, then should the scrolling be performed for all grids?
    4. What would happen if there are nested level is increased, That is if further child grids are added to the RowDetailTemplate of child grid?

      So, we would like to ask to you as to why you want to perform scrolling synchronously ? Also, could you share any video where anything similar to your requirement is implemented?

      If still you want to implement it, the solution would be specific to your application. Hence, we would like you to share your application/stripped application which we could modify to meet your requirement.

    ~Ruchir

  • Posted 14 August 2018, 7:33 pm EST

    Hi!

    Thanks for your responding! About your requirement, I just write a few line to modify data template in row details as I want, you will see in the image I attached in this post. And I didn’t use any events to change how it work, like LoadedRowDetailsPresenter… so I don’t think I can give you more than the thing you have. But I can share to you a video that will explain to you what I’m trying to do. The following issues when implement solution, properly you right, but I willing to accept to resolve my problem. Do you have any ideal to make the UI of C1DataGrid doing as or similar as in my video?

    Thank you!

  • Posted 14 August 2018, 7:34 pm EST - Updated 4 October 2022, 12:16 am EST

  • Posted 14 August 2018, 7:36 pm EST

  • Posted 16 August 2018, 6:05 pm EST

    Thank you for sharing the video file. I understand your requirement.

    To meet your needs, I am discussing them with the development team [ID:339449] and will update you once we have a solution or some information related to it.

    Thank you.

  • Posted 20 August 2018, 3:55 pm EST

    Hello,

    After discussing the requirement internally, we suggest you to either make the master grid column wide-enough to show all child grid columns or show a ToolTip with long content.

    Thanks,

    Ruchir

  • Posted 21 August 2018, 6:31 pm EST

    Sorry,I can’t do that,this is request from my customer.Will you fix that for me!

    Thanks for reading!

  • Posted 22 August 2018, 5:15 pm EST

    Hi,

    First, I would like you to know that this is not an issue/bug, horizontal scrollbar appearing for both master and child grids and scrolling independently is by-design.

    However, I am once again discussing your requirement with the team to see if there is anything that can be done for you.

    I will update you with the information/solution soon.

    Thanks,

  • Posted 27 August 2018, 11:37 pm EST

    Hello,

    Please refer to attached sample implementing your requirement. Also, a video showing the behavior has been attached.

    Hopefully it would meet your concerns.

    Thanks,

    Ruchir

    sync_scroll_data_grid.zip

    Sync_Video.zip

Need extra support?

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

Learn More

Forum Channels