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
close icon

User control in Grid-2

I have a grid containing user control in each cell that does not fit form size. So scroll bars appear. But when control in cell placed so that just a half of it is visible on the screen (like on the first picture) and the cell with it becomes active it cutted-off like on the second picture.

Why can it be and how to fix this problem?

pictures2.zip

5 Replies

HA haneefm Syncfusion Team July 4, 2007 07:23 PM UTC

Hi,

The Attached sample shows you how to define a UserControl in order to edit a row in your DataTable. For example, your UserControl may have several TextBoxes, a CheckedListBox, Buttons or whatever Windows Forms Controls are appropriate for allowing the user to edit the row data. Then by implementing three methods in an interface, you can then use this UserControl as a RepeaterControl which, will allow you to display and edit multiple records in a scrolling window where your UserControl is displayed multiple times.

Below is a attached sample for detail.
RepeaterUserControlSample.zip

Please let me know if this helps.

Best regards,
Haneef


HA Hanna July 5, 2007 07:40 AM UTC

I've changed the VScrollPixel to true as I need and got the same result as it was before.
Look the attachments.

pics3.zip


HA haneefm Syncfusion Team July 5, 2007 05:52 PM UTC

Hi Hanna,

Thank you for bringing this issue in our attention.

I am able to see this issue. It happened to me when I opened it for the 4th time. It seems that the form's components didn''t get disposed properly. You can workaround this issue by calling the grids Dispose method explicitly in the Form''s Dispose method. Below are the code snippet.

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
this.gridRepeaterUserControl1.Grid.Dispose();
this.gridRepeaterUserControl1.Dispose();
}
}
base.Dispose( disposing );
}

Kindly have a loot at the sample which implements the above workaround.
RepeaterUserContol.zip

Could you please run this at your end and let me know how it goes?

Best regards,
Haneef


HA Hanna July 6, 2007 08:22 AM UTC

This solution doesn't seem to work when i do the folowing:

I've removed the Grid_CellMouseHover handler because i'm not satisfied with this effect when cells "jump" when mouse moves over it. And after that behavior is still the same. Components are dissapeared from user controls.

I think problem appears when components which are placed on the control inside the cell are not all visible when cell is inactive and when i make this cell active.

In addition, I'd like to make cell active without moving it up for make it all visible like in your sample. The behavior must be as there were no grids at all on form, but just set of controls placed directly on form.

How can I achive needed result?


HA haneefm Syncfusion Team July 6, 2007 08:23 PM UTC

Hi Hanna,

Thank you for posting your query to us.

I tried to reproduce this problem using this sample.

RepeaterUserContol.zip

But, I could not get this problem. Maybe I am not following the steps that you are doing. Is it possible for you to provide more information on this problem? This will help me to analyse the issue further.

Please do let me know if you have any technical questions or I can be of any other assistance. I will be glad to assist you.

Best regards,
Haneef.

Loader.
Live Chat Icon For mobile
Up arrow icon