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

How to get datagrid cell value while typing in it?

Hi all,
I have a datagrid and one specific column is editable. I want while i am typing in one of the cells of this column when i press a Function key (Example F7) to get what i have write. Till now i get an empty string because the cell is empty for the datagrid cause the cellendedit has not fired. I tried the ProcessCmdKey event to catch the F7 and still i get the empty string. For example i write the word Marl in the cell and then i press F7. I want to get Marl. Is there a way to get this value?

Thanks.
Nov 22 '10 #1

✓ answered by James Roy

Hi guys,

I found something that solved my problem, I hope it is helpfull for u too.
I used the code below

datagridview.editingcontrol.tostring.substring(dat agridview.editingcontrol.tostring.indexof(":") + 1)

and that code return the string i wanted to get.

1 2527
Hi guys,

I found something that solved my problem, I hope it is helpfull for u too.
I used the code below

datagridview.editingcontrol.tostring.substring(dat agridview.editingcontrol.tostring.indexof(":") + 1)

and that code return the string i wanted to get.
Nov 29 '10 #2

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

Similar topics

3
by: Dav | last post by:
I have a Winform with a derived datagrid and a button that adds a row to the datagrid in its Click event. The button has a shortcut text "&New Row". When I enter a value in a datagrid cell and...
1
by: esroinc | last post by:
By creating an event that fires when I click on a cell, I am able to obtain the coordinates of that cell, but I have not been able to get the data or value in that cell. cellCoordinates =...
2
by: Robert | last post by:
I'm sure this is a fairly basic question, but I've been looking all over the web for days for suggestions on how to do this. I've got a datagrid that's bound to a dataset on my form. It includes...
1
by: Allen Hubatka | last post by:
Is it possible to change the data grid cell value from the client side script? The cell value I am talking is not a template column. I am using .Net Framework 1.1, Vb.Net, IE5.5+ and Java script....
0
by: keys4worship | last post by:
I have a datagrid that contains among other things an SSN and a button. I have added an onclick attribute to the button that works with vbscript to query information on 3270 Pcomm emulator. The...
3
by: Richard | last post by:
I'm trying to change a value of a cell based on another before the grid is displayed. I'm using the ItemDataBound event like this for a simple test: Select Case e.Item.ItemType Case...
0
by: Antonio | last post by:
Hello, everyone. Is there a way to not display a certain value in a datagrid cell? I have a datagrid for subscriptions and ebooks and if there isn't an e-book listed, the value from the...
2
by: harry | last post by:
Hi all, I have a datagrid (language C#) populated using a stored procedure. I want one of the column to display complete name instead of abbreviation. Can I change the display dynamically in the...
0
by: mvenkatesan | last post by:
Hi I am using c# 2005 (windows appl) how to get value on selected row in datagrid? many thanks Venky
0
by: mvenkatesan | last post by:
Hi how to get selected cell value in datagrid? I am using c# 2005 (windows appl) Pl. help Advance thanks Venky
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.