PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework DataGrid -- Hide Add New Row -- DataView AllowNew

Reply

DataGrid -- Hide Add New Row -- DataView AllowNew

 
Thread Tools Rate Thread
Old 05-03-2007, 05:40 PM   #1
ehdoty@gmail.com
Guest
 
Posts: n/a
Default DataGrid -- Hide Add New Row -- DataView AllowNew


I'm using a DataGrid control in a mobile application to display data
and would like to disable the automatically added "new row" at the
bottom of the grid.

I've done this with no problem on desktop applications by setting the
DataView's AllowNew property to false, but this doesn't seem to do
anything in cf applications. I have tried it on a few different
devices with different framework versions, but it doesn't seem to work
with any of them. I have tried setting AllowEdit and AllowDelete to
false, but that didn't do anything either.

Is this a bug? Or does anyone have a workaround?

Thanks,

Eric

  Reply With Quote
Old 06-03-2007, 01:42 AM   #2
Ilya Tumanov [MS]
Guest
 
Posts: n/a
Default Re: DataGrid -- Hide Add New Row -- DataView AllowNew

NETCF's DataGrid is read only so it does not have "automatically added new
row at the bottom".


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group...framework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

<ehdoty@gmail.com> wrote in message
news:1173116439.381123.231250@q40g2000cwq.googlegroups.com...
> I'm using a DataGrid control in a mobile application to display data
> and would like to disable the automatically added "new row" at the
> bottom of the grid.
>
> I've done this with no problem on desktop applications by setting the
> DataView's AllowNew property to false, but this doesn't seem to do
> anything in cf applications. I have tried it on a few different
> devices with different framework versions, but it doesn't seem to work
> with any of them. I have tried setting AllowEdit and AllowDelete to
> false, but that didn't do anything either.
>
> Is this a bug? Or does anyone have a workaround?
>
> Thanks,
>
> Eric
>



  Reply With Quote
Old 06-03-2007, 05:13 PM   #3
ehdoty@gmail.com
Guest
 
Posts: n/a
Default Re: DataGrid -- Hide Add New Row -- DataView AllowNew

Ah... for some reason I was thinking the extra gray space at the
bottom was a new row (it's been a while since I've looked at
datagrids).

Well, then what I would like to do, if possible, is get rid of this
empty space at the bottom of the datagrid that appears when the last
row is selected. When I have enough items to show a vertical
scrollbar, when I scroll down and and select the last row, it scrolls
down approximately the height of one more row and shows empty space
below it. I guess this is to show that it is the last row in the grid?
Is there any way around this? I would prefer to have it just show the
last item at the bottom of the grid and not show this empty space.

I've thought about overriding some of the drawing methods, but I'm not
sure where to go with that.

If this is not possible, I can live with it, but I was just wondering.

Thanks.


On Mar 5, 6:42 pm, "Ilya Tumanov [MS]" <ilya...@online.microsoft.com>
wrote:
> NETCF's DataGrid is read only so it does not have "automatically added new
> row at the bottom".
>
> --
> Best regards,
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go tohttp://groups-beta.google.com/group/microsoft.public.dotnet.framework...
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> <ehd...@gmail.com> wrote in message
>
> news:1173116439.381123.231250@q40g2000cwq.googlegroups.com...
>
> > I'm using a DataGrid control in a mobile application to display data
> > and would like to disable the automatically added "new row" at the
> > bottom of the grid.

>
> > I've done this with no problem on desktop applications by setting the
> > DataView's AllowNew property to false, but this doesn't seem to do
> > anything in cf applications. I have tried it on a few different
> > devices with different framework versions, but it doesn't seem to work
> > with any of them. I have tried setting AllowEdit and AllowDelete to
> > false, but that didn't do anything either.

>
> > Is this a bug? Or does anyone have a workaround?

>
> > Thanks,

>
> > Eric



  Reply With Quote
Old 07-03-2007, 08:17 PM   #4
Ilya Tumanov [MS]
Guest
 
Posts: n/a
Default Re: DataGrid -- Hide Add New Row -- DataView AllowNew

I'd say you should ignore it.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group...framework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

<ehdoty@gmail.com> wrote in message
news:1173201231.443810.101060@q40g2000cwq.googlegroups.com...
> Ah... for some reason I was thinking the extra gray space at the
> bottom was a new row (it's been a while since I've looked at
> datagrids).
>
> Well, then what I would like to do, if possible, is get rid of this
> empty space at the bottom of the datagrid that appears when the last
> row is selected. When I have enough items to show a vertical
> scrollbar, when I scroll down and and select the last row, it scrolls
> down approximately the height of one more row and shows empty space
> below it. I guess this is to show that it is the last row in the grid?
> Is there any way around this? I would prefer to have it just show the
> last item at the bottom of the grid and not show this empty space.
>
> I've thought about overriding some of the drawing methods, but I'm not
> sure where to go with that.
>
> If this is not possible, I can live with it, but I was just wondering.
>
> Thanks.
>
>
> On Mar 5, 6:42 pm, "Ilya Tumanov [MS]" <ilya...@online.microsoft.com>
> wrote:
>> NETCF's DataGrid is read only so it does not have "automatically added
>> new
>> row at the bottom".
>>
>> --
>> Best regards,
>>
>> Ilya
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> *** Want to find answers instantly? Here's how... ***
>>
>> 1. Go
>> tohttp://groups-beta.google.com/group/microsoft.public.dotnet.framework...
>> 2. Type your question in the text box near "Search this group" button.
>> 3. Hit "Search this group" button.
>> 4. Read answer(s).
>>
>> <ehd...@gmail.com> wrote in message
>>
>> news:1173116439.381123.231250@q40g2000cwq.googlegroups.com...
>>
>> > I'm using a DataGrid control in a mobile application to display data
>> > and would like to disable the automatically added "new row" at the
>> > bottom of the grid.

>>
>> > I've done this with no problem on desktop applications by setting the
>> > DataView's AllowNew property to false, but this doesn't seem to do
>> > anything in cf applications. I have tried it on a few different
>> > devices with different framework versions, but it doesn't seem to work
>> > with any of them. I have tried setting AllowEdit and AllowDelete to
>> > false, but that didn't do anything either.

>>
>> > Is this a bug? Or does anyone have a workaround?

>>
>> > Thanks,

>>
>> > Eric

>
>



  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off