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

ASP.NET 2.0 Gridview select row in code problem

12
Hello, anyone have found out how to select row in gridview in code?

My problem is that on select command i populate another gridview based on first gridviews datakeyname's value and i highlight the selected row. Ok, no problems there, but when i change page and come back i need to highlight it again.

I have tried on RowDataBound - event to catch the row im searching but problem is that i cant compare values because seems that e.Row.Cells(x).Text - command doesnt give results if cell is readonly/not visible. So question is: is there any ways on Row dataBound to get hidden fields values or any ideas how to go around the problem?
Jun 26 '07 #1
1 3796
r035198x
13,262 8TB
Hello, anyone have found out how to select row in gridview in code?

My problem is that on select command i populate another gridview based on first gridviews datakeyname's value and i highlight the selected row. Ok, no problems there, but when i change page and come back i need to highlight it again.

I have tried on RowDataBound - event to catch the row im searching but problem is that i cant compare values because seems that e.Row.Cells(x).Text - command doesnt give results if cell is readonly/not visible. So question is: is there any ways on Row dataBound to get hidden fields values or any ideas how to go around the problem?
Please do not post questions in the articles section.
Moved to the forum.
Jun 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
4
by: ber.janssens | last post by:
Hi, In ASP.NET 2.0, I have a GridView with 2 CommandFields, how can I determine in the SelectedIndexChanged event which CommandField is clicked? <asp:GridView ID="gvOrderList" runat="server"...
5
by: maurban | last post by:
Hi there experts, I have a gridview with a couple textboxes and a dropdownlist. I'm trying to insert a default value into my database driven dropdownlist. I'm doing this in the rowdatabound...
8
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
2
by: antonyliu2002 | last post by:
I've been googling for some time, and could not find the solution to this problem. I am testing the paging feature of gridview. I have a very simple web form on which the user can select a few...
2
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
0
by: jaz215 | last post by:
Hi i have an update page where i update data when a user select a row in the gridview, i also have a search function that displays the data in the gridview all those data that matched the search. my...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
0
by: cmrhema | last post by:
Hi, I have a gridview problem while binding more than two gridviews. I am giving a sample scenario of what I have done so far I have two tables First table: Department , having columns...
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
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.