473,407 Members | 2,315 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,407 software developers and data experts.

What does actual databinding of datagrid occurs?

I created datagrid with dynamically generated datacolumns and edit/delete
button columns.
Sometimes, I want to to hide first column from the database because it is a
primary key.

When I add the following code to any place in the source code, I realized
that it never gets to the following code:
this.DataGrid1.Columns[2].Visible = false;
*Columns[0] --> Edit button column
*Columns[1] --> Delete button column
*Columns[2]~Column[n] --> DataBound columns from database.

I know that Columns[2] supposes to have a primary key column. But when I
debug my code, I see that only columns[0] and columns[1] are available.

Can anyone tell me when the dynamic column binding actually happen and which
method to use?
Nov 16 '05 #1
1 932
Never mind...
I figured it out.

Thanks

"C.G. Oh" <co*@alphapointe.org> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
I created datagrid with dynamically generated datacolumns and edit/delete
button columns.
Sometimes, I want to to hide first column from the database because it is a primary key.

When I add the following code to any place in the source code, I realized
that it never gets to the following code:
this.DataGrid1.Columns[2].Visible = false;
*Columns[0] --> Edit button column
*Columns[1] --> Delete button column
*Columns[2]~Column[n] --> DataBound columns from database.

I know that Columns[2] supposes to have a primary key column. But when I
debug my code, I see that only columns[0] and columns[1] are available.

Can anyone tell me when the dynamic column binding actually happen and which method to use?

Nov 16 '05 #2

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

Similar topics

0
by: Stephan Steiner | last post by:
Hi I'm trying to temporarily suspend a databinding between a DataTable and a DataGrid. I create a CurrencyManager based on this.BindingContext and then call SuspendBinding() on the...
3
by: MajorTom | last post by:
Hello I need help. I have a datagrid that have a dataview as datasource. in the keyup event of one textbox I use dataview.rowfilter = some.text; when the condition of my rowfilter return...
9
by: Mike L | last post by:
I tried a sample of code in MSDN magazine, but now I'm stuck. What code has the best performance to populate a Data Grid with a SP? Below is the code I have, which might be completing the wrong...
1
by: oafyuf | last post by:
Hi, I'm trying to learn ASP.NET by doing a pilot project: I have a DataGrid which contains a nested DataList. I want to iterate through the SQLDataReader for the DataGrid and populate each...
3
by: Luis Esteban Valencia | last post by:
Hi, the following code displays a search result in a datagrid and is working without problems. But I think the way I have done is not correct especially databind(). could anyone help me to...
3
by: Stan | last post by:
I am looking for the best solution for this scenario: ASP.NET needs display an editable form with 20 textboxes. Data source is xml. Xml must be updated. if user clicks Update button on the form....
3
by: Tom McLaughlin | last post by:
I am new to vb.net and I am running into problems understanding DataBinding and its concept. The only examples I find are always talk about Web design, I only want to use this data on my...
1
by: fiaolle | last post by:
Hi The first set of source code is the class for a combobox in a grid, hopefully. In the second set of code we try to use the combobox class, but the grid is empty. I don't understand how this...
1
by: Wan | last post by:
Hi, I have a test project consists of two forms. The main form contains a datagrid and a button. On click of button I populate the datagrid with a ds.table(0) so far so good and on grid's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.