J
Jeff
OS : winXP pro (sp2)
IDE: VS .NET 2003
This is my code for adding data to my datagrid (DataGrid1)
MySqlConnection conn = new
MySqlConnection(ConfigurationSettings.AppSettings["DB_Connection_string"]);
conn.Open();
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand("select Mem_id, Mem_Type,
Mem_Forename from Member", conn);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "member");
DataGrid1.DataSource = dataset;
DataGrid1.DataMember = "member";
DataGrid1.DataBind();
This is the datagrid code in HTML:
<aspataGrid
id="DataGrid1"
style="Z-INDEX: 106; LEFT: 136px; POSITION: absolute; TOP: 80px"
runat="server"
Width="736px"
Height="448px"
BorderColor="#999999"
BackColor="Transparent"
BorderStyle="Groove"
BorderWidth="1px"
CellPadding="3"
GridLines="Vertical"
AutoGenerateColumns="False">
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle Font-Size="Medium" HorizontalAlign="Left"
ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#000084"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Mem_id" HeaderText="ID"
FooterText="qtet">
<HeaderStyle Font-Size="Medium" Font-Names="Arial
Black"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Mem_Type" HeaderText="TYPE"
FooterText="qtet"></asp:BoundColumn>
<asp:BoundColumn DataField="Mem_Forename" HeaderText="For Name"
FooterText="qtet"></asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</aspataGrid
I got only 1 record in the member table, and when running this script that
row takes up 50% of the datagrid height and the other 50% of datagrid height
is used on the header..... and that doesn't look good..... I want the rows
to have a specific height.... how should I do that, please give me a link,
hint or something that can set me the track to find a solution to my
problem, please!
Best Regards
Jeff
IDE: VS .NET 2003
This is my code for adding data to my datagrid (DataGrid1)
MySqlConnection conn = new
MySqlConnection(ConfigurationSettings.AppSettings["DB_Connection_string"]);
conn.Open();
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand("select Mem_id, Mem_Type,
Mem_Forename from Member", conn);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "member");
DataGrid1.DataSource = dataset;
DataGrid1.DataMember = "member";
DataGrid1.DataBind();
This is the datagrid code in HTML:
<aspataGrid
id="DataGrid1"
style="Z-INDEX: 106; LEFT: 136px; POSITION: absolute; TOP: 80px"
runat="server"
Width="736px"
Height="448px"
BorderColor="#999999"
BackColor="Transparent"
BorderStyle="Groove"
BorderWidth="1px"
CellPadding="3"
GridLines="Vertical"
AutoGenerateColumns="False">
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle Font-Size="Medium" HorizontalAlign="Left"
ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#000084"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Mem_id" HeaderText="ID"
FooterText="qtet">
<HeaderStyle Font-Size="Medium" Font-Names="Arial
Black"></HeaderStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Mem_Type" HeaderText="TYPE"
FooterText="qtet"></asp:BoundColumn>
<asp:BoundColumn DataField="Mem_Forename" HeaderText="For Name"
FooterText="qtet"></asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</aspataGrid
I got only 1 record in the member table, and when running this script that
row takes up 50% of the datagrid height and the other 50% of datagrid height
is used on the header..... and that doesn't look good..... I want the rows
to have a specific height.... how should I do that, please give me a link,
hint or something that can set me the track to find a solution to my
problem, please!
Best Regards
Jeff