Tree Virtual Grid
I want the first column to represent the tree view.
There is an example in the samples, but it uses the .cds file that i cannot make changes to.
Thanks,
Adnan
Do you want to use the custom collection in a VirtTreeGrid? If yes, you would have to create and populate a CollapsibleDataSource.data using a code similar to that in CollapsibleDataSource.InitData method. Here is a sample which populates the CollapsibleDataSource.data with a data set. Please refer to the attached sample for more details.
Sample : VirtTreeGrid.zip
Regards,
Haneef
This pretty much solves my issue.
I have another post regarding virtual grid treeview and i really need help with that.
Could you please look at it and let me know if it is possible.
Your fourm thread has been updated. Please refer this
Tree Virtual Grid -- Urgent
Thank you very much for your interest in Syncfusion’s products.
Best regards,
Haneef
I have attached the grid example and this is currently bound to a dataset. I have created a Product Object that has a collection of child Products.
The startup page is instantiating a product object. Now i want to bind this product object to the virtual grid.
Also Is there any way to expand columns? For example i have following columns headers:
Week 1 - Week 2 --> They both have + sign next to them. When a user clicks plus the columns expands to days (i.e. show day1, day2, etc).
Thanks for your help.
Testing2.zip
Question 1: create the collapsible datasource for product object
To display the product object in a virtualtree grid, you neeed to populate a CollapsibleDataSource.data for product object using the below code. Here is a sample which populates the CollapsibleDataSource.data with a prodcute object. Please refer to the attached sample for more details.
Sample : ModifiedTesting2.zip
public void InitFromProduct(Product product)
{
int rows = product.childProducts.Count;
int cols = 0;
this.data = new SampleData[rows + 2];
cols = product.GetType().GetFields().Length;
int ncols = TypeDescriptor.GetProperties(product.childProducts).Count ;
if (cols < ncols)
cols = ncols;
int row = 0;
///For product name datatable.
string[] s = new string[cols];
s[0] = product.ToString();
data[row] = new SampleData(0, TreeNodeState.NoChildren, s);
//product object items...
s = new string[cols];
s[0] = product.ProductName;
s[1] = product.ProductDescription;
row++;
data[row] = new SampleData(1, TreeNodeState.NoChildren, s);
//childproduct item.
foreach (Product item in product.childProducts)
{
row++;
s = new string[cols];
s[0] = item.ProductName;
s[1] = item.ProductDescription;
data[row] = new SampleData(2, TreeNodeState.NoChildren, s);
}
internalColCount = cols;
Locked = false;
internalRowCount = rows;
visibleRows = new ArrayList();
}
Question 2: Is there any way to expand columns?
>>>>>
Here is a forum thread that discuss with the excel like grouping( Expanding/Collapshing the columns) in a grid.
http://www.syncfusion.com/support/forums/message.aspx?MessageID=32554
>>>>>
Best Regards,
Haneef
I find source of Tree Vitual Grid project. But Links are Died....hic hic...So, Help me, please
Give me source of Sample: ModifiedTesting2.zip, Testing2.zip, VirtTreeGrid.zip....Admin, Help me.....
Hi TrungdaicaCIT,
We have a sample in our dashboard which explains about the step-by-step tutorial on binding a data source to the Grid Grouping control using Visual Studio.
Please refer the sample in the following link:
..\..\AppData\Local\Syncfusion\EssentialStudio\{Installed version}\Windows\Windows\ Grid.Grouping.Windows\Samples\2.0\Getting Started\Data Binding VS Demo
Please let me know if you have any concerns.
Regards,
Jeya Preetha M
Hi TrungdaicaCIT,
Thanks for the update.
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.
Hi TrungdaicaCIT,
Thank you for update.
We will update details for your reported query in that forum '40735'. Please refer the forum for better follow up.
Let me know if you have any further concerns.
Regards,
Ragamathullah B.
- 12 Replies
- 5 Participants
-
AS Adnan Sohail
- Feb 1, 2007 04:48 PM UTC
- Jun 22, 2012 04:21 AM UTC