Answered the same one on buildingcontrols:
"One way is just to set the DataGrid's SelectedIndex property as you wish.
--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi
ASP.NET Forums Moderator,
www.asp.net
AspAlliance Columnist,
www.aspalliance.com
Email:
"
"Joseph T.S.Lim" <> wrote in message
news:...
> Hi all,
>
> I have a question on ASP.NET Datagrid.
> Here goes nothing :-
>
> I have a datagrid with a SELECTCOMMAND on the first column.
> Whenever i click on the first column, it will highlight the particular
> item.
> No problem with this. I want to know how do i select a datagrid
> item when i click on a button without clicking on the datagrid item.
>
> For example, when i click button A, the datagrid will select my desire
> row item
> highlight it. I want to achieve this on the Code behind, i don't want
> to
> use the __doPostBack("gridID:_ctl?_ctl?", ""). I able to select it
via
> the client script but i don't want.
>
>