Click here to Skip to main content
15,920,383 members
Home / Discussions / C#
   

C#

 
GeneralRe: Access GDI+ Image pointer from unmanaged C++ dll... Pin
Andy Moore8-Jun-05 10:58
Andy Moore8-Jun-05 10:58 
GeneralHelp With a Combo Problem Pin
monica2k7-Jun-05 17:14
monica2k7-Jun-05 17:14 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 17:16
protectorChristian Graus7-Jun-05 17:16 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 17:18
monica2k7-Jun-05 17:18 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 17:23
protectorChristian Graus7-Jun-05 17:23 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 17:36
monica2k7-Jun-05 17:36 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 17:55
protectorChristian Graus7-Jun-05 17:55 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 18:07
monica2k7-Jun-05 18:07 
This Is my Main Combo Code
To populate

public static void PopulateMainCombo( ComboBox Combo, string ConnectionString, string TableName, string TextField, string ValueField, string DefaultValue )
{ Combo.DataSource = null;
string Query="select * from " + TableName;
Query = Query + " order by " + TextField;
Combo.DataSource=DataManager.ConnectingForCombo(ConnectionString,Query,TableName);
Combo.DisplayMember = TextField;
Combo.ValueMember = ValueField;


}

private void cmbMainDiagnosis_SelectedIndexChanged(object sender, System.EventArgs e)
{


bool blnVisible;
blnSubDiagnosis=false;
int intSelectedValue;
intSelectedValue=(int) this.cmbMainDiagnosis.SelectedValue;
cmbSubDiagnosis.Visible=false;
cmbSubSubDiagnosis.Visible=false;
blnVisible=Diagnosis.SetDiagnosisCombos(intSelectedValue,this.cmbSubDiagnosis,"tblsubdiagnosis_mas","strSubDiagnosisDesc","intMainDiagnosisCode","0");
blnSubDiagnosis=blnVisible;
if (blnVisible==true)
{
cmbSubDiagnosis.Visible=true;
}
else
cmbSubDiagnosis.Visible=false;

}

/////////////////////////////////////////////////////////////////////////////
and this is my Second Combo that is cmbsubDiagnosis on change of which my third combo that is cmbSubSubDiagnisis is to be populated.
////////////////////////////////////////////////////////////////////////////

private void cmbSubDiagnosis_SelectedIndexChanged(object sender, System.EventArgs e)
{
if (blnSubDiagnosis==true)
{
bool blnVisible;
int intSelectedValue;
intSelectedValue=(int)this.cmbSubDiagnosis.SelectedValue;
cmbSubSubDiagnosis.Visible=false;
blnVisible=Diagnosis.SetDiagnosisCombos(intSelectedValue,this.cmbSubSubDiagnosis,"tblsubsubdiagnosis_mas","strSubsubDiagnosisDesc","intSubDiagnosisCode","0");
if (blnVisible==true)
{
cmbSubSubDiagnosis.Visible=true;
}
else
cmbSubSubDiagnosis.Visible=false;
}
}

///////////////////////////////////////////////////////////////////////////
and this is the function i use to puplate 2nd and 3 rd combo
///////////////////////////////////////////////////////////////////////////
public static bool SetDiagnosisCombos(int paramDiagnosisCode,ComboBox Combo,string TableName, string TextField, string ValueField, string DefaultValue )
{

String ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["DSN"];
Combo.DataSource = null;
String query = "select * from "+ TableName +" where "+ ValueField + " = " + paramDiagnosisCode;
DataTable Dt = DataManager.ExecuteQuery(ConnectionString, query, TableName );
if (Dt.Rows.Count!=0)
{
Combo.DataSource=Dt;
Combo.DisplayMember = TextField;
Combo.ValueMember = ValueField;
Combo.SelectedIndex = -1;
return true;

}
else
return false;

}

pls i am struggling since morning. Help me out pls. the problem comes at the bold points an exception is thrown which says additional information required

Monica
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 18:09
protectorChristian Graus7-Jun-05 18:09 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 18:10
monica2k7-Jun-05 18:10 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 18:12
protectorChristian Graus7-Jun-05 18:12 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 18:14
monica2k7-Jun-05 18:14 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 18:18
protectorChristian Graus7-Jun-05 18:18 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 18:21
monica2k7-Jun-05 18:21 
GeneralRe: Help With a Combo Problem Pin
Christian Graus7-Jun-05 18:25
protectorChristian Graus7-Jun-05 18:25 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 18:30
monica2k7-Jun-05 18:30 
GeneralRe: Help With a Combo Problem Pin
Robert Rohde7-Jun-05 19:34
Robert Rohde7-Jun-05 19:34 
GeneralRe: Help With a Combo Problem Pin
monica2k7-Jun-05 19:37
monica2k7-Jun-05 19:37 
GeneralRe: Help With a Combo Problem Pin
AfzalHassen7-Jun-05 23:32
AfzalHassen7-Jun-05 23:32 
GeneralRe: Help With a Combo Problem Pin
Robert Rohde8-Jun-05 7:03
Robert Rohde8-Jun-05 7:03 
GeneralRe: Help With a Combo Problem Pin
Christian Graus8-Jun-05 13:30
protectorChristian Graus8-Jun-05 13:30 
GeneralRe: Help With a Combo Problem Pin
monica2k8-Jun-05 13:35
monica2k8-Jun-05 13:35 
GeneralPerformance of Abstract Methods Pin
vylkier7-Jun-05 14:50
vylkier7-Jun-05 14:50 
GeneralRe: Performance of Abstract Methods Pin
S. Senthil Kumar7-Jun-05 21:31
S. Senthil Kumar7-Jun-05 21:31 
GeneralSystem.Uri problem Pin
Jason Manfield7-Jun-05 14:23
Jason Manfield7-Jun-05 14:23 

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.