Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - CommandField ShowInsertButton

 
Thread Tools Search this Thread
Old 04-05-2007, 11:19 PM   #1
Default CommandField ShowInsertButton


I would like to be able to turn off (ie, set to false) the ShowInsertButton
option from my code for various users. I can't figure out how to do that.
Can someone please educate me? I am using VB.net.




BJ Stigall
  Reply With Quote
Old 04-06-2007, 01:00 PM   #2
=?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
 
Posts: n/a
Default RE: CommandField ShowInsertButton
Howdy,

It's quite simple:

CommandField cf = (CommandField) gridView.Columns[commandColumnIndex];
cf.ShowInsertButton = false; // or true
// bind the data
gridView.DataSource = whateever;
gridView.dataBind();

Please remember, once you bound the data and you change insert (or any
column button) visibility, you have to rebind the data again.

Hope this helps
--
Milosz


"BJ Stigall" wrote:

> I would like to be able to turn off (ie, set to false) the ShowInsertButton
> option from my code for various users. I can't figure out how to do that.
> Can someone please educate me? I am using VB.net.
>
>
>



=?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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