472,789 Members | 1,155 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 SelectedIndexChanged 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 1469
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****@discussions.microsoft.comwrote in message
news:90**********************************@microsof t.com...
How do I update the value of a databound column within my datagrid from
within the SelectedIndexChanged 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 selectedindexchanged event for my ddl...

public void ddlResp_SelectedIndexChanged(object sender, EventArgs e)
{
dgResolution.Items[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****@discussions.microsoft.comwrote in message
news:90**********************************@microsof t.com...
How do I update the value of a databound column within my datagrid from
within the SelectedIndexChanged 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
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...
0
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,...
0
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...
3
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...
1
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...
13
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....
5
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
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...
5
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
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.