We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Scrolling usercontrol

Hi, I have a usercontrol in a grid cell. When the grid scroll''s and the cell that has the user control goes out of scrolling view, the user control does not scroll with the cell instead it remains in the previous (non scrolled )cell location. Should''nt the usercontrol scroll with the cell? Thanks.

3 Replies

AD Administrator Syncfusion Team November 29, 2005 09:40 AM UTC

Can you upload a sample showing this problem? Here is a little sample showing a UserControl in a cell and it seems to scroll OK. http://www.syncfusion.com/Support/user/uploads/GC_UserControl_9ebf5e36.zip


AD Administrator Syncfusion Team December 2, 2005 01:32 AM UTC

Do you have a sample with usercontrol, GridTextBoxCellRenderer and GridGenericControlCellModel which scrolls fine?


AD Administrator Syncfusion Team December 2, 2005 02:06 AM UTC

I am not sure I understand what you are asking for. The sample I posted used a CellType = "Control" with a usercontrol in it. This celltype is based on GridGenericControlCellRender/GridGenericControlCellModel. The other cells in the sample use the standard GridTextBoxCellRenderer/GridTextBoxCellModel celltypes. We also ship a repeater control sample that hosts a UserControl in a genericcontrol derived custom celltype. In the sample we ship, if the host form is not size such that there are an integral number of cells visible, there is a scrolling problem. This problem can be handled by adding a couple of additional override to the renderer class (OnHitText and OnMouseDown) to force th egrid to scroll when you click on a partially visible usercontrol. Here is that modified sample. http://www.syncfusion.com/Support/user/uploads/CS_2cc0e21c.zip If you can post a sample of what you are trying to get working, then maybe we can suggest a solution.

Loader.
Live Chat Icon For mobile
Up arrow icon