User Profile
Collapse
-
The error says it all, you need to creat and MDI Primary Form which will be parent for all the other forms. -
Ok now i know all that but i have now another question:
If Sql Query doesnt find desired values what is saved into the Dataset?
For example:
...Code:public DataTable ListadoGeneral() { // indicar la instancia SQL this.cadenasql = string.Format ("Select ClaveArticulo,NombreArticulo From Mercancia Where NombreProveedor='{0}'",Leave a comment:
-
i solved it:
Code:for (int i = 0; i < contador; i++) { matrix[i] = this.cbbAux.SelectedValue.ToString(); if(this.cbbAux.SelectedIndex<contador-1) this.cbbAux.SelectedIndex++; }...Code:Categorias Cate = new Categorias(); this.cbbAux.DataSource = Cate.ListadoGeneral();Leave a comment:
-
I figured it out to save the values from the combobox to an array:
The only problem is that index start in 0 and Count is a real number, so it shows...Code:contador = this.cbbAux.Items.Count; string[] matrix = new string[contador]; for (this.cbbAux.SelectedIndex = 0; this.cbbAux.SelectedIndex < contador; this.cbbAux.SelectedIndex++) { matrix[this.cbbAux.SelectedIndex] = this.cbbAux.SelectedValue.ToString(); }Last edited by Frinavale; Dec 10 '09, 02:22 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.Leave a comment:
-
Thanks for your reply, as you may already noted im newbie at this, so if you could show me an example of what you said in the last post, that would be superb.Leave a comment:
-
Basically what im trying to do, is to get values from a database to put em as Buttons Texts for example:
this.button1.te xt=this.cbb.sel ectedvalue.tost ring();
the number of buttons will depend of the number of data contained in the table(which only contains an atribbute) from the database.
for example:
Table Providers:
ProviderName
Palmolive
Hersheys
Coke
...Leave a comment:
-
About DataTable or/and Combobox
Hi folks, i wanted to know if there's a way i can save into a string array the values contained in a datatable.
Also, i know i can save into a combobox the values of a DataTable containing a SQL query from a Database, but is there a way i can get this values saved in the combobox, to save them in a string array?
Class1 Object1=new Class1();
this.combobox1. DataSource=Obje ct1.MethodDataT able();
No activity results to display
Show More
Leave a comment: