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.
Unfortunately, activation email could not send to your email. Please try again.

combobox grid pickup list

Thread ID:

Created:

Updated:

Platform:

Replies:

30548 Jun 20,2005 10:10 AM Jun 21,2005 04:38 PM Windows Forms 5
loading
Tags: GridControl
Lan Mo
Asked On June 20, 2005 10:10 AM

in GGC, I have a column called "Super Section" which is a combobox pick up list. when user click the dropdown list, it will display a grid with "Section Id","On Street", "From Street", "End Street" columns that comes from a section table. When a section is selected, it will return the "Section ID" to the "Super Section" cell value. Any similar examples? Thanks, Lan

Administrator [Syncfusion]
Replied On June 20, 2005 10:46 AM

Take a look at this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference Also, there is also a sample in this forum thread. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference

Lan Mo
Replied On June 21, 2005 02:08 PM

I add following code, but no drop-down arrow displaying in the cell for the foreign-key grid. I don''t know why? Any idea? DataSet dsTmp=BL.Access.LoadDataSet(lookup_table,null,where); DataTable tbLookup=dsTmp.Tables[lookup_table]; string sLookup=ColumnName+"_Lookup"; gdBase.Engine.SourceListSet.Add(sLookup,tbLookup); GridTableDescriptor mainTd = this.gdBase.TableDescriptor; gdBase.TableOptions.AllowDropDownCell=true; GridRelationDescriptor rdSSect_NO = new GridRelationDescriptor(); rdSSect_NO.Name = "SuperID"; rdSSect_NO.RelationKind = RelationKind.ForeignKeyReference; rdSSect_NO.ChildTableName = sLookup; // SourceListSet name for lookup rdSSect_NO.RelationKeys.Add(ColumnName, lookup_field_code); rdSSect_NO.ChildTableDescriptor.Appearance.AlternateRecordFieldCell.BackColor = Color.Beige; rdSSect_NO.ChildTableDescriptor.VisibleColumns.Add(lookup_field_code); rdSSect_NO.ChildTableDescriptor.VisibleColumns.Add("loc_street"); rdSSect_NO.ChildTableDescriptor.VisibleColumns.Add("loc_from"); rdSSect_NO.ChildTableDescriptor.VisibleColumns.Add("loc_to"); rdSSect_NO.ChildTableDescriptor.SortedColumns.Add("loc_street"); rdSSect_NO.ChildTableDescriptor.AllowEdit = false; rdSSect_NO.ChildTableDescriptor.AllowNew = false; // Make pencil icon disappear, users can''t modify states. mainTd.Relations.Add(rdSSect_NO); >Take a look at this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference > >Also, there is also a sample in this forum thread. > >\Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference

Administrator [Syncfusion]
Replied On June 21, 2005 03:08 PM

Is ColumnName the mappingname of the column where you want the dropdown in the grid? Are you seeing any exceptions listed in your output window? Here is another sample. http://www.syncfusion.com/Support/user/uploads/GGC_ForeignKeyReference_a924c4a.zip If you can upload a sample that shows the problem, we can try to spot it here.

Lan Mo
Replied On June 21, 2005 03:50 PM

Here are my grid form files. It is generic data edit form. You can''t run it. the code is in SetColumn(...) >Is ColumnName the mappingname of the column where you want the dropdown in the grid? > >Are you seeing any exceptions listed in your output window? > >Here is another sample. http://www.syncfusion.com/Support/user/uploads/GGC_ForeignKeyReference_a924c4a.zip > >If you can upload a sample that shows the problem, we can try to spot it here. frmGrid_7817.zip

Administrator [Syncfusion]
Replied On June 21, 2005 04:38 PM

I suspect there is some naming problem. Add debug code to your program to loop through and print out: 1) all the ColumnNames for both the main datatable and the lookup datatable. 2) all the tableDescriptor.Columns[index].MappingNames for both the main tabledescriptor and the relation.tabledescriptor. Then verify the name you are using as exactly the names shown in the debug printout and what you expect. If you can upload a working prgram, we can try to do this here.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;