Search results for query: *

  • Users: DoJa
  • Order by date
  1. D

    Question How to bind text box to dataset?

    I think you misunderstood the question. I read what you said about the Endedit and I am using that and it works with the textboxes. The issue now is how to bind to the buttons, or at least create the effect of doing so. Is there a way to bind the binding source to a variable which I could then...
  2. D

    Question How to bind text box to dataset?

    Thanks jmcilhinney, that helped a lot! :) This has fixed all my text inputs. txtForename.DataBindings.Add("Text", bSource, "forename") I also have a few boolean entries in the database which I would like to control with a 'yes' button and a 'no' button. How can I use the bindingsource as I...
  3. D

    Question How to bind text box to dataset?

    With some help from people on here and some examples I found on Google, I have successfully managed to bind a datagridview to a dataset connected to a mysql database and using the command builder to update any changes back to the database. This is all well and good, however the datagridview...
  4. D

    Data Adapter / Datagridview basics

    I follow thus far , however surely if I call the same function again for another purpose in the program then 'ds' will contain something different and will no longer be relevant? How do I ensure this doesn't become a problem? I was thinking perhaps I should change the function from a boolean...
  5. D

    Data Adapter / Datagridview basics

    Thanks Jmcilhinney, that has cleared a few things up! I tried your suggestion using the default cell style and after a bit of experimentation discovered the previous error I experienced was due to zero date values in one of my database columns. Changed these to default as Null instead and that...
  6. D

    Data Adapter / Datagridview basics

    I understand what you are saying .. partially. Just unsure of the implementation. I realise that if I read a row from the database I can format that data however I like before choosing how and where it is displayed, but if using the 'automated' features of vb.net to populate datagridviews by...
  7. D

    Data Adapter / Datagridview basics

    Does that mean I table joins are out of the question too? or just the date formatting that is too much? I think the reason I added the date format was because without it I was getting an error without it saying that the date types were incompatible (as i seem to recall mysql stores dates by...
  8. D

    Data Adapter / Datagridview basics

    I am trying to populate a datagridview from an sql statement (which I have achieved) but then want to be able to update the contents of the cells by entering data and saving the changes back to the database. I am populating the datagridview with the following code: Private Sub get_data()...
  9. D

    Datagridview grid references change after showing a new form - help please!

    Come on man, please be a bit more specific. I'm tearing my hair out here! As far as I can see everything is there .. I am confused!
  10. D

    Datagridview grid references change after showing a new form - help please!

    Ok so i've started again from scratch, basically copied the example from here How to: Access Objects in a Windows Forms DataGridViewComboBoxCell Drop-Down List and modified to suit my requirements. I have a form with a datagridview control and a button. I have disabled autogeneration of columns...
  11. D

    Datagridview grid references change after showing a new form - help please!

    Am I complicating matters by using both a dataset and a datagrid view? Should I be doing away with the dataset and entering data directly into the datagridview itself?
  12. D

    Datagridview grid references change after showing a new form - help please!

    Lots of useful info there thanks, unfortunately everything there seems to relate to creating datagridview columns manually in code rather than how to bind to colums that were made in design view.
  13. D

    Datagridview grid references change after showing a new form - help please!

    Is it possible to create all my columns in design view for both text and button? I know physically it is possible as I have done it, but I encountered a problem where when binding the datagrid view to my dataset/datatable I would get duplicate columns. I had hoped that by using the same...
  14. D

    Datagridview grid references change after showing a new form - help please!

    I guessed as much! :adoration: Although your previous suggestion has in effect solved my problem, do you know why it was necessary for me to do it this way? Why did switching between forms cause the column indexes to change? It would be nice to understand why, so as to avoid similar situations...
  15. D

    Datagridview grid references change after showing a new form - help please!

    Sometimes I think you are intentionally blunt, however I thank you as your suggestions have lead me in the direction of a solution. A few things to ponder though .. I remember now the reason I added the delete button column in code and not design .. it was because I wanted it on the far right...
  16. D

    Datagridview grid references change after showing a new form - help please!

    Ok, but if I did, how to I access the member variable for that column which you speak of?
  17. D

    Datagridview grid references change after showing a new form - help please!

    Thanks for your quick reply. I think I understand the jist of what you are saying, but my knowledge is too limited to actually translate it into anything useful. Please could you explain in a bit more detail what line of code/function are you saying I should use? Your assumption is incorrect. I...
  18. D

    Datagridview grid references change after showing a new form - help please!

    Hi All, I'm using a datagridview to display a list of names added to a register (in a datatable) which then later get copied to an external database. The system worked perfectly until recently when I added a second form to my project. I noticed if I changed forms from the one with the dgv to...
  19. D

    Question Combo Box

    The code itself does work because if i delete the code for combobox1 then the code for combobox 2 does what it's supposed to. However if I run the code for combobox1 first and then combobox 2 after nothing happens with combobox 2. Do I have to create a new connection every time I want to send...
  20. D

    Question Combo Box

    Thanks for the link. I followed the instructions, copied the code and got the example working however I dont understand what i'd need to change to get it working with my database instead of the predefined values. Out of interest why isnt the code to populate the second combo box working? It is...
Back
Top