View previous topic :: View next topic |
Author |
Message |
Scabandari_Bloodeye
Joined: 31 May 2006 Posts: 5 Location: British Columbia
|
Posted: Wed May 31, 2006 11:26 pm Post subject: Trying to bind columns run time |
|
|
Hello
I am trying to bind data during run time, such that I can pass as an argument different datasets, and using this data I am currently copying it into a treeNode class I'v created that holds the columns of data in an ArrayList. I have tried to do all the cell and row binding as well as add a column as follows:
for( int i = 0 ; i < this.ColumnHeaders.Count ; ++i )
{
this.IColumn = new Infralution.Controls.VirtualTree.Column();
this.ICellBinding = new Infralution.Controls.VirtualTree.ObjectCellBinding();
...
this.vt.Columns.Add( IColumn );
this.ICellBinding.Column = IColumn;
this.ICellBinding.Field = "Name";
this.objectRowBind1.CellBindings.Add( ICellBinding );
}
...
Anyways, I check after setting the vt datasource to my treeNode root the amount of columns and children and column visibility etc.. it seems to check out. I'v outputted the happenings of the GetCellData event and that seems to check out fine as well, but when running my program I get an empty infralution tree control, no data, no columns/column header info/ nothing really.
Any suggestion would be great, thank you! _________________ - "Look, those fewls from Gunma are here!" |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 01, 2006 6:57 am Post subject: |
|
|
If you can zip a sample project that illustrates your problem and email it to support@infralution.com then we will take a look at it. It would be pretty hard to diagnose this without a full sample. _________________ Infralution Support |
|
Back to top |
|
|
Scabandari_Bloodeye
Joined: 31 May 2006 Posts: 5 Location: British Columbia
|
Posted: Thu Jun 01, 2006 5:14 pm Post subject: |
|
|
Thank you for your quick responce. Unfortunately I cannot send the entire project, but I will send the 2 relevant files, I believe with these you won't have much trouble if you follow the code from the constructor. Some of the functionality of the class is unimplemented so it's mostly just code to test out the tree.
-Tyler _________________ - "Look, those fewls from Gunma are here!" |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 01, 2006 11:42 pm Post subject: |
|
|
For issues like this it is actually quite difficult to diagnose with out being able to run some code. I can't see any issues in your code that would cause nothing to display - although you are doing some strange things with the member variable "IColumn" - you use it as a loop variable in setColumns which will mean its value will probably not be what you might expect. You should check that you aren't calling SuspendLayout anywhere without a matching ResumeLayout being called - also ensure that you have turned on exception catching in the debugger so that if you code is throwing an exception you will see it.
Are the GetChildren and GetCellData events actually being called when you run?
What version of Visual Studio are you using?
Are you able to compile and run the sample programs successfully?
I would set the ShowRootRow property to true - so that you can verify that your data source is actually being set.
If you don't have any columns displayed then I would try just adding one column at design time and see if you can get this working. If you can create a sample project that we can run we might be able to provide more help. _________________ Infralution Support |
|
Back to top |
|
|
Scabandari_Bloodeye
Joined: 31 May 2006 Posts: 5 Location: British Columbia
|
Posted: Fri Jun 02, 2006 11:31 pm Post subject: |
|
|
Thanks very much for the effort you put in, it wasn't exactly any of the suggestions but they led me along the right path and I have resolved the problem. Awesome support as always, I'll know how to help make it easier for you the next time, thanks!
-Tyler _________________ - "Look, those fewls from Gunma are here!" |
|
Back to top |
|
|
|