473,395 Members | 1,556 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,395 software developers and data experts.

can't retrieve data from rowupdating event gridview control

In the code below the first line works to read data from the gridview control
but the second line the ltest label is null. The very first column of the
grid is a bound data item that I converted to a template column. This column
has a label called lblDiscID which gets populated on the gridview control
correctly. Thanks.

protected void gridview_RowUpdating(object sender, GridViewUpdateEventArgs
e)
{

string DiscDescrip =
Convert.ToString((gridview.Rows[e.RowIndex].Cells[5].FindControl("txbxDiscgv") as TextBox).Text);

Label ltest = (gridview.Rows[e.RowIndex].Cells[0].FindControl("lblDiscID")
as Label);

ltest is always null!
--
Paul G
Software engineer.
Jul 1 '08 #1
2 3601
Hi,

If you want to get the new values why don't you use
e.NewValues dictionary

well does find control on ther cell work?

Best of luck

Munna

www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
Jul 1 '08 #2
Hi thanks for the response. I was able to get it to work but the users want
to be able to make several changes in different rows and then just hit a
button to save it.
I could get this to work if I could access the gridview data (including new
changes) in the save button click event or the rowdatabound event. I was
able to get the data off of the grid in the rowdatabound event but it did not
seem to include any of the new data changes on the grid.
--
Paul G
Software engineer.
"Munna" wrote:
Hi,

If you want to get the new values why don't you use
e.NewValues dictionary

well does find control on ther cell work?

Best of luck

Munna

www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
Jul 1 '08 #3

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

Similar topics

2
by: Rob | last post by:
for some reason i keep getting : Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/rob/www/php/filegetcontents2.php on...
0
by: Jussi | last post by:
I have a Windows Application project which is registered for the COM Interop and Output type is Class Library. My class is as follows: namespace WSure { //COM events interface public...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
1
by: spitapps | last post by:
In a traditional gridview control the items inserted(bind) into the control are rows and the data is in columns. I have a customer who wants the data fields as rows and the columns as the items...
2
by: jonny | last post by:
How can I do this with ASP controls & VB.NET On click of button run query to fill gridView.
2
by: maanasa | last post by:
hi, My question is can we retrieve data from oracle in built tables like dba_users, dba_roles, dba_role_privs on to a text field using oracle forms. If yes then what're the privileges that needs to...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I am trying to read hidden data from a gridview control. This works if the data is visible but if the column is not visible it does not return anything, thanks. Int32 itemp =...
1
by: hannaj | last post by:
we have been doing a project where in when the user enter a word in the textbox an information will be displayed in the form, for example, its meaning.. for example, we have created a database for...
0
by: michael Tun | last post by:
How can I retrieve data from oracle package. OracleCommand command = new OracleCommand("STAFF_SELECT", connection); command.CommandType = CommandType.StoredProcedure; STAFF_SELECT is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.