473,748 Members | 9,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Location of previous focus row/column

Sam
Hi all

Is there an easy way to find the previous Cell or Row that user just left on
DataGrid Control or Table. For example, if I'm currently on Row 1 Column 2
and then I click on Row 3 Column 5. Is it possible to know the previous
location of my focus? What I'm trying to do is that if user changed content
of a row, I want to update my variables to reflect that.

Thanks in advance

Sam
Nov 21 '05 #1
2 1246
Hi,

See the cell validating sample

http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q773q

Ken
------------------------
"Sam" <qd*@datawave.c a> wrote in message
news:uK******** ******@tk2msftn gp13.phx.gbl...
Hi all

Is there an easy way to find the previous Cell or Row that user just left on
DataGrid Control or Table. For example, if I'm currently on Row 1 Column 2
and then I click on Row 3 Column 5. Is it possible to know the previous
location of my focus? What I'm trying to do is that if user changed content
of a row, I want to update my variables to reflect that.

Thanks in advance

Sam

Nov 21 '05 #2
Sam
Thanks Ken

Sam
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

See the cell validating sample

http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q773q

Ken
------------------------
"Sam" <qd*@datawave.c a> wrote in message
news:uK******** ******@tk2msftn gp13.phx.gbl...
Hi all

Is there an easy way to find the previous Cell or Row that user just left on DataGrid Control or Table. For example, if I'm currently on Row 1 Column 2
and then I click on Row 3 Column 5. Is it possible to know the previous
location of my focus? What I'm trying to do is that if user changed content of a row, I want to update my variables to reflect that.

Thanks in advance

Sam

Nov 21 '05 #3

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

Similar topics

0
2124
by: Franck Pommereau | last post by:
Hi all, I'm building a PyGTK interface in which I would like that no widget would be able to get the focus (and so to be activated by pressing the Return key). For this purpose, for each widget, I do: widget.set_property("can-focus", gtk.FALSE) My problem is a TreeView which has a clickable column, it get the default focus and I did not find how to forbid that.
2
5631
by: Susan Bricker | last post by:
Greetings! Is it possible to open a form in a specific location on the screen? I have three cascading forms ... fill one in and then open another ... fill that one in and open another. I want to keep each previous form open and position the forms such that the user can see all three (overlapping somewhat). Also, I want to make them modal (can't get focus to the previous form until the current form is closed). Is this possible? Is...
2
2491
by: Bill C. | last post by:
Hi, I'm trying to implement a ComboBox drop-down column for a DataGrid. When a cell is selected in the ComboBox column I overlay a ComboBox over the cell and call: this.comboBox.Show(); this.comboBox.BringToFront(); this.comboBox.Focus();
0
1163
by: Ramiro Blanco | last post by:
I am using a C++ source code generator from Computer Associates, called Allfusion Plex, and need to insert source code to set focus on the next editable cell in a grid. For example, I have a maintenable grid with four columns. The first column is read only and tab stop is set to No. The second and third columns are editable and tab stop is set to Yes. The fourth and last column is editable but the tab stop is to No. I am currently...
1
9424
by: Colin McGuire | last post by:
Thanks everyone for help in my previous post. Using the "Point.op_Addition" from the previous post I have to now focus on the real problem. I need to manually position a new form so that its upper left hand corner is positioned exactly in the middle of the button that was pressed (Button1). I can't seem to get the knack of Location() and PointToScreen() to position the new form here. According to the help, location() is to do
3
1730
by: tlyczko | last post by:
I have this code in a form input box contained in the 4th column cell of a 4-column table: onblur = "if (testExp(this.value, 'message') == false) {window.focus(); this.focus();}" testExp checks the input box form value, but every time it is false (wrong kind of value), the focus goes to the form input box in the 1st column of the *next* table row.
3
2281
by: Greg | last post by:
My problem is that values in the bool column of a datagrid are only being updated to the database once the focus of the bool cell is lost. This is completely counter-intuitative. When a user clicks on a bool type cell in a datagrid and sees a check mark put in / removed, then he/she would expect this to be reflected in the databsae immediately. I've even overriden the paint, commit and edit methods of the bool column class (which...
16
28086
Frinavale
by: Frinavale | last post by:
I am just wondering if it is possible to determine where the cursor is located within an <input type='text'> element using JavaScript? I'd like to write a snippet of code that will move to the focus to the next text box when the user has pressed the left arrow key and the cursor location has hit the text box's maxLength. Likewise I'd like the focus to move to the previous text box when the user has pressed the right arrow key (or...
1
8458
by: Vexander | last post by:
Hi I am trying to right a script that closes a popup and then refreshes the pener to specific URL If have this that works form me <script type="text/javascript"> window.opener.location.href = 'http://localhost/fmsuite/Sales/Document.asp? docNumber=' + <%=Request.QueryString("docNumber")%>; window.opener.focus(); self.close() </script>
0
8828
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
9537
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
9367
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
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
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
6795
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
6073
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
4599
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...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.