DataGrid -- Hide Add New Row -- DataView AllowNew

E

ehdoty

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
 
I

Ilya Tumanov [MS]

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/microsoft.public.dotnet.framework.compactframework?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).
 
E

ehdoty

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top