473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

datagrid not writing to datasource

AMC
Hi,

I have a data grid with drop down combos. When the combos change they prompt
changes of text boxes in other columns of the same grid. How do I get these
changes to then be saved to the underlying datasource? A code sample would
be great
Nov 20 '05 #1
5 971
Part of it would depend on the implementation of the comboboxes.

Have you verified .HasChanges? If so, and it evaluations to true, does
..Update throw an exception or is it just not doing anything?
"AMC" <ab*****@netgate.net> wrote in message
news:eJ****************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a data grid with drop down combos. When the combos change they prompt changes of text boxes in other columns of the same grid. How do I get these changes to then be saved to the underlying datasource? A code sample would
be great

Nov 20 '05 #2
AMC
I am using this code to call the procedure that fills the other columns
based on the selection in the combo

DataGridComboBoxColumn ComboTextCol2 = new DataGridComboBoxColumn(new
ComboValueChanged(DescriptionChanged));

Should I put some code in this procedure that then saves the changes to the
datasource?


"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:e%******************@TK2MSFTNGP11.phx.gbl...
Part of it would depend on the implementation of the comboboxes.

Have you verified .HasChanges? If so, and it evaluations to true, does
.Update throw an exception or is it just not doing anything?
"AMC" <ab*****@netgate.net> wrote in message
news:eJ****************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a data grid with drop down combos. When the combos change they

prompt
changes of text boxes in other columns of the same grid. How do I get

these
changes to then be saved to the underlying datasource? A code sample would be great


Nov 20 '05 #3
AMC
No exception is thrown and nothing happens. How do I explicitly save the
changes in the grid back to the datasource and what procedure should I
include this in?

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:e%******************@TK2MSFTNGP11.phx.gbl...
Part of it would depend on the implementation of the comboboxes.

Have you verified .HasChanges? If so, and it evaluations to true, does
.Update throw an exception or is it just not doing anything?
"AMC" <ab*****@netgate.net> wrote in message
news:eJ****************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a data grid with drop down combos. When the combos change they

prompt
changes of text boxes in other columns of the same grid. How do I get

these
changes to then be saved to the underlying datasource? A code sample would be great


Nov 20 '05 #4
Anything done to the grid should pass through to the object its bound to. I
need to check out the combobox code to see what's up.

Can you change the values in a combobox, move down a row and test for
HasChanges and let me know what happens.

Thanks,

Bill
"AMC" <ab*****@netgate.net> wrote in message
news:#D*************@TK2MSFTNGP11.phx.gbl...
No exception is thrown and nothing happens. How do I explicitly save the
changes in the grid back to the datasource and what procedure should I
include this in?

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:e%******************@TK2MSFTNGP11.phx.gbl...
Part of it would depend on the implementation of the comboboxes.

Have you verified .HasChanges? If so, and it evaluations to true, does
.Update throw an exception or is it just not doing anything?
"AMC" <ab*****@netgate.net> wrote in message
news:eJ****************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a data grid with drop down combos. When the combos change they

prompt
changes of text boxes in other columns of the same grid. How do I get

these
changes to then be saved to the underlying datasource? A code sample would be great



Nov 20 '05 #5
AMC
Has changes is true. Is there code I can use to write the grid to the
datasource explicitly and where would be a good place to put this code?

Thanks
"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:Or*************@TK2MSFTNGP11.phx.gbl...
Anything done to the grid should pass through to the object its bound to. I need to check out the combobox code to see what's up.

Can you change the values in a combobox, move down a row and test for
HasChanges and let me know what happens.

Thanks,

Bill
"AMC" <ab*****@netgate.net> wrote in message
news:#D*************@TK2MSFTNGP11.phx.gbl...
No exception is thrown and nothing happens. How do I explicitly save the
changes in the grid back to the datasource and what procedure should I
include this in?

"William Ryan eMVP" <do********@comcast.nospam.net> wrote in message
news:e%******************@TK2MSFTNGP11.phx.gbl...
Part of it would depend on the implementation of the comboboxes.

Have you verified .HasChanges? If so, and it evaluations to true, does .Update throw an exception or is it just not doing anything?
"AMC" <ab*****@netgate.net> wrote in message
news:eJ****************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a data grid with drop down combos. When the combos change they prompt
> changes of text boxes in other columns of the same grid. How do I get these
> changes to then be saved to the underlying datasource? A code sample

would
> be great
>
>



Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
5
by: nadeem_far | last post by:
Hello All, I have been trying to solve the following issue and it seems like there is no solution available any where and maybe people at Microsoft should may be of some help. I am writing a...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
3
by: AFN | last post by:
I need to manually create the data to be shown in a datagrid (or some data table object). Should I create an array and bind the array to the datagrid OR should I create a temporary dataset and...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
4
by: Rich | last post by:
I fill a dataset like this: dim da As New SqlDataAdapter, ds As New Dataset, conn As New SqlConnection .... da.Fill(ds, "tbl1") datagrid1.DataSource = ds datagrid1.DataMember = "tbl1" When...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.