PC Review


Reply
Thread Tools Rate Thread

Datagrid annoyance

 
 
zdrakec
Guest
Posts: n/a
 
      3rd Aug 2005
Hello all:

This is a new one on me...

I have a datagrid, bound to a disconnected datatable (actually a
dataview flaked off of that table), to which my user is able to add new
records.
1) When I click on the * for a new row, it takes a long time for the
new row to appear.
2) Any value I enter into any column gets changed back to DBNull as
soon as I click or tab off of that column.

I have created many an editable datagrid, in exactly the same manner as
I am doing now, but have never had this problem, and after much poking
about I must admit I have no idea what the hell is going on.

The columns are defined as readonly=false both at the datatable level
and at the gridcolumnstyle level. The grid itself has readonly=false. I
explicitly set AllowEdit and AllowNew to true for the dataview.
The dataview sees that I'm trying to add a row at runtime, but of
course, the various data items contain dbnull when I am looking at it
at debug time.

Ideas?

Thanks much,
zdrakec

 
Reply With Quote
 
 
 
 
zdrakec
Guest
Posts: n/a
 
      3rd Aug 2005
Sorry, I just fixed it...naturally I thought of one more thing after,
not before, I posted...
I have some labels also bound to the dataview (text property), and one
of the fields is a date field, which I am formatting by adding a
handler to the databindings("text").format event. This handler goes:

e.Value = CType(e.Value, DateTime).ToString("MM/dd/yyyy")

which was causing a problem when the row was a new row. I have changed
it to:

If dataview.Item(datagrid.CurrentCell.RowNumber).IsEdit Then Exit Sub
e.Value = CType(e.Value, DateTime).ToString("MM/dd/yyyy")

and everything appears to be all better now.

Thanks,
zdrakec

 
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
OE6 IE7 annoyance Frank FL Windows XP General 1 21st Oct 2007 08:35 PM
XML Annoyance plank@plank.com Microsoft C# .NET 4 18th Dec 2006 02:30 PM
Annoyance =?Utf-8?B?Wnl0aCBQcm90bw==?= Microsoft Access 2 21st Mar 2006 09:45 PM
Another annoyance CGB Windows XP New Users 8 30th Mar 2005 04:20 PM
Annoyance wee Microsoft Access 5 14th Dec 2004 06:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:15 PM.