use a generic horizontal scroll for c1datagrid and RowDetailsTemplate

Posted by: ducpv.2901 on 8 August 2018, 4:39 am EST

  • Posted 8 August 2018, 4:39 am EST

    Hi everyone,

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

    Thanks!
  • Replied 9 August 2018, 7:09 am 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
  • Replied 9 August 2018, 9: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.
  • Replied 13 August 2018, 1:20 am EST

    Hi,

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

    ~Ruchir
  • Replied 14 August 2018, 7:12 am 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
  • Replied 15 August 2018, 4:33 am 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!
  • Replied 15 August 2018, 4:34 am EST

  • Replied 15 August 2018, 4:36 am EST

    requirement.zip
  • Replied 17 August 2018, 3:05 am 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.
  • Replied 21 August 2018, 12:55 am 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
  • Replied 22 August 2018, 3:31 am EST

    Sorry,I can't do that,this is request from my customer.Will you fix that for me!
    Thanks for reading!
  • Replied 23 August 2018, 2:15 am 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,
  • Marked as Answer

    Replied 28 August 2018, 8:37 am 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