User Profile

Collapse

Profile Sidebar

Collapse
sbandalli
sbandalli
Last Activity: Mar 19 '09, 10:46 PM
Joined: Feb 5 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sbandalli
    started a topic Binding Datagridview columns to dataset

    Binding Datagridview columns to dataset

    Hi,

    I have a Datagridview, and it has a comboxcolumn, and textbox column, I want to bind the columns of the my datagridview to dataset, How to go with it??
    See more | Go to post

  • How to get the selected item in the Combobox and Textbox

    Hello,

    I have a Datagridview which has a combobox,and 2 textbox, The combobox is bound to a Datasource(Data base Sql Server and the table name is Category)
    ,and Datagridview is not bounded to any datasource. When the user selects an item in the combobox,and enters the item(text) in the 2 text box , I want all the 3(combobox selected item, and the entered text in the 2 textbox) of them to store it a a table name called Transact_tablet rialone.(column s...
    See more | Go to post

  • sbandalli
    replied to Update a list box
    Hello Siddharth,

    waiting for your reply.....
    See more | Go to post

    Leave a comment:


  • sbandalli
    started a topic Binding gridview to Database table

    Binding gridview to Database table

    Hi,

    I have a datagridview1, which has a comboboxcolumn categoryname(wh ich is binded to a database table Category )

    listCol.DataSou rce = cDS.Tables["Category"];

    datagridview1 also has two textbox column named description and amount which are not binded to any datasource.

    Now I want to bind this datagridview1 to a new database table called transact_table, so that whatever the...
    See more | Go to post

  • sbandalli
    replied to Update a list box
    hello Siddhartha,

    Are you able to see my previous couple of questions???Ple ase reply to me.

    thanks...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Are you able to see my questions siddhartha??
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    hello Siddhartha,
    I am not able to contact you or post any questions, I dont know whether you were able to see my previous couple of questions.
    Please do let me know if you are able to see my questions
    Thanks
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Siddharth did u get my last 2 questions, because when I see the thread I could not see my questions, So I was not sure whether u got my previous questions.After # 50 I dont see any more questions or answers.
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Also I wanted to just tell u that, my datagridview is not bounded to any datasource, only comboboxcolumn of datagridview is bounded to Categorytable

    listCol.DataSou rce = cDS.Tables["Category"];

    Thanks..
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Code:
     void savetotransact_table()
            {
                
              DataTable pTable1 = cDS.Tables["Table"];
              DataRow cOrderRow = cDS.Tables["Transact_table"].NewRow();
              cOrderRow["amout"] = dataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect;
    
             cOrderRow["description"] = dataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect;
    ...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Do I have to put the data from the datagridview to the Datatable of the Dataset and then try to put it into the transaction table of the database. If so , here is the code i am using to put it in data table

    DataTable pTable = cDS.Tables["Table"];
    DataRow cOrderRow = cDS.Tables["Transact_table "].NewRow();
    cOrderRow["amount"] = ?????? // how do I select the...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hello Siddharth,

    I am really not getting How to do. The place where I am struck is here:

    I have a table called Transaction table

    columns are:

    transaction id (primary key)
    category id(foreign key )
    transactiodate
    description
    amount

    Now I have a datagridview
    Columns of datagridview are:
    comboboxcolumn( the pull downlist from which the...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    I need to put categoryid also in my transaction table which is a foreign key,
    along with the comboboxcolumn entry, Amount,Descript ion, So How do I category id in my Transaction table which relates to the combobox selected item.

    suppose in my Category table i have the following

    categoryid categoryname datecreated
    1 Grocery 02/19
    2 electricity...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Siddharth I created a transaction table with the following columns:

    1. Transactionid (PK)
    2. Categoryid(FK) relating to Category table
    3.Description
    4.Transactionda te
    5.Amount

    Now I have a datagridview, which has a comboboxcolumn, Amount,Descript ion.
    Once the user selects a particular item from the comboboxdropdow n, and enters the respective amount and description, I want to Store all...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hello Siddharth,
    Thanks for the reply....It is very helpful, I understood about the events very nicely..thanks a lot..
    private void apply_Click(obj ect sender, EventArgs e)
    {

    }

    The above method is just a button click event(The text of the button is "apply"), I should have mentioned in my last question(sorry about that)

    When i click that "apply" button I should...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hi Siddharth,

    your code worked fine....Thanks a ton........
    One more question is, once the user selects the item from the combox then it should be transfered to another table called Transact table.
    Can you give me hint on how to acheive this. I know I am asking u a lot,but thats how I am able to learn,otherwise I feel I am lost...

    Now I have a datagridview which has columns
    1.categoryname( combobox...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hello Siddharth,

    Here is the code to update the listbox and categoryname in Category table.

    Code:
     else if (textBox1.Text != String.Empty && globalindex != -1)
                {
                 SqlCommand cmdupdate = new SqlCommand("databaseupdate",connection); 
    cmdupdate.CommandType = 
    CommandType.StoredProcedure; 
    cmdupdate.Parameters.Add(
    new SqlParameter("@categoryid",
    ...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hello Siddharth,

    I would like also to tell u my Category table columns

    1. categoryid which incriments automatically as I save something to DB
    2. categorname, which takes value form textbox1.txt
    3. datecreated which takes value form DataTime.Now

    Thaks a lot
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    Hello Siddharth,

    Even my updating the category table when the user double clicks in the listbox is also not working.

    This is how I am trying......

    Code:
    void SavetoDB()
            {
               //Inserting the data from the textbox into dataset
    
                DataTable pTable = cDS.Tables["Table"];
                DataRow cOrderRow = cDS.Tables["Category"].NewRow();
    ...
    See more | Go to post

    Leave a comment:


  • sbandalli
    replied to Update a list box
    hello Siddharth,
    I tried the link which you had sent,but still not working, is there any other resource,

    I have a combobox column in my datagridview, in my combobox I should be able to display all the items in the categoryname column of the Category column. if the categoryname has food,electricit y the combobox column should be able to give pulldown which has food ,electricity so that the user can select one.
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...