PC Review


Reply
Thread Tools Rate Thread

DataGrid Key Processing Comes Unhinged

 
 
Gene Hubert
Guest
Posts: n/a
 
      17th Aug 2004
I'm trying to implement a "floating textbox" in a datagrid and seeing
some odd results.

In my override for DataGridTextBoxColumn.Edit, I create a custom
textbox that inherits from Textbox. I don't call edit for the base
class. I set the CustomTextBox.Parent to
Me.DataGridTableStyle.DataGrid.Parent. The "parent" is a panel that
the datagrid lives on. This seems to allow the CustomTextBox to
capture all the normal edit keys without having them picked up by the
datagrid.

The problem comes when I'm done editing with the custom text box. I
handle this in the Leave event for the custom text box. I've tried
setting the parent to nothing and also disposing of the custom
textbox. What I'm seeing is that all key processing for the datagrid
seems to be disabled from that point onward. I'm overriding
ProcessCmdKey for the datagrid and I don't get any keys picked up
there once I'm done editing in the custom textbox.

I've spent a long time trying to get this to work and would greatly
appreciate any help. I've got the floating textbox example from
Syncfusion but it does not do what I need.

Thanks Much,
Gene H.
 
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
MVVM: Single datagrid row selection when a datagrid contains anotherdatagrid in side RowDetailsTemplate Sunita@.NET Microsoft C# .NET 0 12th Nov 2010 09:03 AM
Disable Button During Processing & Re-Enable After Processing? Donald A. Fisher Microsoft VB .NET 4 15th Dec 2007 05:08 AM
VBA Textrange Processing: Need help in processing multiple ranges david.f.jenkins@usa.net Microsoft Powerpoint 9 10th May 2005 12:43 AM
conditional processing inside a datagrid? sean Microsoft ADO .NET 3 26th Jun 2004 03:57 AM
Added CheckBox to a DataGrid Doesn't work with DataGrid.Enabled=False Amar Microsoft ASP .NET 0 6th Apr 2004 11:14 AM


Features
 

Advertising
 

Newsgroups
 


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