Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Select datagrid item programatically in ASP.NET

Reply
Thread Tools

Select datagrid item programatically in ASP.NET

 
 
Joseph T.S.Lim
Guest
Posts: n/a
 
      07-01-2003
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.


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      07-01-2003
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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
select listbox item programatically not working? JamesB ASP .Net Web Controls 8 12-15-2007 02:45 AM
select box - using refresh to select same item twice entfred@hotmail.com Javascript 2 07-25-2006 11:54 PM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM
Change style of a single row of the item list of datagrid, based on a field value of current item... QUASAR ASP .Net Datagrid Control 6 01-17-2004 07:46 PM
How do I select item in <SELECT> K. Lobe ASP General 3 07-02-2003 06:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57