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.

How to add combox in grid that value is in another table(by entity frame work)

Thread ID:

Created:

Updated:

Platform:

Replies:

108009 Mar 30,2013 11:14 AM Apr 5,2013 12:48 AM Windows Forms 6
loading
Tags: GridControl
has
Asked On March 30, 2013 11:14 AM

hi
i use entity frame work;
i want add combo-box in my grid that foreign key in this table but value in another table
please help me
thanks


has
Replied On March 30, 2013 11:19 AM

excuse me
i want user can sorting by column have combobox

has
Replied On March 31, 2013 06:42 AM

Please help me

has
Replied On April 3, 2013 02:40 AM

Please answer my questions

Arun Kumar V [Syncfusion]
Replied On April 3, 2013 02:43 AM

Hi Sir,

Thanks for your interest in Syncfusion products.

Could you please provide us the following details. What control you are using i.e: gridcontrol(or) griddatbound grid. Please let me know what version you are currently using.

Regards,

Arun.


has
Replied On April 3, 2013 06:55 AM

hi
i use griddatbound and version 2012 volume 2
thanks

Ragamathulla B [Syncfusion]
Replied On April 5, 2013 12:48 AM

Hi Has,

 

Thanks for the update.

 

You can change the value is in another table by using ‘CurrentCellShowingDropDown’ event. Please refer to the following code.

 

// way 1

private void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)

{

GridCurrentCell cc = this.gridDataBoundGrid.CurrentCell;

if(cc.ColIndex == 2)

  //column that need to be filtered...

{

GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;

if(cr != null)

{

DataView dv = new DataView(dataTable1);

dv.RowFilter = string.Format("[MyCol1] = '{0}'", this.gridDataBoundGrid1[cc.RowIndex, 1].Text);

 

((GridComboBoxListBoxPart)cr.ListBoxPart).DataSource = dv;

}

}

}

Let  me know if you have any further concerns.

 

Regards,

Ragamathullah B.


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.

;