I have a gridview which gets first column description from the database table. However I want to add 3 more columns with texboxes for each row. Users will enter a number in any of the textboxes. They can leave a textbox blank if they want.
I have 34 rows. Each of the 34 rows have a description on the first column pulled from a database table. The 3 textboxes I want to add do not exist in the database table. Each row will have on first column a description, on second column a textbox on third column a text box and on fourth column a textbox. How do I do this?
I have attached an image of what I want my gridview to look like to the user.
Name: GridView.JPG
![Name: GridView.JPG
Views: 14
Size: 31.9 KB]()
I have 34 rows. Each of the 34 rows have a description on the first column pulled from a database table. The 3 textboxes I want to add do not exist in the database table. Each row will have on first column a description, on second column a textbox on third column a text box and on fourth column a textbox. How do I do this?
I have attached an image of what I want my gridview to look like to the user.
Name: GridView.JPG
Code:
Code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" Width="957px">
<Columns>
<asp:BoundField DataField="hcs_Description" HeaderText="Medical Service Description"
SortExpression="hcs_Description" />
<asp:TemplateField HeaderText="You"></asp:TemplateField>
<asp:TemplateField HeaderText="Spouse"></asp:TemplateField>
<asp:TemplateField HeaderText="Child"></asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>"
ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>"
SelectCommand=" SELECT hcs_Description FROM [HealthCareEstimator].[hce].[HealthCareService]">
</asp:SqlDataSource>