473,399 Members | 2,278 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,399 software developers and data experts.

Event on DataTable cell

Hi,

I have a datGrid which related to a DataTable.
i want to create a KeyDown evet on one of my table's cell, this is what i did:

dgtbc = dgtsPay.GridColumnStyles[2] as DataGridTextBoxColumn;
if(dgtbc != null)
{
dgtbc.TextBox.KeyDown += new
System.Windows.Forms.KeyEventHandler(this.payed_ce ll_KeyUp);
dgtbc.TextBox.KeyUp += new
System.Windows.Forms.KeyEventHandler(this.payed_ce ll_KeyDown);
}

i created each event, but when i'm on that specific cell, nothing happens,
the event is not called.

this cell represents a date that the user enters, the format of the date is
dd\mm\yy
i want to enter the "\" automaticly each time it suppose to be.

thanks,
Gidi.
Nov 17 '05 #1
1 1253
The event of the datagrid is processed by controls within the datagrid
(TextBox in this case), which means if ya want to be dealin with the keyup
and keydown event in another control, ya hav to wire the event to other
controls as well.
Nov 17 '05 #2

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

Similar topics

1
by: andrewcw | last post by:
With ASP.NET is appears the cells in a table can be edited by objTable.Rows(index)(ColName)="whatever" but qcLoaderTable.Rows(0)("IMAGE")="FAIL"; gives me this error....
0
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some...
2
by: Gidi | last post by:
hello i'm writing a C# windows application and i dataGrid which contains Kinds of Payment and one of the cells is a Payment Date witch the user is entering and i want that after entering 2 numbers...
6
by: Steve B. | last post by:
Is it good programming practice to call an event within an event? I'm I creating recursion somehow somewhere? Does an event (e.g. send, e) ever end? I'm sorry, I'm not sure I know what I mean,...
1
by: Anders | last post by:
Hi again, I have two classes Form1 and GenData. Form1 creates an instance of genData. genData populates a Datatable and then sends it to Form1 using the event seen below:. private void...
3
by: Brett Romero | last post by:
Is there a way to update data in a DataTable cell? I have column dates that are string type. I want to add another column to this table: dt.Columns.Add(new DataColumn("Datecolumn2",...
1
by: Daniel Jeffrey | last post by:
..Net 2.0 VStudio 2005 C# I know this is going to seem like a strange question, as even I am sure I have missed something - but I cant find it. I want a simple event on any of the objects...
5
by: SagarDoke | last post by:
hi all, i am using yui framework. in that i want to update or set datatable cell of selected row dynamically by different value. can anybody please tell me how to do that?
3
by: brendanmcdonagh | last post by:
Hi, I have a datatable being populated in a for each loop and it's working great. I'm now trying to eradicated duplicates, I have set productid as uniques and it throws an exception when another...
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: 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: 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
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...
0
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...
0
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,...
0
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...

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.