Hi guys
Sorry if I raise a very commonly asked question, but I spent the whole day searching the net and your forums and still found nothing on my issue.
I have a three-level hierarchical grid (UltraGrid), I need to get cell values from the second and third grid bands.
I can fetch the data from the first level grid without any issues, but when I need to go one or two levels deeper, it gets rather tricky.
Could you give me an example how do one fetches data from hierarchical grids over the multiple layers, please?
Hi Michael,
Thanks for the reply. i too really don't know wrong. but i tried executing your project which you zipped. it gave me some error.
"
Error 10 Unable to resolve type 'Infragistics.Win.UltraWinGrid.UltraGrid, Infragistics4.Win.UltraWinGrid.v12.1, Version=12.1.20121.2024, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' C:\Hari\C#Course\SamplesApps\GridInCodeTest\GridInCodeTest\GridInCodeTest\Properties\licenses.licx 1 GridInCodeTest
i am believing It may be a license issue. in project i am using UltraWinGrid.v8.3
-Hari
Hari,
I don't know what's wrong. It looks right to me. I have attached a sample application in which I used the code that you provided above and it seems to work fine for me. Take a look at it and see if I have done something that you left out. You say that you are adding three columns; you are actually adding seven columns. And then you add one row to the table. I don't see anything wrong with that. Let me know if you find anything.
I am facing the problem as below.
I am want to use one of my Ultragrid private control from one of my unit tests project.
I am trying to create one Ultragrid control at runtime, where as after binding Datasource i should get UltraGrid.Rows.Count > 0.
where as i am getting row count is 0. no idea why its happening. can you please check and let me know what is wrong with below code.
//Create a table that will contain three columns.Infragistics.Win.UltraWinGrid.UltraGrid tempUltraGrid = new Infragistics.Win.UltraWinGrid.UltraGrid();DataTable table = new DataTable("Table");
//Create three columns that will hold sample data.DataColumn ApplicationInfo = new DataColumn("ApplicationInfo", typeof(string));DataColumn ApplicationName = new DataColumn("ApplicationName", typeof(string));DataColumn Description = new DataColumn("Description", typeof(string));DataColumn Version = new DataColumn("Version", typeof(string));DataColumn Type = new DataColumn("Type", typeof(string));DataColumn FileName = new DataColumn("FileName", typeof(string));DataColumn Default = new DataColumn("Default", typeof(string));
//Add the three columns to the table.table.Columns.AddRange(new DataColumn[] { ApplicationInfo, ApplicationName, Description, Version, Type, FileName, Default });
//Add the table to the dataset.dsgridSource.Tables.Add(table);dsgridSource.Tables[0].Rows.Add(new object[] { "ApplicationInfo", "ApplicationName1", "Description1", "Version1", "Type1", "FileName1", "Default1" });tempUltraGrid.DataMember = "Table";tempUltraGrid.DataSource = dsgridSource;
tempUltraGrid.DisplayLayout.Rows[0].Selected = true; -----Getting error at this line
Error information is :"Index was outside the bounds of the array."
please let me know whatz wrong in the above code
Eugene,
I'm not sure I understand what you are asking. Band[2] is the third level of the grid's hierarchical data. Is that what you mean?
Thanks Michael!
How could I refer to the sub-level grid as an object? Say, for example, to the mentioned third level grid?