Ask a Question related to ASP.NET General, Design and Development.
-
J. Babe #1
ASP.NET data grid
I'm building an ASP.NET application that stores/retrieves data using
MS-Access. I have a datagrid that I want to populate with a datatable.
However, I only want to display certain columns. I'm wondering how I
can manually assign specific columns from the datatable, to specific
columns in the data grid.
Thanks.
J. Babe Guest
-
trying to create data grid on the fly, with templated columns, and then updating all rows in the grid
Hi, Please help, I'm trying to create data grid on the fly, with templated columns, for editing, and then updating all rows in the grid on one... -
Problem with Data Grid reading dynamic data
I have created a website that uses datagrids to read data from an asp page. It works great, and fills the datagrid perfectly but it does not work... -
How to display a set of data in a data grid when drivenby a combo box?
I am trying to build a page where the user can select a syle of food (i.e. chinese, italian etc) from a combo. I would then want the relevent... -
Drag and drop data between cells in a data grid
Check out this, dino has explained how to do drag and drop in datagrid http://msdn.microsoft.com/msdnmag/issues/04/01/CuttingEdge/default.aspx --... -
Display data from database in a scrollable data grid on an ASP Page
Hi All, I want to display data from database in a scrollable data grid on an ASP Page. I want to use it for entering data also. Should i have to... -
niceguy #2
Re: ASP.NET data grid
You can do this by adding a DataGridTableStyle item to the datagrid. See
online help for DataGridTableStyle and DataGridColumnStyle.
Hope it helps...
"J. Babe" <babe_jt@hotmail.com> wrote in message
news:8b32873e.0308040645.411fc0b8@posting.google.c om...> I'm building an ASP.NET application that stores/retrieves data using
> MS-Access. I have a datagrid that I want to populate with a datatable.
> However, I only want to display certain columns. I'm wondering how I
> can manually assign specific columns from the datatable, to specific
> columns in the data grid.
> Thanks.
niceguy Guest
-
J. Babe #3
Re: ASP.NET data grid
I was wondering if you have to add a reference to System.Windows.Forms
to use the DataGridStyle class in a web application?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
J. Babe Guest
-
William F. Robertson, Jr. #4
Re: ASP.NET data grid
No, System.Windows.Forms is only for desktop applications.
Only System.Web.UI.WebControls are valid controls for web apps.
bill
"J. Babe" <babe_jt@hotmail.com> wrote in message
news:#LmUZypWDHA.1632@TK2MSFTNGP11.phx.gbl...> I was wondering if you have to add a reference to System.Windows.Forms
> to use the DataGridStyle class in a web application?
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
William F. Robertson, Jr. Guest
-
David Wier #5
Re: ASP.NET data grid
Your best bet is to limit your query - -
Select Fname, Lname, Email from tablename
instead of Select * from TableName
However, no matter what your query - - you can use the AutoGeneratecolumns
property of the DataGrid:
AutoGeneratecolumns =False
Then, for each Field you need to use, use a boundcolumn tag (inside Column
tags) -- something like:
........AutoGenerateColumns="False"> '<--inside your DataGrid Tag
<columns>
<asp:BoundColumn DataField="product" HeaderText="Product"></asp:BoundColumn>
<asp:BoundColumn DataField="ProdID" HeaderText="ProductID"
ItemStyle-HorizontalAlign="Center"
HeaderStyle-HorizontalAlign="Center"></asp:BoundColumn>
<asp:BoundColumn DataField="Quantity" HeaderText="Quantity"
ItemStyle-HorizontalAlign="Center"
HeaderStyle-HorizontalAlign="Center"></asp:BoundColumn>
</columns>
David Wier
[url]http://aspnet101.com[/url]
[url]http://aspexpress.com[/url]
"J. Babe" <babe_jt@hotmail.com> wrote in message
news:8b32873e.0308040645.411fc0b8@posting.google.c om...> I'm building an ASP.NET application that stores/retrieves data using
> MS-Access. I have a datagrid that I want to populate with a datatable.
> However, I only want to display certain columns. I'm wondering how I
> can manually assign specific columns from the datatable, to specific
> columns in the data grid.
> Thanks.
David Wier Guest



Reply With Quote

