OK. Thanks for your post. I took a look at it but unless i am missing
something ( and I probably am ), in order to find the row you need to sort
by index. Fine, but once you sort the position changes and hence you dont
know where the real position is on the datagrid which is what I need.
--
Regards - One Handed Man
Author : Fish .NET & Keep .NET
==============================
"Roy Osherove" <(E-Mail Removed)> wrote in message
news:eSp%(E-Mail Removed)...
> Perhaps this might help - look at lesson 4 in the bottom:
> http://weblogs.asp.net/rosherove/posts/9088.aspx
>
> --
> Regards,
>
> Roy Osherove
> http://www.iserializable.com
> ---------------------------------------------
>
> "One Handed Man" <terry_burnsREMOVE%FOR%NO%(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> > Sorry Bill, maybe I didnt make myself clear on this one.
> >
> > Assume you programatically create a new row by adding it to the table.
> When
> > the table is refilled by the dataadapter, the new row takes a new
position
> > because it is being sorted by the persons name in th SQL select command.
> > (SELECT * FROM People ORDER By FirstName ).
> >
> > Having found and preserved the new ID number using executescalar with a
> > MAX(ID) in the select statement, I can find the row created using the
> > Table.Find( ID ) method as I have a PKey on this table on column zero.
> > However I dont know what row position this is in the table so I dont
know
> > how to select the newly created and corresponding row in the grid.
> >
> > Hope you can shed some light on a way forward . . ., to me this seems
like
> > an oversight, Ican locate the underying row using Grid.CurrentRowIndex
but
> > cant datagrid.Select(row) because I dont know it .... see the dialema ?
> >
> >
> >
> > --
> > Regards - One Handed Man
> >
> > Author : Fish .NET & Keep .NET
> >
> > ==============================
> > "William Ryan" <(E-Mail Removed)> wrote in message
> > news:013401c36a77$ab386c40$(E-Mail Removed)...
> > > The datagrid has a CurrentCell property that gives you
> > > both row and column information. As long as you don't
> > > sort the grid, you can just check the currectcell and
> > > you'll have the row index.
> > >
> > > If you are sorting though, let me know and we can take a
> > > different approach.
> > >
> > > Good Luck,
> > >
> > > Bill
> > > >-----Original Message-----
> > > >In my design I have a table bound to a datagrid. I want
> > > to select the
> > > >datagrid row which corresponds with a row in the bound
> > > table.
> > > >
> > > >Using a primary key is not an option because records get
> > > deleted leaving
> > > >holes and the data is not sorted by PK anyway.
> > > >
> > > >Does anyone know how to do this without reading all the
> > > tableRows to find
> > > >the position ?
> > > >
> > > >
> > > >TIA
> > > >
> > > >--
> > > >Regards - One Handed Man
> > > >
> > > >Author : Fish .NET & Keep .NET
> > > >
> > > >==============================
> > > >
> > > >
> > > >.
> > > >
> >
> >
>
>