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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how can I add a griddataboundgrid into gridrecordNavigationControl

Thread ID:





22599 Dec 16,2004 09:09 AM UTC Dec 16,2004 11:10 PM UTC WinForms 5
Tags: GridControl
Asked On December 16, 2004 09:09 AM UTC

how can I add a griddataboundgrid into gridrecordNavigationControl if I don''t addd it when designing

Administrator [Syncfusion]
Replied On December 16, 2004 10:05 AM UTC

You should be able ot do it in the designer. First drop the GridrecordNavigationControl onto your ofrm, and the drop the GridDataBoiundGrid onto teh GridrecordnavigationControl. I jsut tried this using Created a new windows application. Dropped the recnav on the form and then the grid onto the recnav. Seemed to work for me. If it does not work for you, you might try resetting your toolbox and reloading the controls.

Replied On December 16, 2004 11:00 AM UTC

Maybe you misunderstand my question. I''d like to make it clear. the first time, I added my GridDataBoundGrid into a GridRecordNavigationControl by design on userControl1, i can scroll the datagrid in this GridRecordNavigationControl. After that I used a reference of this grid by assigning myGrid = GridDataBoundGrid. I add myGrid to another one userControl2 , and change the model( width, hidecol, zoom the myGrid). When I return userControl1, I can''t scroll the grid in GridRecordNavigationControl . How can I scroll the griddataboundgrid in this GridRecordNavigationControl . Thank you

Administrator [Syncfusion]
Replied On December 16, 2004 11:25 AM UTC

The grid has to be parented to the recordnavcontrol. Here is the code that ties a grid to the recordnavcontrol. this.gridRecordNavigationControl1.Controls.Add(this.gridDataBoundGrid1); This means a grid can only be tied to one recnavcontrol as it can only be parented to a single control. So, when you added it same grid to the second recordnav control, it is no longer parented to teh first, and thus the first recnavcontrol will not be able to scroll it (unless you reparent it back to the first recnavcontrol).

Replied On December 16, 2004 02:42 PM UTC

Thanks, but it still has problem. Please follow this step to get the error. 1. add Griddataboundgrid into Gridrecordnavigation. MessageBox.Show(grid.Parent); -->> result1 : ... 2. add this grid into another usercontrol2 and call MessageBox.Show(grid.Parent); -->>result 2:... 3. remove the grid out of the usercontrol and add it into Gridrecordnavigation again. -->>> result3 :.... the result3 is different from result 1 . It inform a message : " ............ vok:null" I think this is the main reason. But I don''t know how to resolve it. Thank you for you help.

Administrator [Syncfusion]
Replied On December 16, 2004 11:10 PM UTC

The recordnavcontrol has two public methods, WireGrid and UnwireGrid. The wire method is called to hook up the events that let the recnva control the grid. UnwireGrid unhooks these events. So, as you move the grid around between the two recnav controls, try unwiring the old recnavcontrol from teh grid before wiring the new one to th egrid to see if this will handle this problem. If not, if you send a sample project, we can try to get it working here.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon