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
close icon

About GridGrouingControl and GridDataBoundGrid

On GridGrouingControl : I dislay 5 columns, When the user reach the last Column, and press tab, the cursor doesn''t move to the next row (line or record). But when the user press return, the ggc display a new record, but not move to that record. 1. How to make the cursor move to the next row by pressing even tab or return ?. 2. I have 2 datatables ''Provider'' with fields : {ProviderCode, ProviderName} and ''Invoice'' with fields : {NoInvoice, ProviderCode}. I would like to display in GridGrouingControl wich datasource is Invoice, showing the columns : NoInvoice, ProviderCode, ProviderName (from Provider DataTable). How to do it ? On GridDataBoundGrid : 1. How to make the CheckBox Column Type to be read only 2. When the user press tab to enter a TextBox Column (in edit mode), it seems that a blank or tab is inserted in the field. How to avoid this ? 3. I set the PasswordChar of a TextBox Column Type to "*", when the user is editing that column, he can see the value entering. How to let the user only seeing the PasswordChar ("*") ? 4. I have 2 datatables ''Provider'' with fields : {ProviderCode, ProviderName} and ''Invoice'' with fields : {NoInvoice, ProviderCode}. I would like to display in GridGrouingControl wich datasource is Invoice, showing the columns : NoInvoice, ProviderCode, ProviderName (from Provider DataTable). How to do it ?

2 Replies

AD Administrator Syncfusion Team May 4, 2005 03:50 PM UTC

GridGrouingControl : 1) There is no property settings to handle this. One way, you can do it is to use the TableControlMoveCurrentCellDirection event. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_DataTable_12253442.zip 2) If this is strictly a lookup column that you do not want to sort or group, the simplest way to is set up a ComboBox column, setting the DataSource, DisplayMember and ValueMember properties on the style for that column. Here are some code snippets. this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.CellType = "ComboBox"; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.DataSource = someDataTable; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.DisplayMember = "displayCol"; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.ValueMember = "valueCol"; (If you set Appearance.RecordFieldCell and Appearance.AlternateRecordFieldCell properties, you would have to set teh above code on those appearances instead.) But if youwant to sort or group this foriegn key column, then you have to use a relation.RelationKind.ForeignKeyReference to make this work. Here is a sample. http://www.syncfusion.com/Support/user/uploads/GGC_ForeignKeyReference_f47ce2d2.zip GriddataBoundGrid: 1) Try code like this: this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].ReadOnly = true; //if you have not added GridBoundColumns this.gridDataBoundGrid1.GridBoundColumns["Col1"].ReadOnly = true; //if you have added GridBoundColumns 2) This is a bug. It is corrected in our latest release, 3.2.1.0. 3) The default cell type is "TextBox" and this uses a RichTextBox which does not support password characters. If you change the on this column from "TextBox" to "OriginalTextBox", then a Windows Forms TextBox control will be used in the column and it does support PassWord characters. this.gridDataBoundGrid1.Binder.InternalColumns["Col1"].CellType = "OriginalTextBox"; //if you have not added GridBoundColumns this.gridDataBoundGrid1.GridBoundColumns["Col1"].CellType = "OriginalTextBox"; //if you have added GridBoundColumns 4) The only option is to use the DataSource/DisplayMember/ValueMember with a "ComboBox" CellType (as mentioned in 2 for GridGroupingControl). This sample shows how you can do this all from the designer. (Take a look at the designer generated code to see what was done.) \Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\DataBound\GDBGcombos


PD Prof DISSOU Jamâl-Dine May 4, 2005 04:44 PM UTC

Hi Clay, Thank you a lot Jamâl-Dine DISSOU

Loader.
Live Chat Icon For mobile
Up arrow icon