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

Tree Virtual Grid

Can anyone please put an example for creating virtual data grid using collection of objects?

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

12 Replies

AD Administrator Syncfusion Team February 1, 2007 10:28 PM UTC

Hi 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


AS Adnan Sohail February 1, 2007 10:42 PM UTC

Hi 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.


AD Administrator Syncfusion Team February 2, 2007 05:49 PM UTC

Hi Adnan,

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


AS Adnan Sohail February 5, 2007 05:46 PM UTC

Hi 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


AD Administrator Syncfusion Team February 5, 2007 09:35 PM UTC

Hi Adnan,

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


TR TrungdaicaCIT June 9, 2012 03:21 AM UTC

Hi all!

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.....
Thank you!


JP Jeya Preetha M Syncfusion Team June 14, 2012 05:02 AM UTC

 

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



TR TrungdaicaCIT June 15, 2012 04:25 AM UTC

Thank you Syncfusion forum. Thank you Mr. Jeya Preetha M



RB Ragamathulla B Syncfusion Team June 18, 2012 04:22 AM UTC

Hi TrungdaicaCIT,

Thanks for the update.

Please let me know if you have any further concerns.

Regards,

Ragamathullah B.



TR TrungdaicaCIT June 18, 2012 08:27 AM UTC

I have "Format Cells Demo" of "Dynamic Formatting" on Syncfusion sample. I want to Merge data in gridview from database SqlServer. I need a source like it.I hope your helpers....thank you!


TR TrungdaicaCIT June 18, 2012 08:37 AM UTC

This is my demo sample about "Format Cells Demo"


ModifiedTesting2_b254bb60_260cef70.rar


RB Ragamathulla B Syncfusion Team June 22, 2012 04:21 AM UTC

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.


Loader.
Live Chat Icon For mobile
Up arrow icon