Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
AnswerRe: HEX-values Pin
Martin#10-Jul-07 20:17
Martin#10-Jul-07 20:17 
GeneralRe: HEX-values Pin
roiter10-Jul-07 20:27
roiter10-Jul-07 20:27 
GeneralRe: HEX-values Pin
Martin#10-Jul-07 20:28
Martin#10-Jul-07 20:28 
GeneralRe: HEX-values Pin
Luc Pattyn10-Jul-07 23:51
sitebuilderLuc Pattyn10-Jul-07 23:51 
AnswerRe: HEX-values Pin
Guffa10-Jul-07 20:53
Guffa10-Jul-07 20:53 
Questionpopulating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 19:44
monuSaini10-Jul-07 19:44 
AnswerRe: populating combo box on selectedindex changedevent of other combo box1 Pin
valerian.precop10-Jul-07 20:38
valerian.precop10-Jul-07 20:38 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 20:50
monuSaini10-Jul-07 20:50 
Hi Valy,

Here is the code for populating the combo box1

string sqlQuery = "select * from category ";
SqlConnection objConnection = new SqlConnection(objFunctions.strConn);
objConnection.Open();
SqlDataAdapter adapter = new SqlDataAdapter(sqlQuery, objConnection);
DataSet ds = new DataSet();
adapter.Fill(ds);

DataTable objDataTable = ds.Tables[0];
cmb_category.DataSource = objDataTable;
cmb_category.DisplayMember = "categoryName";
cmb_category.ValueMember = "categoryId";

objConnection.Close();


AND on selectedIndexChangeEvent

I m populating combo box using comboBox1.selectedValue

but it is returning System.Data.DataRowView

Regards,



rahul saini
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
Nisar Inamdar10-Jul-07 20:56
Nisar Inamdar10-Jul-07 20:56 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:04
monuSaini10-Jul-07 21:04 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
Nisar Inamdar10-Jul-07 21:15
Nisar Inamdar10-Jul-07 21:15 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:27
monuSaini10-Jul-07 21:27 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
Nisar Inamdar10-Jul-07 22:25
Nisar Inamdar10-Jul-07 22:25 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
valerian.precop10-Jul-07 21:25
valerian.precop10-Jul-07 21:25 
GeneralRe: populating combo box on selectedindex changedevent of other combo box1 Pin
monuSaini10-Jul-07 21:46
monuSaini10-Jul-07 21:46 
QuestionException Pin
sangramkp10-Jul-07 19:27
sangramkp10-Jul-07 19:27 
AnswerRe: Exception Pin
valerian.precop10-Jul-07 20:36
valerian.precop10-Jul-07 20:36 
GeneralRe: Exception Pin
sangramkp10-Jul-07 21:17
sangramkp10-Jul-07 21:17 
GeneralRe: Exception Pin
Brady Kelly10-Jul-07 21:40
Brady Kelly10-Jul-07 21:40 
GeneralRe: Exception Pin
Rhys Gravell10-Jul-07 22:33
professionalRhys Gravell10-Jul-07 22:33 
AnswerRe: Exception Pin
valerian.precop10-Jul-07 21:39
valerian.precop10-Jul-07 21:39 
GeneralRe: Exception Pin
mav.northwind11-Jul-07 8:52
mav.northwind11-Jul-07 8:52 
AnswerRe: Exception Pin
Rhys Gravell10-Jul-07 22:29
professionalRhys Gravell10-Jul-07 22:29 
Questionevent fire Pin
SwaSubhaVijju10-Jul-07 19:20
SwaSubhaVijju10-Jul-07 19:20 
AnswerRe: event fire Pin
_AK_10-Jul-07 19:37
_AK_10-Jul-07 19:37 

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.