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

Urgent | Highlight Row in DataView

hi,

I have a DataView which has around 50 items(the page has scrollbars).
there is a search box on top of the page. when user enters an Id, i do
DataView.find("Id"). I get the row index but i need to highlight this
row and set focus on this row. that means my page might have to scroll
down if the id that is searched happens to be the 45th one.

Please help me do this.

Thanks

Mar 7 '07 #1
3 2271
I am using ASP.Net 2.0
Mar 7 '07 #2
You can use the row binding event to intercept the row build and color any
color you want, if ther eis a postback. If you have a row click event, you
can pull the id at that time. If you are aiming for complete client side
highlighting, you will have to loop through rows in JavaScript and highlight
that way. It is a bit more involved, but the speed is not bad as you are
working on the client's browser.

I don't have an example off hand, but I remember someone who created a
DataGrid (1.x) that higlighted rows as you scrolled. Very neat stuff. I will
see if I can find the URL.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
"tirath" <Ti******@hotmail.comwrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
hi,

I have a DataView which has around 50 items(the page has scrollbars).
there is a search box on top of the page. when user enters an Id, i do
DataView.find("Id"). I get the row index but i need to highlight this
row and set focus on this row. that means my page might have to scroll
down if the id that is searched happens to be the 45th one.

Please help me do this.

Thanks
Mar 7 '07 #3
On Mar 7, 7:21 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamMwrote:
You can use the row binding event to intercept the row build and color any
color you want, if ther eis a postback. If you have a row click event, you
can pull the id at that time. If you are aiming for complete client side
highlighting, you will have to loop through rows in JavaScript and highlight
that way. It is a bit more involved, but the speed is not bad as you are
working on the client's browser.

I don't have an example off hand, but I remember someone who created a
DataGrid (1.x) that higlighted rows as you scrolled. Very neat stuff. I will
see if I can find the URL.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************"tira th" <Tirat...@hotmail.comwrote in message

news:11**********************@p10g2000cwp.googlegr oups.com...
hi,
I have a DataView which has around 50 items(the page has scrollbars).
there is a search box on top of the page. when user enters an Id, i do
DataView.find("Id"). I get the row index but i need to highlight this
row and set focus on this row. that means my page might have to scroll
down if the id that is searched happens to be the 45th one.
Please help me do this.
Thanks- Hide quoted text -

- Show quoted text -
hi Gregory,
Thanks for the reply.
I am not sure how can i capture row binding event in this case?I dont
have any row binding event here because i am not binding the rows
right now. I have a datalist whose source is this DataView. There is a
text box and button on this page above the datalist. When user types
the Id and clicks search, then i do DataView.find and get the
rowindex.I want this row to get highlighted and have the focus.
Regards

Mar 7 '07 #4

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

Similar topics

4
by: David | last post by:
Hi. I developed an ASP.NET application that users just started testing and found a huge problem with. In one part of the application I am creating an instance of the class and save information...
8
by: ZZZ | last post by:
SqlDataAdapter sql99 = new SqlDataAdapter("select OMSCHR,TELLER,CATEGORIE,STUKS,EENHEID,BTWCODE,P1 from ARTIKELEN order by OMSCHR",sqlConnection3); sql99.Fill(ds); MessageBox.Show("1:" +...
6
by: Ubi | last post by:
hi i have a problem with System.Data.DataViewRowState. i have a ReadOnly datagrid, a dataView and a dataTable. i'm using the dataView's filter property to filter the data (firstName =...
3
by: Sachin_M | last post by:
Hi Friends, I want to develop a web based app where it will talk to a dll (which retrieves real time data from a controller) I've added a com dll reference to my project, the code is something...
2
by: | last post by:
how to highlight a row of my datagrid (web) . i dont want to use select button. upon clicking on the row , it shouls be highlighted and cursor shouls remain in the same row. how to acheive...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
3
by: Mae Lim | last post by:
Hi All, I've a problem here, I want to trigger a javascript function after binding the ListBox control. Basically the javascript will remove the duplicates records after recordset is bind in the...
0
by: Zoe Elmo | last post by:
hello everybody, do anybody has any idea of how to highlight a row according to a dataview filter using .NET CF (vb coding)? for example: Dim dv as Dataview = (ds.tables("student")) ...
2
by: slinky | last post by:
I had a successfully deployed datagrid reading an XML file and showing the data: Private Function MakeDataView() as DataView Dim myDataSet As New DataSet()...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.