StrataFrame Forum

Enhanced List Error...

http://forum.strataframe.net/Topic3197.aspx

By StarkMike - 9/29/2006

I dropped an EnhancedList on a SF DevEx Maintenance form...



I set the populationdatasource to a fill method on a BO and set the populationonformload to manual. Then in the code I call the Me.EnhancedList1.Requery and I get this error. I have added only one column to this EnhancedList.



Column 'Col0' does not belong to table




Not sure why this is happening.
By Trent L. Taylor - 9/29/2006

Did you move your columns around in the editor?  Before you spend a bunch of time, try removing the columns (all of them) and then re-create them.  This might be your issue.  Generally this occurs when columns are moved around or dynamically added or removed. 
By Trent L. Taylor - 9/29/2006

One other thing...is your Fill... method pulling back all of the fields that are referenced in the list?
By StarkMike - 9/29/2006

I havent created any columns. I specified one field in the Display fields and specified one column in the Listview population settings. I didnt specify any columns in the EnhancedList's designer... I assumed SF would do that.



And yes I am retrieving the columns that I have specified.
By Trent L. Taylor - 10/1/2006

That's your problem.  Just like the ListView, you have to go in and create the columns.  That is the only thing you have to do.  Open the designer, create the number of expected columns, change the caption if you would like, and then the error should go away.  Also, do not change the names of the columns, the EnhancedList will name them as necessary, but they at least have to exist.

For more information, refer to the EnhancedList sample that was installed with yout 1.5 release.  You can use this as a refernece point.