473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to change ShowSelectButton in a gridview programmatically? ...followup.

In the following post (which I cannot reply to...):

how to change ShowSelectButton in a gridview programmatically?

http://bytes.com/topic/visual-basic-...ogrammatically

Expand|Select|Wrap|Line Numbers
  1. GridView1.Columns.Item(0)
They reference the
Expand|Select|Wrap|Line Numbers
  1. Item
array of the
Expand|Select|Wrap|Line Numbers
  1. Columns
collection... as far as I can tell, that doesn't exist?...

GridView.Columns Property
http://msdn.microsoft.com/en-us/libr...w.columns.aspx

G

PS Note to moderators, if you want to merge this followup with the previous question, pls feel free... thanks.
Sep 17 '13 #1
3 1517
Rabbit
12,516 Expert Mod 8TB
It's inherited from the Collections object. http://msdn.microsoft.com/en-us/library/ms132435.aspx
Sep 17 '13 #2
If I add the following to my code:

Expand|Select|Wrap|Line Numbers
  1. GridView1.Columns.Items(6).ShowEditButton = false;
Then I receive the following error:

Server Error in '/someapp' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'System.Web.UI.WebControls.DataControlFieldCollect ion' does not contain a definition for 'Items' and no extension method 'Items' accepting a first argument of type 'System.Web.UI.WebControls.DataControlFieldCollect ion' could be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 420: GridView1.Columns.Items(6).ShowEditButton = false;
Sep 18 '13 #3
Rabbit
12,516 Expert Mod 8TB
Try it without the s. I.E., .Item(6)
Sep 18 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Phil Hey | last post by:
Hi, I can change the icon for a folder by right clicking on it > going to the customize tab > and selecting Choose Picture. Does anyone know if it is possible to do this programmatically...
5
by: Brian McClellan | last post by:
Just wondering if anyone has a simple example of creating a gridview completely programmatically, i'm not doing anything terribly sophisticated. When creating the gridview declaratively evertying...
0
by: Mike P | last post by:
I am using a GridView with 3 SelectParameters 2 of which are ControlParameters, but the third of my SelectParameter values is derived through my code rather than a QueryString, Control etc, so I...
1
by: Mike Collins | last post by:
I've seen how to set up a gridview at design time, but I believe I need to do this and run time and cannot figure it out. I am sending a concatenated list of IDs that is gets bigger each time a...
1
by: gary.comstock | last post by:
We have a non asp web page that contains a hyperlink which opens an iframe. The iframe is hidden until the hyperlink is selected then javascript toggles the visibility to 'visible'. Inside the...
2
by: =?Utf-8?B?Sm9hbyBSZWdv?= | last post by:
Hello, C# and asp.net 2.0 I have a <asp:GridViewthat I create dinamically. Now I need to add a ButtonColumn to the GridView. I have this code: ButtonColumn btColumn = new ButtonColumn();
2
by: michel | last post by:
Hi, there is a gridview with a Commandfield. I would like to set the 'ShowEditButton' on 'true' programmatically. I tried two ways without succes: with "'Dim cf As CommandField with "'Dim cf...
4
by: Tomasz | last post by:
Hello Developers, Here is interesting problem I just came across: how do I wire a GridView control programmatically? Here is my sample code using Object Data Source: protected void...
4
by: trint | last post by:
I have this in my aspx file (using c#): <asp:ImageButton ID="Imagebutton1" runat="server" alt='<%# Eval ( "name" ) %>' CommandName="select" ImageUrl='<%# Eval ( "image_file_name",...
1
by: dhaneshrs | last post by:
I have a small code that shows inactive and active users from the ms access DB. <%@ Page Language="VB" MasterPageFile="~/MasterPageAdmin.master" Title="Welcome" %> <%@ Import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.