473,785 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to select or highlight data grid row

sujathaeeshan
22 New Member
Hello all,

I want to highlight or select data grid row based on first letter of first column in data grid with keyboard.

Just by pressing the key of first letter of the column ,it has to highlight the respective row.

For example,

RST 1000 FFF
FGH 2000 JJJ
KLP 3000 KKK
FST 4000 GGG

grid will be having 4 rows like this,if user prees F then it has to highlight 2nd row,if he press F continuosly then its has to highlight the 4th row..like it has to search and Highlight all Rows that's having first column name starting with F.

This feature is default for combo box list or list box .

But how i will be able to provide the same functionality for Data Grid.


Thanx,
Suji
Nov 12 '08 #1
3 1839
Plater
7,872 Recognized Expert Expert
I have been wondering if there was a nice way to do this myself.

So far all I have been able to find was that you manually watch the keypresses and loop through the the data looking for a matching row and then select it
Nov 12 '08 #2
sujathaeeshan
22 New Member
Can you please give an example ...
for the selected alphabet it has to loop through the data for matching row
Nov 13 '08 #3
Plater
7,872 Recognized Expert Expert
Yeah pretty much, you watch the key presses and if the user presses 'a' you loop through your rows until you find one that starts with an 'a'
Nov 13 '08 #4

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

Similar topics

5
2560
by: Narine | last post by:
Hi All, We're running SQL Server 2000, SP3. I have a stored procedure that consists of a single Select statement. It selects a bunch of columns one of which is a column of data type TEXT. SP takes 30 sec to run which causes timeouts on the Front End. When I comment out the Text column from the select it only takes 1 Sec.
4
2447
by: Bruce Pullum | last post by:
I have a datagrid that I am using a DataView with. All works great for the sorting of the columns. However, after I sort the column, and then try and select a data row to edit, the row selected represents the indes of the actual DataGrid and not the DataView. For example.. Lets say I have 4 rows of data.. In the 4 rows I have an Appt Num of 1,2,3,4... Each representing a data row... I sort DESC so the rows display 4,3,2,1... If I...
2
9927
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that...
4
2180
by: Chris | last post by:
I've searched, reviewed, and attempted dozens of code ideas on the subject. I can't seem to get something that seems so simple to work. To highlight a row in a datagrid based on another value in that row. I have a datagrid using Template and Item Columns, i.e.: <asp:TemplateColumn HeaderText="CA Date Req" HeaderStyle-CssClass="gridqtext" ItemStyle-CssClass="gridtext"> <ItemTemplate> <asp:Label ID="lblcadatereq" CssClass="gridtext"...
2
5280
by: Doru Roman | last post by:
Hi, I use a DataGrid and I have a search on a specific value in a dataset. Once I find the row that contains the value, I would like that row to be visible in the datagrid window, in other words, to scroll up to that particular row to be the first or last in the visible part of the grid. Any suggestions please? Thanks, Doru
0
978
by: BijuP | last post by:
Hi, I have a datagird having datatable as its datasource. It has a column called "Check" which appears as checkbox in the grid. The user can manually go and click on that field to check/uncheck it, and also the user has the facility to check all the checkboxes with a click of a button. To achieve this I am doing this.. On Button_Click ------------------------
5
1729
by: tomcarr1 | last post by:
I have an ASP.net webform with a datagrid on it. I can change the SQL select statement for the grid in code by putting a statement like this in the first line of Page_Load OleDbDataAdapter1.SelectCommand.CommandText = "SELECT * from table where ... " The rest of the code in Sub Page_Load is OleDbDataAdapter1.Fill(DsCategories1)
4
2478
by: Matt Ratliff | last post by:
Hello, I would appreciate any assistance you have with the following problem: I have (as an example) an array of values as follows: arrayvalues=new Array("0001","0003","0005") where each is the value of an option in a select statement: <select id="usertypes" multiple="multiple"> <option value="0033">data1</option>
3
1791
by: kurtzky | last post by:
I'm working in VS 2003. I have a datagrid and its AllowSort property is set to true. The columns of my grid are Inv No, Inv Desc and Apply To. I added a function that will Search for an Apply To..Say I input "2123" in the textbox, then it will highlight the row from the datagrid with Apply To that is 2123. The problem happens when I click the column headers so that it will be sorted.
0
9483
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.