PC Review


Reply
Thread Tools Rate Thread

DataView AllowNew

 
 
=?Utf-8?B?c3ViVA==?=
Guest
Posts: n/a
 
      27th Aug 2004
I have the AllowNew set to true is a DataView bound DataGrid. When i leave
the Datagrid and return to the same Grid by clicking directly on the last
row, (the *New Row) the grid sometimes removes the asterisk and the row does
not function properly.

I tried a dataGrid.Enter event to check if the row isNew, but it doesnt
detect it as a new row.

any thoughts?

 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      28th Aug 2004
Subt,

By me it does not function when the underlaying datasource is empty, I do
not know why they made it this way, however for me it gives only errors and
do not know a workaround, other than completly set it off by addnew = false
and create some buttons.

Maybe you get a better answer, than I have it as well.

Cor


 
Reply With Quote
 
=?Utf-8?B?c3ViVA==?=
Guest
Posts: n/a
 
      29th Aug 2004
my workaround:
instead i set allownew= false on default.
used Currentcell Changed event,
if cm.position=cm.count-1 then
set allownew=true
dataview.addnew()
....
then set allownew= false.

this seems to work so far. autoadds row without the asterisk row. not
gettting errors yet when i reenter grid.







"Cor Ligthert" wrote:

> Subt,
>
> By me it does not function when the underlaying datasource is empty, I do
> not know why they made it this way, however for me it gives only errors and
> do not know a workaround, other than completly set it off by addnew = false
> and create some buttons.
>
> Maybe you get a better answer, than I have it as well.
>
> Cor
>
>
>

 
Reply With Quote
 
=?Utf-8?B?c3ViVA==?=
Guest
Posts: n/a
 
      30th Aug 2004
sorry, problem is same. Problem seems to be that after Update, the Currency
Manager position is fixed at 0. the CurrencyManager.count is accurate but the
position will not update with changed row. It will only start working again
if the position 0 row is clicked first.
any idea why this is so?





"Cor Ligthert" wrote:

> Subt,
>
> By me it does not function when the underlaying datasource is empty, I do
> not know why they made it this way, however for me it gives only errors and
> do not know a workaround, other than completly set it off by addnew = false
> and create some buttons.
>
> Maybe you get a better answer, than I have it as well.
>
> Cor
>
>
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      30th Aug 2004
Subt,

I thought I had added a message to yours however I did not, I was suprised
because I thought the -1 and I use de datarow or dataview count = 0.

However for the rest I use the almost same routines like you did for this.

I have not found a good solution yet.

Cor


 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      30th Aug 2004
Subt,

That is the pain I have as well.

So therefore I have for this kind of problems changed the dataview.allownew
to false and since a while when I add a row make it temporary allownew =
true.

And just toolbarbuttons on the form for New, Deleting, Adding and update.

As I understand what you are using now than you have probably a datagrid
with pencil and a row. However that row in the datagrid is referencing to a
null datarow.

Cor

> using this method i get the following error after i do Da.Update and click

on
> grid:
> "The ListManager's position must be equal to rowNum."
>
> dont know why. search reveals others with similar problem. possibly

related
> to GridcolumnStyle ovverride?
>
>



 
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
DataGrid -- Hide Add New Row -- DataView AllowNew ehdoty@gmail.com Microsoft Dot NET Compact Framework 3 7th Mar 2007 08:17 PM
DataGrid AllowNew = False Doug Bell Microsoft VB .NET 3 8th Dec 2004 03:51 AM
2 Datagrids AllowNew =?Utf-8?B?RGF2ZQ==?= Microsoft Dot NET Framework Forms 0 5th Nov 2004 06:45 AM
DataGrid on DataViewManager, no AllowNew? Walt Borders Microsoft Dot NET Framework Forms 1 29th Jun 2004 04:38 PM
Child Table DataView.AllowNew problem Juergen Bronn Microsoft Dot NET Framework Forms 0 23rd Jul 2003 07:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 PM.