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

Home Posts Topics Members FAQ

How to new added column in the fist column

ad
I added column to a DataTable, I want the column to be display in the first
place of a dataGrid.
The Column in dataGird is auto-generate.
How can I do that?
Nov 19 '05 #1
3 1017
Hi ad,

I don't believe there is a way to insert a column into a specific place
in the DataTable. If for some reason you are not able to set the order
of the DataGrid, the other option would be to change the order of the
columns retrieved via the query you are using to retrieve the data.

Hope this helps.

Tod Birdsall, MCSD for .Net
http://tod1d.blogspot.com

Help me get free Sony PSP and get one for yourself:
http://tinyurl.com/8n4hg

Nov 19 '05 #2
Don't use autogenerate and you will see how much more control you have.

Eliyahu

"ad" <ad@wfes.tcc.ed u.tw> wrote in message
news:uu******** ******@tk2msftn gp13.phx.gbl...
I added column to a DataTable, I want the column to be display in the first place of a dataGrid.
The Column in dataGird is auto-generate.
How can I do that?

Nov 19 '05 #3
Hi
You can try with
<asp:DataGrid ID="ItemsGrid" Runat="Server" CssClass="label ">

<Columns>

<asp:TemplateCo lumn HeaderText="Sel ect">

<ItemTemplate >

<asp:CheckBox ID="SelectCheck Box" Runat="Server" Checked="false" />

</ItemTemplate>

</asp:TemplateCol umn>

</Columns>

</asp:DataGrid>

Alex.

"ad" <ad@wfes.tcc.ed u.tw> wrote in message
news:uu******** ******@tk2msftn gp13.phx.gbl...
I added column to a DataTable, I want the column to be display in the
first
place of a dataGrid.
The Column in dataGird is auto-generate.
How can I do that?

Nov 19 '05 #4

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

Similar topics

2
1833
by: kindermaxiz | last post by:
hi there i have a mysql table and i want the user to add columns using a php interface and then display the table with the newly added column. I was thinking about putting all the columns names in a special table but there must be another more efficient way. as an example this is my query to display the table: $result = mysql_query("select * from news"); while($r=mysql_fetch_array($result))
8
7904
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the header of the datagrid in the "ItemDataBound" method of the grid. However, once, they are added in the grid, i seem to lose the event handler for the same control. Is there anyone who has tried this before and knows why this is hapenning ??
2
281
by: Rod | last post by:
I have a dataset which originally came from an Access table. I then add a column using code to the table in the dataset and fill it with data. (About 1000 records) . The column is not in the original Access table. all works fine except when I come to update the Access table (using the data adapter created by the wizard) it takes 40 seconds or more.
0
249
by: Amar | last post by:
I have created a Template Column and Added to a Datagrid, which contains a checkBox. The column is not Binded to any column of the Dataset, but is an extra one so i can retrieve on Save Button which rows are selected and make the necessary work. The problem is that my page has 3 states. The 1 one is when form is first loaded. When i click the Save button the Page goes to state 2 and the DataGrid must become Enabled = false, in order to ask...
3
1545
by: finleeds | last post by:
hi all I m using the visual studio designer to create 1 Dataset with 1 table with 3 columns : Id, Name, Birthday. Once this done, still with the designer, I m creating a datagridview and choose my dataset as DataSource. magic : the columns appear in the datagridview.
0
939
by: SWIL | last post by:
Hi, I made my own datacolumn Class which inherits from Data.DataColumn. To this class I have added 2 properties. To add datacolumn created through my new class I have to call.. DataSet.Table.Column.Add method which is a part of datacolumncollection , where the defined data column type is Data.DataColumn and not my custom column. Thus I have no method to access my datacolumn properties through dataset.
5
4709
by: =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= | last post by:
Hi, I have a strange issue occurring with LinkButtons that are dynamically added to each (data) row of my DataGrid on that grid's ItemDataBound event. Each LinkButton is assigned its own event handler to deal with the Command event, but for some reason I can get this to work in a C# project but not in a newly created VB.NET one. The relevant VB.NET is as follows:
4
11002
by: Craig Buchanan | last post by:
I dynamically add data-bound templates to a gridview in my ascx control. while this works correctly when the gridview is databound to the datatable, i'm having issues on postback. i would like to iterate thru the gridview's rows, examine the databound controls, then perform a database action. for some reason, i can't find the controls. i have a two templates: one that uses a label the other uses a textbox to display data. when the...
7
6651
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe Stagner)
0
8851
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...
1
8525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7356
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...
1
6179
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
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
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
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
2
1737
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.