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

Record navigation control

Thread ID:

Created:

Updated:

Platform:

Replies:

27813 Apr 19,2005 02:39 AM Apr 19,2005 07:15 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 19, 2005 02:39 AM

Hi, I have attached RecordNavigationCOtrol with DataboundGrid.I am dynamically loading data. When there is no data in the grid and when i click next arrow button it goes on displaying 1,2... I dont want to display anything when there is no data. or can we disable the arrow buttons and not the complete navigation bar. How do we do that? When the splitter is attached with between the RecordNavigationControl and Some other control. It hides part of the Navigation bar.How can this be avoided?

Administrator [Syncfusion]
Replied On April 19, 2005 04:50 AM

Normally, the gridrecnav control will handle enabling and disabling the buttons for you depending upon the number of rows in the grid and where the current row is. You might want to try to figure out why that is not working in your case. In version 3010, if I drop a griddataboundgrid into a gridrecordnavigation control at runtime, but do not set its datasource until I click a button on the form at runtime, then the navbar is disabled and I do not see the 1,2,3.. you are describing. If you can upload a little sample showing this not working, or tell us how to see it in one of our samples, we can maybe suggest a solution. If you want to try to disable buttons, you can use code like this to do so: this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[0].Enabled = false; this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[1].Enabled = false; this.gridRecordNavigationControl1.NavigationBar.Invalidate(); As far as a slpitter covering a control, are you talking about a splitter outside the recnavcontrol? If so, one thing you could do is to place a panel where you have the recnavcontrol, set its DockPadding to add some space around the edge next to the splitter and then set the recnav control into the panle with the recnav Dock property set to fill. Then you can control the spacing using the panel.DockPadding property.

Administrator [Syncfusion]
Replied On April 19, 2005 06:54 AM

Thanx, How do we aceess the next and last navigation button this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[2] and Button[3] >Normally, the gridrecnav control will handle enabling and disabling the buttons for you depending upon the number of rows in the grid and where the current row is. You might want to try to figure out why that is not working in your case. In version 3010, if I drop a griddataboundgrid into a gridrecordnavigation control at runtime, but do not set its datasource until I click a button on the form at runtime, then the navbar is disabled and I do not see the 1,2,3.. you are describing. If you can upload a little sample showing this not working, or tell us how to see it in one of our samples, we can maybe suggest a solution. > >If you want to try to disable buttons, you can use code like this to do so: > >this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[0].Enabled = false; >this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[1].Enabled = false; >this.gridRecordNavigationControl1.NavigationBar.Invalidate(); > > >As far as a slpitter covering a control, are you talking about a splitter outside the recnavcontrol? If so, one thing you could do is to place a panel where you have the recnavcontrol, set its DockPadding to add some space around the edge next to the splitter and then set the recnav control into the panle with the recnav Dock property set to fill. Then you can control the spacing using the panel.DockPadding property.

Administrator [Syncfusion]
Replied On April 19, 2005 07:15 AM

Here are the indexes and the buttons. 0 First 1 Previous 2 Syncfusion.Windows.Forms.InternalButton 3 null 4 Syncfusion.Windows.Forms.InternalButton 5 Next 6 Last 7 AddNew Here is the code used to generate this list.
Syncfusion.Windows.Forms.InternalButton button;
for(int i = 0; 
	i < this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons.GetLength(0);
	++i)
{
	button = this.gridRecordNavigationControl1.NavigationBar.ButtonBarChild.Buttons[i];
	if(button == null)
		Console.WriteLine("{0} null", i);
	else
		Console.WriteLine("{0} {1}", i, button.ToString());
}

CONFIRMATION

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.

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.

;