Hi 
I want to move the data in a cartein
table to a DataGrid.
What im doing right now is using the:
dataGridView1.DataSource = dataset.Tables[0];
And its adding rows and columns automaticly according to the data base.
(including the headers)
I dont want to do it like that,
i want to design manualy the DataGrid at the beginning.
and then just put the data inside my designed
datagrid, without changing anything or add anything, and without the Headers.
(i want to make my own headers)
How can i do that ?
[im using visual c# with Pervasive.SQL 8]
Thanks.

I want to move the data in a cartein
table to a DataGrid.
What im doing right now is using the:
dataGridView1.DataSource = dataset.Tables[0];
And its adding rows and columns automaticly according to the data base.
(including the headers)
I dont want to do it like that,
i want to design manualy the DataGrid at the beginning.
and then just put the data inside my designed
datagrid, without changing anything or add anything, and without the Headers.
(i want to make my own headers)
How can i do that ?
[im using visual c# with Pervasive.SQL 8]
Thanks.
SheelPosted Jul 31, 2007, 7:58 AM
Hi eli,
U can do this by calling the function from the gridview,First false the show header property of the gridview. Here I am trying to give you some code snippets.
<
asp:TemplateField HeaderText="Posts" HeaderStyle-HorizontalAlign="Center"><ItemStyle BorderWidth="1px" BorderColor="#DCDCDC">ItemStyle>
<ItemTemplate>
<asp:LinkButton ID="LinkButtonUserName" CssClass="UserDesc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "UserName") %>'
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "UserID") %>' OnCommand="LinkButtonUserName_Command">
asp:LinkButton><br>
<asp:Label ID="LabelUserDescription" CssClass="Normal" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "UserDescription") %>'>
asp:Label>
ItemTemplate>
asp:TemplateField>
<asp:TemplateField HeaderText="Topics">
<ItemStyle Width="50px" BackColor="#F2F7FD" BorderWidth="1px" BorderColor="#DCDCDC"HorizontalAlign="Center" VerticalAlign="middle">ItemStyle>
<ItemTemplate>
<asp:Label ID="LabelDisplay" CssClass="Normal" runat="server" Text='<%# functionName(Container.DataItem)%>'>
asp:Label>
ItemTemplate>
asp:TemplateField>
and also give the datasource as u are doing. I think it will help you