Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am having one dropdownlist.when i am selecting any value from dropdownlist and hit enter on save button that value get added to the gridview.but that coloumn is from differnt table which is join with another table...what should i do for showing data to single coloumn..
Posted
Comments
AshishChaudha 19-Dec-12 5:41am    
Didnt understand the problem. Could you please show us what you have tried??
ujali 19-Dec-12 5:52am    
<asp:GridView ID="grdcareplan" runat="server" CellPadding="4" CssClass="CustomGrid" ShowFooter="True"
AutoGenerateColumns="False" GridLines="Horizontal" AllowPaging="True"


Width="817px" onselectedindexchanged="grdcareplan_SelectedIndexChanged1"
onpageindexchanging="grdcareplan_PageIndexChanging" Height="16px"
style="margin-right: 71px" onrowediting="grdcareplan_RowEditing"
AutoGenerateEditButton="True" onrowcancelingedit="grdcareplan_RowCancelingEdit"
onrowupdating="grdcareplan_RowUpdating">
<columns>
<%-- <asp:BoundField DataField="Last_Date" HeaderText="Last_Date" />--%>


<%-- <asp:BoundField DataField="Result" HeaderText="Result" />--%>

<%-- <asp:BoundField DataField="Next_Due_Date" HeaderText="Next Due Date"
ControlStyle-CssClass="contactcell" >
<controlstyle cssclass="contactcell">

--%>
<%-- <asp:BoundField DataField="Remarks" HeaderText="Remarks">--%>
<asp:TemplateField>
<itemstyle cssclass="w">
<HeaderTemplate>
<asp:CheckBox ID="chkall" onclick="javascript:SelectAllCheckboxes(this);" runat="server" />
<asp:Label ID="lblselectall" runat="server" Text="Select All" CssClass="GridHead"
>
</HeaderTemplate>
<itemtemplate>

<asp:CheckBox ID="chkselect" runat="server" />

<asp:ImageButton ID="imgbtndelete" runat="server" AlternateText=""
ToolTip="Delete" ImageUrl="~/images/HMS Buttons/icon4.jpg"
CssClass="icon" />
 <asp:ImageButton ID="imgbtnenable" runat="server" ImageUrl="images/Icons/4.%20Enable.png"
AlternateText="" CssClass="icon"
ToolTip="Enable" />





<asp:BoundField DataField="ParameterName" HeaderText="Parameter Name" ReadOnly="true" />

<asp:TemplateField HeaderText="Target Value">
<edititemtemplate>
<asp:TextBox ID="txttargetvalue" runat="server"
Text='<%# Bind("Target_Value") %>'>

<itemtemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Bind("Target_Value") %>'>


<asp:TemplateField HeaderText="Last Date" >
<itemtemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Last_Date") %>'>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900