473,624 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remove datagrid col at runtime?

I'm missing something. I'm trying to remove a column in a gridlist using the
following syntax:

grdList.Columns .Remove(grdList .Columns(0))

All this does is screw up the formatting in the table. Column is still
there.

Chip
Nov 18 '05 #1
1 1765
Figured it out. It works if you remove the column BEFORE you bind the data.
"Chip" <ch**@intradata .com> wrote in message
news:O2******** ******@TK2MSFTN GP09.phx.gbl...
I'm missing something. I'm trying to remove a column in a gridlist using the following syntax:

grdList.Columns .Remove(grdList .Columns(0))

All this does is screw up the formatting in the table. Column is still
there.

Chip

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2457
by: Rameshika | last post by:
Hi All How can I select a particular row in a datagrid.Where when the user double clicks the data in that row should appear in the corresponding text boxes in runtime And how can the user insert,delete and edit fields in a datagrid at runtime Please be kind enough to help me Thanks Rameshika
0
917
by: Tim Cowan | last post by:
Hi I was wondering if there is a way to remove the DataGrid width at runtime. I want it to size itself dynamically at runtime according to the data in it. It is the equivalent of setting the width property to blank in design view. Does anyone know how to do this? Also how can I remove a style at runtime? (Same sort of issue for <TD> widths) Thanks
5
2271
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. AC
2
5851
by: Steve Pierce | last post by:
I am having some issues with a runtime dropdownlist in a datagrid. The issue is that I cannot get ViewState to fill the selected index of a runtime dropdown properly on postback. I do not want to use template columns as they seem to be a little difficult to create at runtime. Any assistance would be very greatly appreciated. private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if...
4
1568
by: gh | last post by:
I create the columns for the asp.net datagrid at runtime and populates them. I have a template column for checkboxs I created at runtime as well. The user selects the product they want by checking the checkbox, next to it. In the submit button I loop through the datagrids items and if checked I will save the product to the cart. The problem is the grid has no item count when I try to loop through it. I loop through the rows of the...
0
1095
by: sathyan8294 | last post by:
i am using vb.net 2003.i am doing my project in vb.net windows application. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like name age rollno city ramu 22 68 chennai rajesh 23 70 cbe kamal ...
1
2063
navanova
by: navanova | last post by:
I am doing my project in vb.net windows application and SQL Server 2000. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like Name Age City/Town Roger 22 Wisconsin Stive 23 Ohio George 21 ...
4
4855
by: madho | last post by:
I am doing my project in vb.net windows application and SQL Server 2000. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like Name Age City/Town Roger 22 Wisconsin Stive 23 Ohio George 21 Saltlake Anthony 25 Nevada here Name,Age,City/Town are field names.Now i want to remove selected row permanently from sql database through...
1
1330
by: madho | last post by:
I am doing my project in vb.net windows application and SQL Server 2000. how do i remove selected row permanently from sql database through datagrid in vb.net windows form during runtime. for example, values are in datagrid like Name Age City/Town Roger 22 Wisconsin Stive 23 Ohio George 21 Saltlake Anthony 25 Nevada here Name,Age,City/Town are field names.Now i want to remove selected row permanently from sql database through...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8475
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7159
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.