473,324 Members | 2,254 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,324 software developers and data experts.

Retrieve a Value from the DataGrid Control

Hi

I would like to allow user to change the value in the dataGrid control
without setting the row to Edit Mode

The question is how to read the value once the user submitted the page (say
using a submit button)

In this case I defined a TemplateField as a DropDownList and using the
Row(Index).Cells.Index and I use the following code

CType(dg.Rows.Item(i).Cells(4).Controls(1), DropDownList).SelectedValue
Is there a better way

Thanks,
Samuel
Nov 11 '06 #1
1 1115

Try this. I used in my project and it is great.
http://blogs.msdn.com/mattdotson/articles/490868.aspx

Shahzad Godil
Karachi-Pakistan.
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi

I would like to allow user to change the value in the dataGrid control
without setting the row to Edit Mode

The question is how to read the value once the user submitted the page
(say using a submit button)

In this case I defined a TemplateField as a DropDownList and using the
Row(Index).Cells.Index and I use the following code

CType(dg.Rows.Item(i).Cells(4).Controls(1), DropDownList).SelectedValue
Is there a better way

Thanks,
Samuel

Nov 14 '06 #2

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

Similar topics

1
by: Bryan | last post by:
Hello: I need to retrieve the value of a textbox control in a asp.net datagrid using Javascript. Can anybody help out. I believe the control clientID needs to be passed client side so the...
3
by: Alex | last post by:
How can I retrieve a DataRow from the DataGrid in the update handler? Can I do this or do I need to construct one?
2
by: epigram | last post by:
I'm responding to a button click event on an asp.net web form. I then need to retrieve the value from a TextBox control and I want to compare it against the control's previous value to see if it...
0
by: xiaozozo | last post by:
hi everyone, im having a small problem here.. currently using a datagrid to display data from my DB, and using button column "select" as my first column. the text field is set as one of the...
3
by: Rich | last post by:
Hello, I am populating a datagridview from a datatable and filtering the number of rows with a dataview object. Is there a way to retrieve the rows displayed by the datagridview into a separate...
2
by: rn5a | last post by:
A SQL Server 2005 stored procedure expects a parameter 'UserID' depending upon which it retrieves the no. of records & OrderIDs corresponding to the 'UserID' from a DB table (note that OrderID &...
1
by: indoo | last post by:
This is a C# web application. I had to browse a .doc or .txt file using fileupload control and store it into the database. Then retrieve frrom the database to show in the datagrid. Now i have...
1
by: whidbey | last post by:
Hello friends, I am whidbey, new to thescripts and dot net as well.I am working over Online Shopping Cart,web application.I design a page (webform5.aspx) where user search books then select the books...
0
by: whidbey | last post by:
Hello friends, I am whidbey, new to thescripts and dot net as well.I am working over Online Shopping Cart,web application.I design a page (webform5.aspx) where user search books then select the books...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.