Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datagrid not shown?

Reply
Thread Tools

Datagrid not shown?

 
 
WouterWeb.nl
Guest
Posts: n/a
 
      01-27-2004
Hi there!

I've created a 'simple' databgrid with the WebMatrix, but it will not turn
up in the internet explorer... What's wrong?

Here is the code:

<%@ Page Language="VB" %>
<%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI"
Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral,
PublicKeyToken=6f763c9966660626" %>
<script runat="server">

' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<p>
<wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server"
DeleteCommand="" ConnectionString="server='(local)';
trusted_connection=true; database='wouterweb'" SelectCommand="SELECT * FROM
[gastenboek]" UpdateCommand=""></wmx:SqlDataSourceControl>
<aspataGrid id="DataGrid1" runat="server" BorderStyle="None"
BorderWidth="1px" CellPadding="3" BackColor="White" AllowPaging="True"
AllowSorting="True" BorderColor="#999999" DataSource="<%#
SqlDataSourceControl1 %>" GridLines="Horizontal" AllowCustomPaging="True"
AutoGenerateColumns="False">
<FooterStyle forecolor="Black"
backcolor="#CCCCCC"></FooterStyle>
<HeaderStyle font-bold="True" font-strikeout="True"
forecolor="White" backcolor="#000084"></HeaderStyle>
<PagerStyle horizontalalign="Center" forecolor="Black"
backcolor="#999999" mode="NumericPages"></PagerStyle>
<SelectedItemStyle font-bold="True" forecolor="White"
backcolor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle
backcolor="Gainsboro"></AlternatingItemStyle>
<ItemStyle forecolor="Black" backcolor="#EEEEEE"></ItemStyle>
<Columns>
<asp:BoundColumn DataField="id"
HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="naam"
HeaderText="Naam"></asp:BoundColumn>
<asp:BoundColumn DataField="email"
HeaderText="E-mail"></asp:BoundColumn>
<asp:BoundColumn DataField="bericht"
HeaderText="Bericht"></asp:BoundColumn>
</Columns>
</aspataGrid>
</p>
</body>
</html>

There are no ptoblem with the database...

Many thanks!


 
Reply With Quote
 
 
 
 
Michael
Guest
Posts: n/a
 
      01-27-2004
Perhaps you might trying doing this a more standard way rather than using
wmx controls. It is so much easier to look at this stuff from code.

http://aspnet.4guysfromrolla.com/articles/040502-1.aspx


"WouterWeb.nl" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi there!
>
> I've created a 'simple' databgrid with the WebMatrix, but it will not turn
> up in the internet explorer... What's wrong?
>
> Here is the code:
>
> <%@ Page Language="VB" %>
> <%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI"
> Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral,
> PublicKeyToken=6f763c9966660626" %>
> <script runat="server">
>
> ' Insert page code here
> '
>
> </script>
> <html>
> <head>
> </head>
> <body>
> <p>
> <wmx:SqlDataSourceControl id="SqlDataSourceControl1"

runat="server"
> DeleteCommand="" ConnectionString="server='(local)';
> trusted_connection=true; database='wouterweb'" SelectCommand="SELECT *

FROM
> [gastenboek]" UpdateCommand=""></wmx:SqlDataSourceControl>
> <aspataGrid id="DataGrid1" runat="server" BorderStyle="None"
> BorderWidth="1px" CellPadding="3" BackColor="White" AllowPaging="True"
> AllowSorting="True" BorderColor="#999999" DataSource="<%#
> SqlDataSourceControl1 %>" GridLines="Horizontal" AllowCustomPaging="True"
> AutoGenerateColumns="False">
> <FooterStyle forecolor="Black"
> backcolor="#CCCCCC"></FooterStyle>
> <HeaderStyle font-bold="True" font-strikeout="True"
> forecolor="White" backcolor="#000084"></HeaderStyle>
> <PagerStyle horizontalalign="Center" forecolor="Black"
> backcolor="#999999" mode="NumericPages"></PagerStyle>
> <SelectedItemStyle font-bold="True" forecolor="White"
> backcolor="#008A8C"></SelectedItemStyle>
> <AlternatingItemStyle
> backcolor="Gainsboro"></AlternatingItemStyle>
> <ItemStyle forecolor="Black" backcolor="#EEEEEE"></ItemStyle>
> <Columns>
> <asp:BoundColumn DataField="id"
> HeaderText="ID"></asp:BoundColumn>
> <asp:BoundColumn DataField="naam"
> HeaderText="Naam"></asp:BoundColumn>
> <asp:BoundColumn DataField="email"
> HeaderText="E-mail"></asp:BoundColumn>
> <asp:BoundColumn DataField="bericht"
> HeaderText="Bericht"></asp:BoundColumn>
> </Columns>
> </aspataGrid>
> </p>
> </body>
> </html>
>
> There are no ptoblem with the database...
>
> Many thanks!
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid ItemCommand event not firing if not first page =?Utf-8?B?ZGFuYw==?= ASP .Net 3 10-26-2005 05:24 PM
DataGrid SortCommand Event not fired on dynamically generated datagrid biru ASP .Net Web Controls 2 05-06-2005 01:38 PM
datagrid in datagrid BK Kim ASP .Net 1 03-02-2004 06:34 AM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments