Hi I am new to Infragistic contol.I went thru all the topics under the help for WinNavigationBar.I am not able to make any progress still
My requirement is I need to make three nodes using WinNaviigationBar.Under each node I need to bind 2 tables.I used a NavigtionBar to Bind Dataset
I created a dataset using 2 tables .But instaed of DataSet cann I use DataTable,Or how can i acheive my requirement?
For binding DataSet I used the code as below.By doing some modification can i get my requirement?Please let me know ..It is very urgent !!I am serching for this abot 1 week ,still no progress ,Please help me...
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.aboutCustomerTableAdapter1.Fill(this.thunderCommerceDataSet1.AboutCustomer);
this.addressBaseTableAdapter1.Fill(this.thunderCommerceDataSet1.AddressBase);
this.ultraNavigationBar1.RootLocation.DisplayText = "AboutCustomer";
// Instantiate a location but don't set it yet.
Infragistics.Win.Misc.UltraNavigationBarLocation location;
// Loop through each row in the Customers table.
foreach (DataRow row in thunderCommerceDataSet1.Tables["AboutCustomer"].Rows)
{
// Get an array of items for the current row.
object[] items = row.ItemArray;
// Create the location and set its key to the customer's name.
//int i;
//if (i<9)
//{
location = new Infragistics.Win.Misc.UltraNavigationBarLocation(items[0].ToString());
// i++;
//}
// location = new Infragistics.Win.Misc.UltraNavigationBarLocation(items[1].ToString());
// Add the location to the root of WinNavigationBar.
this.ultraNavigationBar1.RootLocation.Locations.Add(location);
// Loop through all the data relations between
// the current row and it's children.
foreach (DataRelation relation in row.Table.ChildRelations)
{
// Create an array of DataRows containing all the
// current row's child rows.
DataRow[] childRows = row.GetChildRows(relation);
// Loop through the child rows and add them to
// the locations collection representing the
// current row.
foreach (DataRow childRow in childRows)
{
// Get an array of items for the child row.
object[] childItems = childRow.ItemArray;
// Add the order number as the key of the child location.
location.Locations.Add(childItems[0].ToString());
}
}
}
}
private void ultraNavigationBar1_SelectedLocationChanged(object sender, Infragistics.Win.Misc.UltraWinNavigationBar.SelectedLocationChangedEventArgs e)
{
// Disable the AfterNavigation event so it doesn't fire
// during the next line of code.
this.ultraToolbarsManager1.EventManager.SetEnabled(Infragistics. Win.UltraWinToolbars.ToolbarEventIds.AfterNavigation, false);
// Have NavigationToolbar navigate to the full path of
// the location that just changed.
this.ultraToolbarsManager1.NavigationToolbar.NavigateTo(e.SelectedLocation.GetFullPath( Infragistics.Win.Misc.FullPathFormat.EditMode), null);
// Reenable the AfterNavigation event so the end user
// can navigate with the Navigation toolbar.
this.ultraToolbarsManager1.EventManager.SetEnabled(Infragistics.Win.UltraWinToolbars. ToolbarEventIds.AfterNavigation, true);
}
private void ultraNavigationBar1_NavigationPathParseError(object sender, Infragistics.Win.Misc.UltraWinNavigationBar.NavigationPathParseErrorEventArgs e)
{
e.DisplayErrorMessage = false;
DialogResult result = MessageBox.Show
(
"The folder '" + e.Path + "' doesn't exist!" + "\n\n" + "Would you like to edit the path?", "Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
e.StayInEditMode = true;
else if (result == DialogResult.No)
e.StayInEditMode = false;}}}}