473,320 Members | 1,829 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.

Selecting a row in a gridview

I have the SelectedValue of a gridview, how do I select the row based on
that information?

Feb 25 '08 #1
2 1406
"katmagic" <ka**********@yahoo.comwrote in message
news:89**********************************@microsof t.com...
>I have the SelectedValue of a gridview, how do I select the row based on
that information?
Please clarify a bit more by what you mean by 'select'...

Do you mean you just want to display the row differently, maybe with a
different background colour?

Or do you want to edit the row?

Or do you want to do something else based on the values of one or more of
the row's cells...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Feb 25 '08 #2
Sorry not very clear. I have some controls that are populated based on the
value of the selected row of a gridview. When the user modifies those
controls it causes a postback so I lose the originally selected row of the
gridview. I want to be able to return the user to the row they had
selected, so before the postback occurs, I grab the value of the currently
selected row. Now I want to return the user to that row, how do I do that?
I hope that makes better sense, thank you so much for your help. Something
like gv.SelectedIndex = ???

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
"katmagic" <ka**********@yahoo.comwrote in message
news:89**********************************@microsof t.com...
>>I have the SelectedValue of a gridview, how do I select the row based on
that information?

Please clarify a bit more by what you mean by 'select'...

Do you mean you just want to display the row differently, maybe with a
different background colour?

Or do you want to edit the row?

Or do you want to do something else based on the values of one or more of
the row's cells...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Feb 25 '08 #3

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

Similar topics

1
by: AT | last post by:
I am having problem with beta 1 asp.net 2.0 I have 3 development stations xp /pro On 2 of them it is working just fine on 3 rd -this event not fired!!!! Problem description: I placed gridview...
2
by: Michael | last post by:
Hi Everyone, I have a gridview control with the following markup: <asp:GridView ID="grdPOs" runat="server" AllowPaging="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966"...
0
by: hledman | last post by:
I'm trying to get a value from a gridview control and put that value in a query string. I have a select button on the gridview and once the user hits the select button i want to capture the the...
0
by: Not Me | last post by:
Hi there, How come, when using default settings on a gridview which has a stored procedure as it's datasource's selectcommand, do I have to sort the stored procedure in order to have the edit...
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...
0
by: Eraser | last post by:
Hi to all .NET guru guys... I have a problem in my delete button inside gridview. How to avoid postback on when i select cancel on confirmation message? But postback is okay on Ok confirmation....
0
by: jaredciagar | last post by:
Hi Guys, Can You Help Me PLease, I'm Currently facing Problems in my system... I need some help... I'm using VB script,ASP.net,MS SQL Server2005 I want to select a specific data in...
5
AnuSumesh
by: AnuSumesh | last post by:
Hi All, I am using <asp:Gridview> to display my data. I am adding columns and rows dynamically. I am facing following issues: 1. I want scrollbars around the gridview and for this purpose i...
21
tsubasa
by: tsubasa | last post by:
I am working on a wish list where users add products to their list for future purhcases. I am using a GridView to display the records by users after they have login to the shopping cart. How can I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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...
0
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.