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.

Help please - ComboBoxAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

55819 Feb 5,2007 02:36 PM Feb 7,2007 01:40 PM Windows Forms 5
loading
Tags: Tools
Administrator [Syncfusion]
Asked On February 5, 2007 02:36 PM

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 02:43 PM

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 03:09 PM

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 12:49 PM

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 11:42 AM

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 01:40 PM

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.

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.

;