Click here to Skip to main content
15,898,987 members
Home / Discussions / C#
   

C#

 
AnswerRe: Link in Dynamic menu [modified] Pin
Saksida Bojan21-Aug-09 19:47
Saksida Bojan21-Aug-09 19:47 
QuestionHow to source code c++ language modify to with XML in c# ? Pin
bolly12521-Aug-09 17:55
bolly12521-Aug-09 17:55 
AnswerRe: How to source code c++ language modify to with XML in c# ? Pin
Saksida Bojan21-Aug-09 19:38
Saksida Bojan21-Aug-09 19:38 
QuestionChecking a webpage doesn't redirect [modified] Pin
craigchrist823921-Aug-09 15:22
craigchrist823921-Aug-09 15:22 
AnswerRe: Checking a webpage doesn't redirect Pin
Saksida Bojan21-Aug-09 19:55
Saksida Bojan21-Aug-09 19:55 
QuestionGet the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 10:04
baranils21-Aug-09 10:04 
AnswerRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
Henry Minute21-Aug-09 10:18
Henry Minute21-Aug-09 10:18 
GeneralRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 10:41
baranils21-Aug-09 10:41 
Thank you Henry

"Can you describe in more detail the circumstances when you would want to do this?"

Good question !

I have three combobox column on single row (one and only one)

Those three combo are binded to three different tables
There is a logical relation berween those tables

If the user select a value in the third combo I want to show the related value in the first and second cell


So I'm trying to force the values of two cell but it doesn't work
I'm trying this

If I change the appellation Column

Pays must shows "France"
And Region must Show "Bordeaux"

But Pays remain empty !!
I thought it was because I also have to change the selected item of the combo ??

// ***********************************************************************************
private void DgvKeys_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
  if (noEvent)
  {
    return;
  }

  ComboBox combo = e.Control as ComboBox;
  if (combo != null)
  {

    combo.DropDownStyle = ComboBoxStyle.DropDown;
    combo.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
    combo.AutoCompleteSource = AutoCompleteSource.ListItems;

    combo.SelectedIndexChanged -= new EventHandler(ComboBox_SelectedIndexChanged);
    combo.SelectedIndexChanged += new EventHandler(ComboBox_SelectedIndexChanged);
  }
}

// ***********************************************************************************
private void ComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
  noEvent = true;
  ComboBox combo = (ComboBox)sender;

  if (combo.SelectedItem == null)
  {
    return;
  }

  DataRowView cRowV = (DataRowView)combo.SelectedItem;
  DataRow cRow = cRowV.Row;


  if (combo.DisplayMember == "Appellation")
  {
    DgvKeys.Rows[0].Cells["Pays"].Value = "France"; // = GetPaysName(cRow["PaysID"]);
    DgvKeys.Rows[0].Cells["Region"].Value = "Bordeaux"; // GetRegionName(cRow["RegionID"]);
    curApel = cRow["Appellation"].ToString();
    curApelID = Tools.GetInt(cRow["ApelID"]);
    noEvent = false;
    return;
  }
}

GeneralRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 11:21
baranils21-Aug-09 11:21 
Questionrun a function before exiting a web application Pin
JohnQuar121-Aug-09 8:58
JohnQuar121-Aug-09 8:58 
AnswerRe: run a function before exiting a web application Pin
xstoneheartx21-Aug-09 9:26
xstoneheartx21-Aug-09 9:26 
Questioncan not copy database files Pin
msrezapro21-Aug-09 8:16
msrezapro21-Aug-09 8:16 
AnswerRe: can not copy database files Pin
xstoneheartx21-Aug-09 9:38
xstoneheartx21-Aug-09 9:38 
AnswerRe: can not copy database files Pin
Dave Kreskowiak21-Aug-09 9:54
mveDave Kreskowiak21-Aug-09 9:54 
QuestionMessage Resource file version info Pin
cturn21-Aug-09 6:03
cturn21-Aug-09 6:03 
AnswerRe: Message Resource file version info Pin
Saksida Bojan21-Aug-09 6:26
Saksida Bojan21-Aug-09 6:26 
GeneralRe: Message Resource file version info Pin
cturn21-Aug-09 6:34
cturn21-Aug-09 6:34 
GeneralRe: Message Resource file version info Pin
Saksida Bojan21-Aug-09 7:13
Saksida Bojan21-Aug-09 7:13 
GeneralRe: Message Resource file version info Pin
cturn21-Aug-09 8:39
cturn21-Aug-09 8:39 
GeneralRe: Message Resource file version info Pin
Saksida Bojan21-Aug-09 9:59
Saksida Bojan21-Aug-09 9:59 
GeneralRe: Message Resource file version info Pin
cturn25-Aug-09 12:37
cturn25-Aug-09 12:37 
GeneralRe: Message Resource file version info Pin
cturn26-Aug-09 5:29
cturn26-Aug-09 5:29 
QuestionSwitch, case? Pin
nhqlbaislwfiikqraqnm21-Aug-09 5:52
nhqlbaislwfiikqraqnm21-Aug-09 5:52 
AnswerRe: Switch, case? Pin
0x3c021-Aug-09 6:00
0x3c021-Aug-09 6:00 
GeneralRe: Switch, case? Pin
nhqlbaislwfiikqraqnm21-Aug-09 6:10
nhqlbaislwfiikqraqnm21-Aug-09 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.