PC Review


Reply
Thread Tools Rate Thread

Datagrid not responding to events

 
 
=?Utf-8?B?RWRC?=
Guest
Posts: n/a
 
      22nd Oct 2004
I have a datagrid named grdSubClients

I have all but one column set as read only, and I'm trying to trap events
when the user enters data into the one editable column. I have formatted the
grid using column styles, but turning that off had no positive effect.

The issue is the following events seem like what I would want

Private Sub grdSubClients_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles grdSubClients.TextChanged

or

Private Sub grdSubClients_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles grdSubClients.KeyPress


However, no code that I put inside these subs gets hit when the user enters
data in the column.

I do get a hit on this event:

Private Sub grdSubClients_CurrentCellChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles grdSubClients.CurrentCellChanged

But it is of no use since it fires when it lands on the new cell and I don't
have any way of deriving the cell that they came from.

As a side note, the datagrid has been a huge source of frustration for me
and my team. I used a third party grid for my VB6 apps that was SO EASY. I
know that this grid can do all the things I need it to do (or at least I'm
pretty sure most), but the documentation is so buried and examples so hard to
find. I would buy a book that focused on the expert use of VB.Net controls,
especially the grid, in an instant. Hint hint.
 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      22nd Oct 2004
Hi,

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q773q

VB.Net version of code
http://www.onteorasoftware.com/downl...validation.zip

Ken
-----------------------
"EdB" <(E-Mail Removed)> wrote in message
news:EE5C34B2-D1AA-4BAD-B82D-(E-Mail Removed)...
I have a datagrid named grdSubClients

I have all but one column set as read only, and I'm trying to trap events
when the user enters data into the one editable column. I have formatted
the
grid using column styles, but turning that off had no positive effect.

The issue is the following events seem like what I would want

Private Sub grdSubClients_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles grdSubClients.TextChanged

or

Private Sub grdSubClients_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles grdSubClients.KeyPress


However, no code that I put inside these subs gets hit when the user enters
data in the column.

I do get a hit on this event:

Private Sub grdSubClients_CurrentCellChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles grdSubClients.CurrentCellChanged

But it is of no use since it fires when it lands on the new cell and I don't
have any way of deriving the cell that they came from.

As a side note, the datagrid has been a huge source of frustration for me
and my team. I used a third party grid for my VB6 apps that was SO EASY. I
know that this grid can do all the things I need it to do (or at least I'm
pretty sure most), but the documentation is so buried and examples so hard
to
find. I would buy a book that focused on the expert use of VB.Net controls,
especially the grid, in an instant. Hint hint.


 
Reply With Quote
 
=?Utf-8?B?RWRC?=
Guest
Posts: n/a
 
      22nd Oct 2004
You are the man!

"Ken Tucker [MVP]" wrote:

> Hi,
>
> http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q773q
>
> VB.Net version of code
> http://www.onteorasoftware.com/downl...validation.zip
>
> Ken
> -----------------------
> "EdB" <(E-Mail Removed)> wrote in message
> news:EE5C34B2-D1AA-4BAD-B82D-(E-Mail Removed)...
> I have a datagrid named grdSubClients
>
> I have all but one column set as read only, and I'm trying to trap events
> when the user enters data into the one editable column. I have formatted
> the
> grid using column styles, but turning that off had no positive effect.
>
> The issue is the following events seem like what I would want
>
> Private Sub grdSubClients_TextChanged(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles grdSubClients.TextChanged
>
> or
>
> Private Sub grdSubClients_KeyPress(ByVal sender As Object, ByVal e As
> System.Windows.Forms.KeyPressEventArgs) Handles grdSubClients.KeyPress
>
>
> However, no code that I put inside these subs gets hit when the user enters
> data in the column.
>
> I do get a hit on this event:
>
> Private Sub grdSubClients_CurrentCellChanged(ByVal sender As Object,
> ByVal e As System.EventArgs) Handles grdSubClients.CurrentCellChanged
>
> But it is of no use since it fires when it lands on the new cell and I don't
> have any way of deriving the cell that they came from.
>
> As a side note, the datagrid has been a huge source of frustration for me
> and my team. I used a third party grid for my VB6 apps that was SO EASY. I
> know that this grid can do all the things I need it to do (or at least I'm
> pretty sure most), but the documentation is so buried and examples so hard
> to
> find. I would buy a book that focused on the expert use of VB.Net controls,
> especially the grid, in an instant. Hint hint.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control responding to mouse events while disabled? joecool1969@live.com Microsoft C# .NET 6 19th Mar 2009 02:18 AM
Help -- Microsoft.mshtml events stop responding... celoftis Microsoft Dot NET Framework 1 11th Sep 2007 01:00 AM
Help! - Responding to FaxCOMEXLIb Events in VB.Net =?Utf-8?B?a21jbmV0?= Microsoft Dot NET 0 12th May 2005 01:31 AM
Building controls at runtime and responding to their events Eric Sabine Microsoft VB .NET 3 3rd May 2004 07:59 PM
Responding to cell events in Excel Angus Comber Microsoft Excel Programming 1 4th Nov 2003 12:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:04 AM.