I've implemented a ListGrid using the generics in the DataSource thread on that topic and it works great!
My next step would allow me to show the ForeignKey values as a drop down (Select or ComboBox) in that ListGrid, when I double click a row and go into editing mode, the view should consist of two columns the first would be a value that I store, the second would show a column with a description for that value (basically a mini table with two columns).
I have the ListGrid working with my main DataSource and the FK (Select or ComboBox FormItem) showing but it only shows one column of data which are the values from another DataSource.
Example Code:
ListGrid Field Code as part of my main DataSource:
My ComboBox Object using its own DataSource setup as the ForeignKey:
Any help or direction on this subject would be greatly appreciated.
Do I need to create a customer FormItem?
Thank you,
My next step would allow me to show the ForeignKey values as a drop down (Select or ComboBox) in that ListGrid, when I double click a row and go into editing mode, the view should consist of two columns the first would be a value that I store, the second would show a column with a description for that value (basically a mini table with two columns).
I have the ListGrid working with my main DataSource and the FK (Select or ComboBox FormItem) showing but it only shows one column of data which are the values from another DataSource.
Example Code:
ListGrid Field Code as part of my main DataSource:
Code:
//MemberListGridDS DataSourceIntegerField intField = new DataSourceIntegerField("websid"); intField.setCanEdit(true); intField.setForeignKey("weblgds.websid"); intField.setEditorType(new WebComboItem()); addField(intField);
Code:
//WebComboItem Object WebListGridDS ds = new WebListGridDS(); ds.setID("weblgds"); setColSpan(2); setTitle("WebMasterId"); setDefaultValue(1); setValueField("websid"); setDisplayField("dsc"); setEmptyPickListMessage("No data in table"); setPickListWidth(450); // I also saw some notes on using ListGridFields but this didn't work either // setShowOptionsFromDataSource(true); // ListGridField websidField = new ListGridField("websid"); // ListGridField dscField = new ListGridField("dsc"); // setPickListFields(websidField, dscField); setOptionDataSource(ds); setAutoFetchData(true);
Do I need to create a customer FormItem?
Thank you,