473,769 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

update the value of a databound column within a datagrid

How do I update the value of a databound column within my datagrid from
within the SelectedIndexCh anged event of a dropdownlist, also found within my
datagrid?
I believe I need to determine the row I'm on but I don't know how to get that.
Oct 16 '06 #1
2 1512
Kerry see:
http://www.4guysfromrolla.com/webtech/050801-1.2.shtml or
http://www.csharphelp.com/archives/archive212.html
Also you can see samples here.
Hope that helps
PAtrick

"KerryL" <Ke****@discuss ions.microsoft. comwrote in message
news:90******** *************** ***********@mic rosoft.com...
How do I update the value of a databound column within my datagrid from
within the SelectedIndexCh anged event of a dropdownlist, also found within
my
datagrid?
I believe I need to determine the row I'm on but I don't know how to get
that.
Oct 16 '06 #2
Patrick, thank you but I guess I wasn't specific enough...I can get to the
info in the dropdownlist, what I want to do is set the text in a bound column
when the user selects something in a dropdownlist.

Here's my selectedindexch anged event for my ddl...

public void ddlResp_Selecte dIndexChanged(o bject sender, EventArgs e)
{
dgResolution.It ems[rownbr].Cells[10].Text = Session["userID"].ToString() ;
}

I don't know how to get 'rownbr' in order to say which row of the datagrid
to update - does this make sense?

"Patrick.O. Ige" wrote:
Kerry see:
http://www.4guysfromrolla.com/webtech/050801-1.2.shtml or
http://www.csharphelp.com/archives/archive212.html
Also you can see samples here.
Hope that helps
PAtrick

"KerryL" <Ke****@discuss ions.microsoft. comwrote in message
news:90******** *************** ***********@mic rosoft.com...
How do I update the value of a databound column within my datagrid from
within the SelectedIndexCh anged event of a dropdownlist, also found within
my
datagrid?
I believe I need to determine the row I'm on but I don't know how to get
that.
Oct 17 '06 #3

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

Similar topics

3
2438
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from code it is 50% chance that the update will make it back to the dataset. If I update the dataset instead of the form, it does not show on the form. Is there a method that should be used?
0
1742
by: NETDeveloper | last post by:
Hi, I almost have my nested datagrid working properly. I created a datagrid on a user control and dropped that onto another datagrid. At first, I noticed when I was stepping through the code, that the update linkbutton actually goes to the edit command instead of the update command (which I'm pretty sure would be a bug). Anyway, I took out the editcommmand column and replaced it with a regular template column. Within the...
0
1347
by: doronb | last post by:
hello my question is : i define dynamic columns to datagrid , 4 columns are databound and 1 columne is "edit template column" and only this col editable , i define function for update when pressing on button the datagrid not define and body of function recognize the object i think is becuase view state but i don't know how to solv it
3
2220
by: D. Shane Fowlkes | last post by:
I have a Datagrid which in theory, should allow you to edit and update the records. I've stripped my test page down so that it's only attempting to update one field - "description". Yet when I make the changes and click Update, it reverts back to the old value. I'm stumped! I've also checked the db table and it is infact not updating. I'm attempting to follow and example right out of ASP.NET Unleashed but not having much luck. Any...
1
1878
by: Ken Varn | last post by:
I have a problem where my DataGrid would not maintain the ViewState of my databound rows. I finally narrowed down the problem. If my first column is a template column, the view state for the DataGrid items is not maintained on postback for some reason. I basically re-created my DataGrid again just to make sure this was indeed the problem. The ViewState was fine until I added the template column at the beginning of the Columns list. ...
13
2672
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value. My probelm.... when I have the user press the update button (which does a post back that loops through the datagrid and updates a database) the field/cell that is filled by the javascript appears to be blank in my update code, even though I can...
5
2437
by: Jay Villa | last post by:
Is it possible to update only few columns in datagrid during OnUpdateCommand event ? If so, could you help me .... -thanks Jay
3
1812
by: Jim | last post by:
I have a datagrid with a DataAdapter as the DataSource. The user fills in their data for 3 columns and I want to programically add a value to the 4th (invisible) column (employee number). That way when the user saves the data I can use the data already in the datagrid. Typically the user will add several rows before the DataSet.HasChanges is called and the DataAdapter.Update(AllChanges) is called. I want to add an employee number to each...
5
2599
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
0
9424
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10051
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.