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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help please - ComboBoxAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

55819 Feb 5,2007 07:36 PM UTC Feb 7,2007 06:40 PM UTC WinForms 5
loading
Tags: Tools
Administrator [Syncfusion]
Asked On February 5, 2007 07:36 PM UTC

Hi there,
I'm using a ComboBoxAdv with a DataTable and DataView - the DataTable is populated by an XML file.

DataView dv = new DataView(dt);
this.cmbData.DataSource = dv;
this.cmbData.DisplayMember = "Description";

However, the Combo box only displays a list of the following text, instead of my table's data:

System.Data.DataRowView

Thanks,
Dimitri

Administrator [Syncfusion]
Replied On February 5, 2007 07:43 PM UTC

I've got it - thanks.

>Hi there,
I'm using a ComboBoxAdv with a DataTable and DataView - the DataTable is populated by an XML file.

DataView dv = new DataView(dt);
this.cmbData.DataSource = dv;
this.cmbData.DisplayMember = "Description";

However, the Combo box only displays a list of the following text, instead of my table's data:

System.Data.DataRowView

Thanks,
Dimitri

Administrator [Syncfusion]
Replied On February 5, 2007 08:09 PM UTC

Hi,
Can you help me with a related/follow up question?

I have a GGC populated by the same source that populates my combo box. Is there a way to link them so that my Combo selection causes the matching row to scroll into view and be selected in the GGC?

Thanks,
Dimitri

>I've got it - thanks.

>Hi there,
I'm using a ComboBoxAdv with a DataTable and DataView - the DataTable is populated by an XML file.

DataView dv = new DataView(dt);
this.cmbData.DataSource = dv;
this.cmbData.DisplayMember = "Description";

However, the Combo box only displays a list of the following text, instead of my table's data:

System.Data.DataRowView

Thanks,
Dimitri

Administrator [Syncfusion]
Replied On February 6, 2007 05:49 PM UTC

Hi Dimitri,

Please try the attached sample and let me know if you are trying something different.
GGC_Group.zip

Best regards,
Haneef

Administrator [Syncfusion]
Replied On February 7, 2007 04:42 PM UTC

Thanks Haneef, that works. What's the best way to get the record values from a selected row in the GGC? I'd like to get at the selected state directly, along the lines of the following..

myGGC.TableControl.Table....[get the currently selected row and its data]

Thanks,



>Hi Dimitri,

Please try the attached sample and let me know if you are trying something different.
GGC_Group.zip

Best regards,
Haneef

Administrator [Syncfusion]
Replied On February 7, 2007 06:40 PM UTC

Hi,

The this.gridGroupingControl1.Table.SelectedRecords property is the collection of selected recrods that you get when you use the grid in ListBoxMode (by setting TableOptions.AllowSelections=None and TableOptionsListBoxMode to something other that None). Here is a code snippet to show this.

foreach(SelectedRecord srec in this.gridGroupingControl1.Table.SelectedRecords)
{
Console.WriteLine(srec.Record);//Record format.
DataRowView row = srec.Record.GetData() as DataRowView; //DataRowView format.
}

Best regards,
Haneef

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.

Warning Icon 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.Close Icon

;