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

trying to customize row selection in DataGrid

hey guys...

I'm trying to make my DataGrid have selection behavior similar to
WindowsExplorer, where I can hold CTRL to add rows to a multi-row selection.
Thanks to someone else on this newsgroup, I found out how to detect if CTRL
is pressed while in my MouseUp event, which is when it's supposed add that
row to the selection. (Otherwise, if the CTRL key is not pressed I clear any
current selection to start over- just like Explorer)

The problem is it's not keeping my previous selected row highlighted. There
must be some default behavior in DataGrid that is doing this but I have no
idea what... I believe this because if I use the MouseMove event to select
rows as I glide the mouse accross them, it works perfectly! As I drag the
cursor over new rows they get added to the selection and all of the rows stay
highlighted like it should...

Any idea what I can do?

I can try extending the DataGrid but then I wouldn't know what to override
in order to stop this behavior- is DataGrid's source code publically
available so I can look under the cover?
Nov 16 '05 #1
0 1414

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

Similar topics

1
by: deko | last post by:
I've found that the "Remove Filter/Sort" selection in the Shortcut menu (displayed on right click) produces ugly, untrappable errors, even though "Allow Filters" is set to No in the subform. ...
0
by: Maria | last post by:
Hi I am new to .NET and would like to know how do we customize the apprearance of a datagrid Precisely, I would like to make ONE row appear in BOLD, and I would like to specify the number of...
2
by: Hai Ly Hoang | last post by:
Hi, Datagrid is a great control ! But now, i want to customize it : draw a picture on the header row (the topmost row) ! Is it possible ? And how ? Thanks
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
1
by: James Lennon | last post by:
How can I customize a DataGrid row based on the row properties. For istance if a column is 0 make the row bold or red. I have only been able to format a datagrid based on columns. James
1
by: Amy Snyder | last post by:
I have a datagrid where I incorporate paging and sorting. My datagrid page mode is set to numeric. Is there a way for me to customize this to display something like this in the page header: ...
1
by: David Lozzi | last post by:
Hi, I'd like to customize a header in a DataGrid. I want to add a link in the header, as well as pull a recordset's ID. I am using a TemplateColumn so that I can hold several lines of...
1
by: thegame | last post by:
Filling One DataGrid Based on Selection from Another DataGrid - Both in Separate User Controls Hello, I have an interesting dilemma. I have an ASPX page with two user controls (two ASCXs). ...
4
by: Fred | last post by:
Hello, datagrids have GridLines, BorderWidth, BorderColor, ItemStyle.CssClass, ShowFooter ... properties, which can be used to customize the way they look when printed, how does one achieve the...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.