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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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 03:14 PM UTC Apr 5,2013 04:48 AM UTC WinForms 6
loading
Tags: GridControl
has
Asked On March 30, 2013 03:14 PM UTC

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 03:19 PM UTC

excuse me
i want user can sorting by column have combobox

has
Replied On March 31, 2013 10:42 AM UTC

Please help me

has
Replied On April 3, 2013 06:40 AM UTC

Please answer my questions

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

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 10:55 AM UTC

hi
i use griddatbound and version 2012 volume 2
thanks

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

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.

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

;