RE: Any possible way?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Maybe you should tell us what you are trying to achieve from a functional
business perspective rather than technical perspective, then we maybe able to
offer our advice as I am getting confused as to why you need to "mark"
records that have been deleted.

Cheers
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"TJ" wrote:

Hi,

Environment : VS.NET 2005/CF 2.0

DataGrid control is used for Pocket PC application.

Q: is there any way I can hide a row programatically in the datagrid?

The thing I want to achive is to mark deleted row somehow.
Well, I know that I can bind DataTable/DataView object into DataSource...
(I can get the deleted records by fetching RowState.Deleted)

However, I would like to do this with custom objects(custom array)...
Custom arrary objects is bound to datasource in datagrid...
If user clicks the row to delete, I would like to mark somehow...
If I remove it from underlying data strcture, there is no way of knowing,
which one has been deleted...

Well, possibly I can think of three approahces...

1. Hide row from the datagrid. I think this is the best solution I can think
of, as long as the I can keep the state of the underlying data structure..

2. I may be able to design a kind of View class that exposes only needed
data to datasource....I meant....something like DataView....However, it seems
that this approach somewhat more than what I need to do in this app...

3. It could be samething to #2,..I think I can maintain two arraylist to
keep track of current and deleted one...Seems not elegant approach, though...

If you know somehow to hide a row programatically in the datagrid,
please share your idea with us.

Thanks,

.



Relevant Pages

  • RE: Any possible way?
    ... I want to achive that when user deletes the record on the datagrid by ... The thing I want to achive is to mark deleted row somehow. ... as long as the I can keep the state of the underlying data structure.. ...
    (microsoft.public.dotnet.framework.compactframework)
  • DataGrid...Possible way?
    ... DataGrid control is used for Pocket PC application. ... Custom arrary objects is bound to datasource in datagrid... ... as long as the I can keep the state of the underlying data structure.. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: How to keep a DataGrid in sync with a DataSet when sorting
    ... > for the web version of the DataGrid. ... > As far as wanting to sort the DataSet, I am just looking for the ... > automatically sort the underlying data structure. ... > Module that creates a DataSet by using the Fill method to retrieve data ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Display results from a DataGrid in labels
    ... Sorry Mark, ... also appear in corresponding labels else on the form. ... >>I have a datagrid containing data from an xml file. ... > column that underlies the grid. ...
    (microsoft.public.data.ado)
  • Re: Assoicate a primary key with a checkbox inside a datagrid
    ... > Hi Mark, ... > In order to get parimary key value in a datagrid, ... >> checkbox and a string pulled from a database table. ...
    (microsoft.public.dotnet.framework.aspnet)