User Profile

Collapse

Profile Sidebar

Collapse
newuserint
newuserint
Last Activity: Dec 13 '09, 08:44 AM
Joined: Dec 9 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • The error says it all, you need to creat and MDI Primary Form which will be parent for all the other forms.
    See more | Go to post

    Leave a comment:


  • newuserint
    replied to About DataTable or/and Combobox
    in .NET
    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}'",
    ...
    See more | Go to post

    Leave a comment:


  • newuserint
    replied to About DataTable or/and Combobox
    in .NET
    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();
    ...
    See more | Go to post

    Leave a comment:


  • newuserint
    replied to About DataTable or/and Combobox
    in .NET
    I figured it out to save the values from the combobox to an array:
    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();
    }
    The only problem is that index start in 0 and Count is a real number, so it shows...
    See more | Go to post
    Last edited by Frinavale; Dec 10 '09, 02:22 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

    Leave a comment:


  • newuserint
    replied to About DataTable or/and Combobox
    in .NET
    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.
    See more | Go to post

    Leave a comment:


  • newuserint
    replied to About DataTable or/and Combobox
    in .NET
    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
    ...
    See more | Go to post

    Leave a comment:


  • newuserint
    started a topic About DataTable or/and Combobox
    in .NET

    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();
    See more | Go to post
No activity results to display
Show More
Working...