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.
Syncfusion Feedback

CurrentCellCloseDropDown

Thread ID:

Created:

Updated:

Platform:

Replies:

61782 Jun 1,2007 02:41 PM UTC Jun 7,2007 05:14 PM UTC Windows Forms 10
loading
Tags: GridControl
Raul
Asked On June 1, 2007 02:41 PM UTC

Hi,

I am using a DGBG, which has one column as comboxbox type, when I select a value from this combo box, I would want to update another cell in the grid, however i am unable to get new selected value from the combobox. I am code I am using is as follows :

private void dgrdPartyAssoc_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridCurrentCell cc = this.dgrdPartyAssoc.CurrentCell;
try
{
if (cc.ColIndex == SlaveColumn)
{
MessageBox.Show(dgrdPartyAssoc[1, 4].Text);
DataRow[] drc = dsParty.Tables[6].Select("[ASSOCIATED_PARTY_NAME] ='" + dgrdPartyAssoc[cc.RowIndex, SlaveColumn].Text + "'");
dgrdPartyAssoc[cc.RowIndex, 5].Text = drc[0][4].ToString();
dgrdPartyAssoc.Refresh();
}
}
catch (Exception ee)
{
}
}

Thanks in advance.

Raul Dsouza

haneefm [Syncfusion]
Replied On June 1, 2007 03:19 PM UTC

Hi Rahul,

To get the new value, you use grid.CurrentCell.Renderer.ControlText.

Best regards,
Haneef

Raul
Replied On June 1, 2007 04:24 PM UTC

I am getting the updated text, however on this event I would want to set the text of a particular cell, which is not bieng set. Kindly help.The code i am using is as follows :
GridCurrentCell cc = this.dgrdPartyAssoc.CurrentCell;
try
{
if (cc.ColIndex == SlaveColumn)
{
DataRow[] drc = dsParty.Tables[6].Select("[ASSOCIATED_PARTY_NAME] ='" + dgrdPartyAssoc.CurrentCell.Renderer.ControlText.ToString() + "'");
dgrdPartyAssoc[cc.RowIndex, 5].Text = drc[0][4].ToString();
dgrdPartyAssoc.Refresh();
}
}

Thanks,
Raul

haneefm [Syncfusion]
Replied On June 1, 2007 09:25 PM UTC

Hi Rahul,

You can try this code.

dgrdPartyAssoc.Model[cc.RowIndex, 5].Text = drc[0][4].ToString();

Best regards,
Haneef

Raul
Replied On June 4, 2007 07:27 AM UTC

Hi,

I am unable to see the changes on the grid, do I need to do some accept changes ?

Dan Dorey
Replied On June 4, 2007 07:25 PM UTC

Hey, I had a similar problem.

Try keying off the CurrentCellEditingComplete event and then see if the new value has been updated in the grid.

Not sure if this even will fire right after you pick something from the drop down however.

>Hi,

I am unable to see the changes on the grid, do I need to do some accept changes ?

haneefm [Syncfusion]
Replied On June 4, 2007 07:45 PM UTC

Hi,

You can cell the EndEdit Method(before calling this , you need to call the CurrentCell''s Edit method) to push all data to underlying datasource in the grid. Here is a code snippet.

For GridDataBoundGrid:
>>>>>>>>>>>>>>>>>>>>>>
this.gridDataBoundGrid1.CurrentCell.EndEdit();
this.gridDataBoundGrid1.Binder.EnableEdit();
this.gridDataBoundGrid1.Refresh()

For GridGroupingControl:
>>>>>>>>>>>>>>>>>>>>>>
e.TableControl.CurrentCell.EndEdit(); //saves the currentcell
e.TableControl.Table.EndEdit();
e.TableControl.Refresh();

Best regards,
Haneef

Raul
Replied On June 5, 2007 08:00 AM UTC

Hi Haneef,

I still nt getting the updated value in the grid, I am using the following code :

DataRow[] drc = dsRole.Tables[0].Select("[ASSOCIATED_PARTY_NAME] ='" + dgrdPartyAssoc.CurrentCell.Renderer.ControlText.ToString() + "'");
dgrdPartyAssoc.Model[cc.RowIndex, 5].Text = drc[0][4].ToString();
this.dgrdPartyAssoc.CurrentCell.EndEdit();
this.dgrdPartyAssoc.Binder.EnableEdit = true;
dgrdPartyAssoc.Refresh();

Thanks,
Raul Dsouza

haneefm [Syncfusion]
Replied On June 5, 2007 06:53 PM UTC

Hi Rahul,

Please try to provide us some more information on this issue. I tried to reproduce the issue, but couldn't. kindly provide us a minimal sample to reproduce the issue or modify any of our browser sample accordingly. This will help us to analyse the issue further.

Best regards,
Haneef

Raul
Replied On June 7, 2007 08:43 AM UTC

Hi Haneef,

I am using the following Code :

private void dgrdPartyAssoc_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridCurrentCell cc = this.dgrdPartyAssoc.CurrentCell;
try
{
if (cc.ColIndex == SlaveColumn)
{
dgrdPartyAssoc.Model[cc.RowIndex, 5].Text = "Raul"; // Simplified it
this.dgrdPartyAssoc.CurrentCell.EndEdit();
this.dgrdPartyAssoc.Binder.EnableEdit = true;
dgrdPartyAssoc.Refresh();
}
}
catch (Exception ee)
{
}
}

My requirement is,
I have DGBG which has a master and Slave combobox, Depending On selection of a particular value in Master Combo box, I populate the Slave Combox Box, and on selection of a value of Slave Combobox I need to display a mappping value(For example "Raul") in a cell in the same row of the grid.

in the above code the text "Raul" is nt getting displayed in the grid.


Thanks,
Raul

Raul
Replied On June 7, 2007 05:14 PM UTC

Hey Ahneef, Its working Fine Nw.


Thanks,
Raul Dsouza

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

;