wsturdev
asked on
FormView not updating
I have posted my code below.
When I enter values into KT_Participate_Start_Date or KT_Participate_End_Date, they do not update in the database.
What have I done wrong?
When I enter values into KT_Participate_Start_Date or KT_Participate_End_Date, they do not update in the database.
What have I done wrong?
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="MainKTRecordReceiverStatus.aspx.vb"
Inherits="KTDevelopment.KTMainItemReceiverStatus" %>
<%@ Register TagPrefix="ah" TagName="Header" Src="KTHeader.ascx" %>
<%@ Register TagPrefix="ah" TagName="KTRecordReceiverStatus" Src="KTRecordReceiverStatus.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>KT Management Web Interface</title>
<link id="Link1" type="text/css" rel="stylesheet" href="~/Styles.css" runat="Server" />
<meta content="JavaScript" name="vs_defaultClientScript" />
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
<%-- <script language="JavaScript">
var secs
var timerID = null
var timerRunning = false
var delay = 1000
function InitializeTimer()
{
// Set the length of the timer, in seconds
secs = 900
StopTheClock()
StartTheTimer()
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function StartTheTimer()
{
if (secs==0)
{
StopTheClock()
// Here's where you put something useful that's
// supposed to happen after the allotted time.
// For example, you could display a message:
alert("You have not clicked Save Changes for about 15 minutes. Please do so, or you risk losing data entered since the last save.\r\n\r\nYour session is scheduled to time-out in 5 minutes unless you save changes, go to another section or move to another page of this web site." )
// InitializeTimer()
}
else
{
// self.status = secs
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
}
}
</script>
--%>
</head>
<body leftmargin="8" rightmargin="8" scroll="no">
<div id="Div5" runat="server" style="padding-right: 10px; border-top: White 1px solid;
padding-left: 10px; z-index: 122; left: 0px; width: 995px; vertical-align: baseline;
border-left: White 1px solid; color: Black; position: absolute; background-color: white;
text-align: center; font-variant: normal;">
<form id="KTRecordReceiverStatusForm" runat="server">
<ah:Header ID="KTRecordReceiverStatusFormHeader" runat="server" />
<br />
<asp:DataList DataSourceID="ReceiverNameDataSource" runat="server" Height="10px">
<ItemTemplate>
<div id="Div5" runat="server" style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px;
padding-top: 0px; font-size: 7pt; z-index: 122; left: 0px; width: 995px; top: 46px;
vertical-align: baseline; color: Black; background-color: White; text-align: center;
font-variant: normal; height: 10px;">
for Receiver:
<asp:Label ID="Receiver" Height="10px" Font-Bold="true" runat="server" Text='<%# Bind("Resource_Name") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:DataList>
<asp:FormView ID="KTRecordReceiverStatusAppFormView" BorderWidth="1px" BorderColor="black"
runat="server" DataSourceID="KTRecordReceiverStatusAppDataSource" CellPadding="4"
ForeColor="#333333" Width="995px" DataKeyNames="ID,Apps_Cat_ID">
<HeaderStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<PagerSettings Mode="NumericFirstLast" />
<FooterStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#DAA520" ForeColor="#333333" />
<PagerStyle BackColor="#DAA520" ForeColor="#333333" HorizontalAlign="Center" />
<EmptyDataTemplate>
<center>
<b>No applications found for the current criteria.</b></center>
<br />
<br />
</EmptyDataTemplate>
<ItemTemplate>
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100px">
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0"
cols="2">
<tr>
<td width="85px">
<b>Entry ID</b>
</td>
<td width="15px">
</td>
</tr>
<tr>
<td width="55px" bgcolor="blue" align="center">
<asp:Label ID="Apps_Cat_IDLabel" Width="75px" ForeColor="white" runat="server" Text='<%# Bind("Apps_Cat_ID") %>'></asp:Label><br />
</td>
<td width="35px">
</td>
</tr>
</table>
</td>
<td width="120px">
<b>Entry Type</b><br />
<asp:Label ID="Entry_TypeLabel" runat="server" Text='<%# Bind("KT_Entry_Type") %>'>
</asp:Label>
</td>
<td width="450px" colspan="2">
<b>Entry Name</b><br />
<asp:Label ID="KTIRS_Application_NameLabel" runat="server" Text='<%# Bind("Application_Name") %>'></asp:Label><br />
</td>
<td width="150px">
<b>KT Project Manager</b><br />
<asp:Label ID="KT_Project_ManagerLabel" runat="server" Text='<%# Bind("Analyst_Name") %>'></asp:Label><br />
</td>
</tr>
<tr>
<td width="100px">
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0"
cols="2">
<tr>
<td width="85px">
<asp:Label ID="WSMID" Font-Bold="true" runat="server" Text="WSM ID"></asp:Label>
</td>
<td width="15px">
</td>
</tr>
<tr>
<td id="tdWSM_ID" bgcolor="red" runat="server" width="85px" align="center">
<asp:Label ID="WSM_IDLabel" Width="85px" ForeColor="white" runat="server" Text='<%# Bind("WSM_ID") %>'></asp:Label><br />
</td>
<td width="35px">
</td>
</tr>
</table>
</td>
<td width="120px">
<asp:Label ID="lblComplexityDescription" Font-Bold="true" runat="server" Text="Entry Complexity"></asp:Label><br />
<asp:Label ID="Complexity_Description" runat="server" Text='<%# Bind("Complexity_Description") %>'>
</asp:Label>
</td>
<td width="150px">
<b>Business Unit</b><br />
<asp:Label ID="Business_Unit" runat="server" Text='<%# Bind("Business_Unit") %>'>
</asp:Label>
</td>
<td width="300px">
<b>Portfolio</b><br />
<asp:Label ID="Portfolio" runat="server" Text='<%# Bind("Portfolio") %>'>
</asp:Label>
</td>
<td width="149px">
<asp:Label ID="email_addressLabel" runat="server" Text='<%# Bind("KT_PM_Email_Address") %>'></asp:Label><br />
<asp:Label ID="Work_PhoneLabel" runat="server" Text='<%# Bind("Work_Phone") %>'></asp:Label><br />
</td>
<td style="display: none">
<b>Application Record ID:</b><br />
<asp:Label ID="ApplicationRecordIDLabel" runat="server" Text='<%# Bind("ID") %>'></asp:Label><br />
<b>Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name:</b>
<asp:Label ID="Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_NameLabel" runat="server"
Text='<%# Bind("Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name") %>'></asp:Label><br />
<b>Analyst_Name:</b>
<asp:Label ID="Analyst_NameLabel" runat="server" Text='<%# Bind("Analyst_Name") %>'></asp:Label><br />
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
<asp:FormView ID="KTRecordReceiverStatusInstanceFormView" runat="server" BorderColor="black"
BorderWidth="1px" CellPadding="1" DataKeyNames="ID" DataSourceID="KTRecordReceiverStatusInstanceDataSource"
Height="22px" Width="995px">
<FooterStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#ffcc00" />
<RowStyle BackColor="#ffcc00" />
<PagerStyle BackColor="#ffcc00" ForeColor="White" HorizontalAlign="Center" />
<EmptyDataTemplate>
<center>
<b>No KT instances could be found for this Entry.</b></center>
<br />
<br />
</EmptyDataTemplate>
<ItemTemplate>
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="425px">
<table width="100%">
<tr>
<td width="80px">
<b>Number</b><br />
<asp:Label ID="KTIRS_KT_Instance_NumberLabel" runat="server" Text='<%# Bind("KT_Instance_Number") %>'></asp:Label>
</td>
<td width="80px">
<b>Priority</b><br />
<asp:Label ID="KT_Instance_PriorityLabel" runat="server" Text='<%# iif(Eval("KT_Instance_Priority").ToString() = "1", "Primary", "Secondary") %>'></asp:Label>
</td>
<td width="275px" align="center" valign="top" style="padding-top: 2px;" colspan="3"
rowspan="4">
<table bgcolor="#ffff99" border="1" cellpadding="1" cellspacing="0" bordercolor="#DAA520">
<tr>
<td colspan="3" align="center">
<b>Instance Dates</b></td>
</tr>
<tr>
<td width="60px">
<b> </b></td>
<td width="80px">
<b>Start</b></td>
<td width="80px">
<b>End</b></td>
</tr>
<tr>
<td align="Right" width="60px">
<b>Planned</b></td>
<td>
<asp:Label ID="KT_Planned_Start_Date" Width="80px" Style="text-align: center" runat="server"
Text='<%# Bind("KT_Planned_Start_Date","{0:d}") %>'>
</asp:Label>
</td>
<td>
<asp:Label ID="KT_Planned_End_Date" Width="80px" Style="text-align: center" runat="server"
Text='<%# Bind("KT_Planned_End_Date","{0:d}") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td align="Right" width="60px">
<b>Actual</b></td>
<td>
<asp:Label ID="KT_Actual_Start_Date" runat="server" Width="80px" Style="text-align: center"
Text='<%# Bind("KT_Actual_Start_Date","{0:d}") %>'>
</asp:Label>
</td>
<td>
<asp:Label ID="KT_Actual_End_Date" runat="server" Width="80px" Style="text-align: center"
Text='<%# Bind("KT_Actual_End_Date", "{0:d}") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td align="Right" width="60px">
<asp:Label ID="Participate_Start_End_Label" Font-Bold="true" runat="server" Text="Participate">
</asp:Label>
<td>
<asp:Textbox ID="KT_Participate_Start_Date" runat="server" Width="80px" Font-Size="8pt" Height="12px" Style="text-align: center"
Text='<%# Bind("KT_Participate_Start_Date","{0:d}") %>'>
</asp:Textbox>
</td>
<td>
<asp:Textbox ID="KT_Participate_End_Date" runat="server" Width="80px" Font-Size="8pt" Height="12px" Style="text-align: center"
Text='<%# Bind("KT_Participate_End_Date", "{0:d}") %>'>
</asp:Textbox>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="70px">
<b>Type</b><br />
<asp:Label ID="KT_Instance_Type" runat="server" Text='<%# Bind("KT_Instance_Type") %>'>
</asp:Label>
</td>
<td width="70px">
<b>Phase</b><br />
<asp:Label ID="KT_Phase" runat="server" Text='<%# Bind("KT_Phase") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td width="425px" align="left" colspan="2" style="overflow-x: visible;">
<b>KT Sender Name(s)</b><br />
<asp:Label ID="Senders" runat="server" Text='<%# Bind("Senders") %>'></asp:Label>
<%-- <asp:Label ID="Sender" runat="server" Text="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></asp:Label>
--%>
</td>
</tr>
</table>
</td>
<td>
<table width="565px" bgcolor="#ffcc33" border="1" cellpadding="1" cellspacing="0"
bordercolor="#cc6600">
<tr>
<td width="25%">
<b>Percent of Schedule</b></td>
<td width="27%">
Progress Summary</td>
<td width="18%">
This KT Instance</td>
<td width="14%">
This Entry</td>
<td width="16%">
This Receiver</td>
<tr>
<td align="center" bordercolor="#cc6600">
<asp:Label ID="Percent_Control" runat="server" Text='' Font-Size="Larger" Font-Bold="true">
</asp:Label>
</td>
<td bgcolor="white" bordercolor="#cc6600">
Overall % Complete
<br />
Observe % Complete
<br />
Participate % Complete
<br />
Perform % Complete
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView5" runat="server"
CellPadding="4" DataSourceID="ThisInstanceDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete"))%>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView6" runat="server"
CellPadding="4" DataSourceID="ThisAppDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView1" runat="server"
CellPadding="4" DataSourceID="ThisReceiverDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
</tr>
</table>
</td>
<td style="display: none">
ID:
<asp:Label ID="IDLabel" runat="server" Text='<%# Bind("ID") %>'></asp:Label><br />
Lookup_To_Tbl_KT_Entries_For_Entry_ID:
<asp:Label ID="Lookup_To_Tbl_KT_Entries_For_Entry_IDLabel" runat="server" Text='<%# Bind("Lookup_To_Tbl_KT_Entries_For_Entry_ID") %>'>
</asp:Label><br />
Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name:
<asp:Label ID="Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_NameLabel" runat="server"
Text='<%# Bind("Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name") %>'>
</asp:Label><br />
<br />
KT_Instance_Comments:
<asp:Label ID="KT_Instance_CommentsLabel" runat="server" Text='<%# Bind("KT_Instance_Comments") %>'>
</asp:Label><br />
KT_Observe_complete:
<asp:Label ID="KT_Observe_completeLabel" runat="server" Text='<%# Bind("KT_Observe_complete") %>'>
</asp:Label><br />
KT_Participate_complete:
<asp:Label ID="KT_Participate_completeLabel" runat="server" Text='<%# Bind("KT_Participate_complete") %>'>
</asp:Label><br />
KT_Perform_complete:
<asp:Label ID="KT_Perform_completeLabel" runat="server" Text='<%# Bind("KT_Perform_complete") %>'>
</asp:Label><br />
Lookup_To_Lst_KT_Status_For_KT_Status_ID:
<asp:Label ID="Lookup_To_Lst_KT_Status_For_KT_Status_IDLabel" runat="server" Text='<%# Bind("Lookup_To_Lst_KT_Status_For_KT_Status_ID") %>'>
</asp:Label><br />
</td>
</tr>
</table>
</ItemTemplate>
<HeaderStyle BackColor="#FFA700" Font-Bold="True" ForeColor="White" />
</asp:FormView>
<ah:KTRecordReceiverStatus ID="KTRecordReceiverStatus1" runat="server" />
<table border="1px" bordercolor="black" cellpadding="0" cellspacing="0" style="font-size: 8pt;
font-family: Arial; padding-top: 0px; padding-bottom: 0px;" width="995px">
<tr style="font-size: 8pt; font-family: Arial; padding-top: 0px; padding-bottom: 0px;">
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px;" width="150px">
<b> Entry Navigator:</b><br />
<asp:Label ID="applicationLabel" Width="150px" Text="0" runat="server"></asp:Label>
</td>
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px; width: 275px;">
<asp:DropDownList ID="locaterecord" runat="server" Width="250px" AutoPostBack="True"
DataSourceID="KTIRSLocateDataSource" DataValueField="ID" DataTextField="Text">
</asp:DropDownList>
</td>
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px; width: 128px;">
<asp:FormView ID="AppsFooter" Width="125px" runat="server" DataSourceID="KTRecordReceiverStatusAppDataSource"
AllowPaging="True" CellPadding="2" ForeColor="#333333">
<PagerSettings Mode="NumericFirstLast" />
<FooterStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#DAA520" ForeColor="#333333" />
<PagerStyle BackColor="#DAA520" HorizontalAlign="Center" ForeColor="Black" Font-Bold="true" CssClass="navigator" Font-Underline="True" />
<ItemTemplate>
</ItemTemplate>
<HeaderStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
</asp:FormView>
</td>
<td bgcolor="#ffcc00" bordercolor="#DAA520" style="height: 41px; border-left-color: Black;
border-right-color: #FFA700; width: 150px;">
<b> KT Instance Navigator:</b><br />
<asp:Label ID="InstanceLabel" Text="0" runat="server"></asp:Label>
</td>
<td bgcolor="#ffcc00" bordercolor="#ffcc00" style="height: 41px" width="275px">
<asp:FormView ID="KTInstanceFooter" runat="server" DataSourceID="KTRecordReceiverStatusInstanceDataSource"
CellPadding="2" ForeColor="#333333" AllowPaging="True">
<ItemTemplate>
</ItemTemplate>
<FooterStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#ffcc00" />
<RowStyle BackColor="#ffcc00" />
<PagerStyle BackColor="#ffcc00" CssClass="navigator" Font-Bold="true" Font-Underline="True"
ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<PagerSettings Mode="NumericFirstLast" />
</asp:FormView>
</td>
<td align="center" bgcolor="#99cc99" bordercolor="#99cc99" width="60px" style="height: 41px">
<asp:Button ID="HelpBtn" Height="19px" Font-Names="Arial" Font-Size="8pt" runat="server"
Width="100%" Text="Help"></asp:Button>
<asp:Button ID="FeedbackBtn" runat="server" Font-Names="Arial" Font-Size="8pt" Height="19px"
OnClientClick="var retvalue = window.showModalDialog('KTReceiverFeedbackForm.aspx','','dialogTop: 100px; dialogHeight: 475px; dialogWidth: 855px; center: yes; edge: Raised; help: no; status: no; resizable: no;'); return false;"
Text="Feedback" Width="100%" />
</td>
</tr>
</table>
<!-- All data sources below this area -->
<asp:SqlDataSource ID="KTRecordReceiverStatusAppDataSource" runat="server" ProviderName="System.Data.SqlClient"
SelectCommand="select distinct * from Qry_KT_Entries_Filtered_By_Receiver where email_address=@email_address order by application_name">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="KTIRSLocateDataSource" runat="server" ProviderName="System.Data.SqlClient"
SelectCommand="SELECT str(id)+' '+[Instance num] as id, [Application Name] + ' ' + [Instance num] as text FROM Qry_Locate_By_Which_Filtered_By_Receiver WHERE Receiver in (select resource_name from tbl_resources where email_address=@email_address) order by [application name], [instance num], Receiver">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="KTRecordReceiverStatusInstanceDataSource" runat="server"
SelectCommand="SELECT Qry_KT_Instances_For_Receiver_Web_Interface.ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Tbl_KT_Entries_For_Entry_ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Instance_Types_For_KT_Instance_Type, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Number, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Priority, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Planned_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Planned_End_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Actual_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Actual_End_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Comments, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Observe_complete, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_complete, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Perform_complete, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Status_For_KT_Status_ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Phases_For_KT_Phase, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Type, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Phase, Qry_KT_Instances_For_Receiver_Web_Interface.email_address, Qry_KT_Instances_For_Receiver_Web_Interface.Support_Role, dbo.Assemble_List_Of_KT_Senders_For_KT_Instance(Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Number) AS Senders, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_End_Date FROM Qry_KT_Instances_For_Receiver_Web_Interface LEFT OUTER JOIN Qry_KT_Receivers_By_KT_Instance ON Qry_KT_Instances_For_Receiver_Web_Interface.ID = Qry_KT_Receivers_By_KT_Instance.ID WHERE ([Lookup_To_Tbl_KT_Entries_For_Entry_ID] = @Lookup_To_Tbl_KT_Entries_For_Entry_ID) AND email_address = @email_address"
EnableViewState="False"
UpdateCommand="UPDATE Tbl_KT_Instances SET KT_Participate_Start_Date = @KT_Participate_Start_Date ,KT_Participate_End_Date = @KT_Participate_End_Date WHERE ID = @KT_Instance_ID">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusAppFormView" Name="Lookup_To_Tbl_KT_Entries_For_Entry_ID"
PropertyName="SelectedValue" Type="Int32" />
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="KT_Participate_Start_Date" Name="KT_Participate_Start_Date"
Type="String" />
<asp:ControlParameter ControlID="KT_Participate_End_Date" Name="KT_Participate_End_Date"
Type="String" />
<asp:SessionParameter Name="KT_Instance_ID" SessionField="intKTInstanceID" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="TypesDataSource" runat="server" SelectCommand="select * from Qry_KT_Instance_Types">
</asp:SqlDataSource>
<asp:SqlDataSource ID="PhasesDataSource" runat="server" SelectCommand="select * from Qry_Lst_kt_phases">
</asp:SqlDataSource>
<asp:SqlDataSource ID="ReceiverNameDataSource" runat="server" SelectCommand="select Resource_Name from Tbl_Resources where email_Address=@email_address"
EnableViewState="false">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisInstanceDataSource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Instance where instance_id=@KT_Instance_ID"
EnableViewState="false">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusInstanceFormView" Name="KT_Instance_ID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisAppDataSource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Entry WHERE ([Lookup_To_Tbl_KT_Entries_For_Entry_ID] = @Lookup_To_Tbl_KT_Entries_For_Entry_ID)"
EnableViewState="false">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusAppFormView" Name="Lookup_To_Tbl_KT_Entries_For_Entry_ID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisReceiverDatasource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Receiver WHERE ( email_Address=@email_address)"
EnableViewState="false">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</div>
</body>
</html>
ASKER
What instruction do I use to do that. I can see that I can do DataSource.DataBind(), but cannot see how to bind a Formview.
Can u post ur code
ASKER
This was working, but I had to add 2 new fields (KT_Participate_Start_Date and KT_Participate_End_Date) which have to be editable.
Here is ASP (VB.NET Code Behind follows)
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="MainKTRecordReceiverStatus.aspx.vb"
Inherits="KTDevelopment.KTMainItemReceiverStatus" %>
<%@ Register TagPrefix="ah" TagName="Header" Src="KTHeader.ascx" %>
<%@ Register TagPrefix="ah" TagName="KTRecordReceiverStatus" Src="KTRecordReceiverStatus.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>KT Management Web Interface</title>
<link id="Link1" type="text/css" rel="stylesheet" href="~/Styles.css" runat="Server" />
<meta content="JavaScript" name="vs_defaultClientScript" />
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
<%-- <script language="JavaScript">
var secs
var timerID = null
var timerRunning = false
var delay = 1000
function InitializeTimer()
{
// Set the length of the timer, in seconds
secs = 900
StopTheClock()
StartTheTimer()
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function StartTheTimer()
{
if (secs==0)
{
StopTheClock()
// Here's where you put something useful that's
// supposed to happen after the allotted time.
// For example, you could display a message:
alert("You have not clicked Save Changes for about 15 minutes. Please do so, or you risk losing data entered since the last save.\r\n\r\nYour session is scheduled to time-out in 5 minutes unless you save changes, go to another section or move to another page of this web site." )
// InitializeTimer()
}
else
{
// self.status = secs
secs = secs - 1
timerRunning = true
timerID = self.setTimeout("StartTheTimer()", delay)
}
}
</script>
--%>
</head>
<body leftmargin="8" rightmargin="8" scroll="no">
<div id="Div5" runat="server" style="padding-right: 10px; border-top: White 1px solid;
padding-left: 10px; z-index: 122; left: 0px; width: 995px; vertical-align: baseline;
border-left: White 1px solid; color: Black; position: absolute; background-color: white;
text-align: center; font-variant: normal;">
<form id="KTRecordReceiverStatusForm" runat="server">
<ah:Header ID="KTRecordReceiverStatusFormHeader" runat="server" />
<br />
<asp:DataList DataSourceID="ReceiverNameDataSource" runat="server" Height="10px">
<ItemTemplate>
<div id="Div5" runat="server" style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px;
padding-top: 0px; font-size: 7pt; z-index: 122; left: 0px; width: 995px; top: 46px;
vertical-align: baseline; color: Black; background-color: White; text-align: center;
font-variant: normal; height: 10px;">
for Receiver:
<asp:Label ID="Receiver" Height="10px" Font-Bold="true" runat="server" Text='<%# Bind("Resource_Name") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:DataList>
<asp:FormView ID="KTRecordReceiverStatusAppFormView" BorderWidth="1px" BorderColor="black"
runat="server" DataSourceID="KTRecordReceiverStatusAppDataSource" CellPadding="4"
ForeColor="#333333" Width="995px" DataKeyNames="ID,Apps_Cat_ID">
<HeaderStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<PagerSettings Mode="NumericFirstLast" />
<FooterStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#DAA520" ForeColor="#333333" />
<PagerStyle BackColor="#DAA520" ForeColor="#333333" HorizontalAlign="Center" />
<EmptyDataTemplate>
<center>
<b>No applications found for the current criteria.</b></center>
<br />
<br />
</EmptyDataTemplate>
<ItemTemplate>
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100px">
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0"
cols="2">
<tr>
<td width="85px">
<b>Entry ID</b>
</td>
<td width="15px">
</td>
</tr>
<tr>
<td width="55px" bgcolor="blue" align="center">
<asp:Label ID="Apps_Cat_IDLabel" Width="75px" ForeColor="white" runat="server" Text='<%# Bind("Apps_Cat_ID") %>'></asp:Label><br />
</td>
<td width="35px">
</td>
</tr>
</table>
</td>
<td width="120px">
<b>Entry Type</b><br />
<asp:Label ID="Entry_TypeLabel" runat="server" Text='<%# Bind("KT_Entry_Type") %>'>
</asp:Label>
</td>
<td width="450px" colspan="2">
<b>Entry Name</b><br />
<asp:Label ID="KTIRS_Application_NameLabel" runat="server" Text='<%# Bind("Application_Name") %>'></asp:Label><br />
</td>
<td width="150px">
<b>KT Project Manager</b><br />
<asp:Label ID="KT_Project_ManagerLabel" runat="server" Text='<%# Bind("Analyst_Name") %>'></asp:Label><br />
</td>
</tr>
<tr>
<td width="100px">
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0"
cols="2">
<tr>
<td width="85px">
<asp:Label ID="WSMID" Font-Bold="true" runat="server" Text="WSM ID"></asp:Label>
</td>
<td width="15px">
</td>
</tr>
<tr>
<td id="tdWSM_ID" bgcolor="red" runat="server" width="85px" align="center">
<asp:Label ID="WSM_IDLabel" Width="85px" ForeColor="white" runat="server" Text='<%# Bind("WSM_ID") %>'></asp:Label><br />
</td>
<td width="35px">
</td>
</tr>
</table>
</td>
<td width="120px">
<asp:Label ID="lblComplexityDescription" Font-Bold="true" runat="server" Text="Entry Complexity"></asp:Label><br />
<asp:Label ID="Complexity_Description" runat="server" Text='<%# Bind("Complexity_Description") %>'>
</asp:Label>
</td>
<td width="150px">
<b>Business Unit</b><br />
<asp:Label ID="Business_Unit" runat="server" Text='<%# Bind("Business_Unit") %>'>
</asp:Label>
</td>
<td width="300px">
<b>Portfolio</b><br />
<asp:Label ID="Portfolio" runat="server" Text='<%# Bind("Portfolio") %>'>
</asp:Label>
</td>
<td width="149px">
<asp:Label ID="email_addressLabel" runat="server" Text='<%# Bind("KT_PM_Email_Address") %>'></asp:Label><br />
<asp:Label ID="Work_PhoneLabel" runat="server" Text='<%# Bind("Work_Phone") %>'></asp:Label><br />
</td>
<td style="display: none">
<b>Application Record ID:</b><br />
<asp:Label ID="ApplicationRecordIDLabel" runat="server" Text='<%# Bind("ID") %>'></asp:Label><br />
<b>Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name:</b>
<asp:Label ID="Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_NameLabel" runat="server"
Text='<%# Bind("Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name") %>'></asp:Label><br />
<b>Analyst_Name:</b>
<asp:Label ID="Analyst_NameLabel" runat="server" Text='<%# Bind("Analyst_Name") %>'></asp:Label><br />
</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
<asp:FormView ID="KTRecordReceiverStatusInstanceFormView" runat="server" BorderColor="black"
BorderWidth="1px" CellPadding="1" DataKeyNames="ID" DataSourceID="KTRecordReceiverStatusInstanceDataSource"
Height="22px" Width="995px">
<FooterStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#ffcc00" />
<RowStyle BackColor="#ffcc00" />
<PagerStyle BackColor="#ffcc00" ForeColor="White" HorizontalAlign="Center" />
<EmptyDataTemplate>
<center>
<b>No KT instances could be found for this Entry.</b></center>
<br />
<br />
</EmptyDataTemplate>
<ItemTemplate>
<table width="100%" style="font-size: 8pt" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="425px">
<table width="100%">
<tr>
<td width="80px">
<b>Number</b><br />
<asp:Label ID="KTIRS_KT_Instance_NumberLabel" runat="server" Text='<%# Bind("KT_Instance_Number") %>'></asp:Label>
</td>
<td width="80px">
<b>Priority</b><br />
<asp:Label ID="KT_Instance_PriorityLabel" runat="server" Text='<%# iif(Eval("KT_Instance_Priority").ToString() = "1", "Primary", "Secondary") %>'></asp:Label>
</td>
<td width="275px" align="center" valign="top" style="padding-top: 2px;" colspan="3"
rowspan="4">
<table bgcolor="#ffff99" border="1" cellpadding="1" cellspacing="0" bordercolor="#DAA520">
<tr>
<td colspan="3" align="center">
<b>Instance Dates</b></td>
</tr>
<tr>
<td width="60px">
<b> </b></td>
<td width="80px">
<b>Start</b></td>
<td width="80px">
<b>End</b></td>
</tr>
<tr>
<td align="Right" width="60px">
<b>Planned</b></td>
<td>
<asp:Label ID="KT_Planned_Start_Date" Width="80px" Style="text-align: center" runat="server"
Text='<%# Bind("KT_Planned_Start_Date","{0:d}") %>'>
</asp:Label>
</td>
<td>
<asp:Label ID="KT_Planned_End_Date" Width="80px" Style="text-align: center" runat="server"
Text='<%# Bind("KT_Planned_End_Date","{0:d}") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td align="Right" width="60px">
<b>Actual</b></td>
<td>
<asp:Label ID="KT_Actual_Start_Date" runat="server" Width="80px" Style="text-align: center"
Text='<%# Bind("KT_Actual_Start_Date","{0:d}") %>'>
</asp:Label>
</td>
<td>
<asp:Label ID="KT_Actual_End_Date" runat="server" Width="80px" Style="text-align: center"
Text='<%# Bind("KT_Actual_End_Date", "{0:d}") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td align="Right" width="60px">
<asp:Label ID="Participate_Start_End_Label" Font-Bold="true" runat="server" Text="Participate">
</asp:Label>
<td>
<asp:Textbox ID="KT_Participate_Start_Date" runat="server" Width="80px" Font-Size="8pt" Height="12px" Style="text-align: center"
Text='<%# Bind("KT_Participate_Start_Date","{0:d}") %>'>
</asp:Textbox>
</td>
<td>
<asp:Textbox ID="KT_Participate_End_Date" runat="server" Width="80px" Font-Size="8pt" Height="12px" Style="text-align: center"
Text='<%# Bind("KT_Participate_End_Date", "{0:d}") %>'>
</asp:Textbox>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="70px">
<b>Type</b><br />
<asp:Label ID="KT_Instance_Type" runat="server" Text='<%# Bind("KT_Instance_Type") %>'>
</asp:Label>
</td>
<td width="70px">
<b>Phase</b><br />
<asp:Label ID="KT_Phase" runat="server" Text='<%# Bind("KT_Phase") %>'>
</asp:Label>
</td>
</tr>
<tr>
<td width="425px" align="left" colspan="2" style="overflow-x: visible;">
<b>KT Sender Name(s)</b><br />
<asp:Label ID="Senders" runat="server" Text='<%# Bind("Senders") %>'></asp:Label>
</td>
</tr>
</table>
</td>
<td>
<table width="565px" bgcolor="#ffcc33" border="1" cellpadding="1" cellspacing="0"
bordercolor="#cc6600">
<tr>
<td width="25%">
<b>Percent of Schedule</b></td>
<td width="27%">
Progress Summary</td>
<td width="18%">
This KT Instance</td>
<td width="14%">
This Entry</td>
<td width="16%">
This Receiver</td>
<tr>
<td align="center" bordercolor="#cc6600">
<asp:Label ID="Percent_Control" runat="server" Text='' Font-Size="Larger" Font-Bold="true">
</asp:Label>
</td>
<td bgcolor="white" bordercolor="#cc6600">
Overall % Complete
<br />
Observe % Complete
<br />
Participate % Complete
<br />
Perform % Complete
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView5" runat="server"
CellPadding="4" DataSourceID="ThisInstanceDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete"))%>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView6" runat="server"
CellPadding="4" DataSourceID="ThisAppDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
<td align="center" bgcolor="white" bordercolor="#cc6600">
<asp:FormView ID="FormView1" runat="server"
CellPadding="4" DataSourceID="ThisReceiverDataSource">
<ItemTemplate>
<asp:Label ID="Total_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("Total_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfObserve_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfObserve_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfParticipate_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfParticipate_Percent_Complete")) %>'></asp:Label><br />
<asp:Label ID="AvgOfPerform_Percent_CompleteLabel" runat="server" Text='<%# Format_Progress_For_KTIRS(Eval("AvgOfPerform_Percent_Complete")) %>'></asp:Label><br />
</ItemTemplate>
</asp:FormView>
</td>
</tr>
</table>
</td>
<td style="display: none">
ID:
<asp:Label ID="IDLabel" runat="server" Text='<%# Bind("ID") %>'></asp:Label><br />
Lookup_To_Tbl_KT_Entries_For_Entry_ID:
<asp:Label ID="Lookup_To_Tbl_KT_Entries_For_Entry_IDLabel" runat="server" Text='<%# Bind("Lookup_To_Tbl_KT_Entries_For_Entry_ID") %>'>
</asp:Label><br />
Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name:
<asp:Label ID="Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_NameLabel" runat="server"
Text='<%# Bind("Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name") %>'>
</asp:Label><br />
<br />
KT_Instance_Comments:
<asp:Label ID="KT_Instance_CommentsLabel" runat="server" Text='<%# Bind("KT_Instance_Comments") %>'>
</asp:Label><br />
KT_Observe_complete:
<asp:Label ID="KT_Observe_completeLabel" runat="server" Text='<%# Bind("KT_Observe_complete") %>'>
</asp:Label><br />
KT_Participate_complete:
<asp:Label ID="KT_Participate_completeLabel" runat="server" Text='<%# Bind("KT_Participate_complete") %>'>
</asp:Label><br />
KT_Perform_complete:
<asp:Label ID="KT_Perform_completeLabel" runat="server" Text='<%# Bind("KT_Perform_complete") %>'>
</asp:Label><br />
Lookup_To_Lst_KT_Status_For_KT_Status_ID:
<asp:Label ID="Lookup_To_Lst_KT_Status_For_KT_Status_IDLabel" runat="server" Text='<%# Bind("Lookup_To_Lst_KT_Status_For_KT_Status_ID") %>'>
</asp:Label><br />
</td>
</tr>
</table>
</ItemTemplate>
<HeaderStyle BackColor="#FFA700" Font-Bold="True" ForeColor="White" />
</asp:FormView>
<ah:KTRecordReceiverStatus ID="KTRecordReceiverStatus1" runat="server" />
<table border="1px" bordercolor="black" cellpadding="0" cellspacing="0" style="font-size: 8pt;
font-family: Arial; padding-top: 0px; padding-bottom: 0px;" width="995px">
<tr style="font-size: 8pt; font-family: Arial; padding-top: 0px; padding-bottom: 0px;">
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px;" width="150px">
<b> Entry Navigator:</b><br />
<asp:Label ID="applicationLabel" Width="150px" Text="0" runat="server"></asp:Label>
</td>
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px; width: 275px;">
<asp:DropDownList ID="locaterecord" runat="server" Width="250px" AutoPostBack="True"
DataSourceID="KTIRSLocateDataSource" DataValueField="ID" DataTextField="Text">
</asp:DropDownList>
</td>
<td bgcolor="#DAA520" bordercolor="#DAA520" style="height: 41px; width: 128px;">
<asp:FormView ID="AppsFooter" Width="125px" runat="server" DataSourceID="KTRecordReceiverStatusAppDataSource"
AllowPaging="True" CellPadding="2" ForeColor="#333333">
<PagerSettings Mode="NumericFirstLast" />
<FooterStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#DAA520" ForeColor="#333333" />
<PagerStyle BackColor="#DAA520" HorizontalAlign="Center" ForeColor="Black" Font-Bold="true" CssClass="navigator" Font-Underline="True" />
<ItemTemplate>
</ItemTemplate>
<HeaderStyle BackColor="#DAA520" Font-Bold="True" ForeColor="White" />
</asp:FormView>
</td>
<td bgcolor="#ffcc00" bordercolor="#DAA520" style="height: 41px; border-left-color: Black;
border-right-color: #FFA700; width: 150px;">
<b> KT Instance Navigator:</b><br />
<asp:Label ID="InstanceLabel" Text="0" runat="server"></asp:Label>
</td>
<td bgcolor="#ffcc00" bordercolor="#ffcc00" style="height: 41px" width="275px">
<asp:FormView ID="KTInstanceFooter" runat="server" DataSourceID="KTRecordReceiverStatusInstanceDataSource"
CellPadding="2" ForeColor="#333333" AllowPaging="True">
<ItemTemplate>
</ItemTemplate>
<FooterStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#ffcc00" />
<RowStyle BackColor="#ffcc00" />
<PagerStyle BackColor="#ffcc00" CssClass="navigator" Font-Bold="true" Font-Underline="True"
ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#ffcc00" Font-Bold="True" ForeColor="White" />
<PagerSettings Mode="NumericFirstLast" />
</asp:FormView>
</td>
<td align="center" bgcolor="#99cc99" bordercolor="#99cc99" width="60px" style="height: 41px">
<asp:Button ID="HelpBtn" Height="19px" Font-Names="Arial" Font-Size="8pt" runat="server"
Width="100%" Text="Help"></asp:Button>
<asp:Button ID="FeedbackBtn" runat="server" Font-Names="Arial" Font-Size="8pt" Height="19px"
OnClientClick="var retvalue = window.showModalDialog('KTReceiverFeedbackForm.aspx','','dialogTop: 100px; dialogHeight: 475px; dialogWidth: 855px; center: yes; edge: Raised; help: no; status: no; resizable: no;'); return false;"
Text="Feedback" Width="100%" />
</td>
</tr>
</table>
<!-- All data sources below this area -->
<asp:SqlDataSource ID="KTRecordReceiverStatusAppDataSource" runat="server" ProviderName="System.Data.SqlClient"
SelectCommand="select distinct * from Qry_KT_Entries_Filtered_By_Receiver where email_address=@email_address order by application_name">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="KTIRSLocateDataSource" runat="server" ProviderName="System.Data.SqlClient"
SelectCommand="SELECT str(id)+' '+[Instance num] as id, [Application Name] + ' ' + [Instance num] as text FROM Qry_Locate_By_Which_Filtered_By_Receiver WHERE Receiver in (select resource_name from tbl_resources where email_address=@email_address) order by [application name], [instance num], Receiver">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="KTRecordReceiverStatusInstanceDataSource" runat="server"
SelectCommand="SELECT Qry_KT_Instances_For_Receiver_Web_Interface.ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Tbl_KT_Entries_For_Entry_ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_Data_Collection_Analysts_For_KT_PM_Name, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Instance_Types_For_KT_Instance_Type, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Number, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Priority, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Planned_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Planned_End_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Actual_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Actual_End_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Comments, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Observe_complete, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_complete, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Perform_complete, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Status_For_KT_Status_ID, Qry_KT_Instances_For_Receiver_Web_Interface.Lookup_To_Lst_KT_Phases_For_KT_Phase, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Type, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Phase, Qry_KT_Instances_For_Receiver_Web_Interface.email_address, Qry_KT_Instances_For_Receiver_Web_Interface.Support_Role, dbo.Assemble_List_Of_KT_Senders_For_KT_Instance(Qry_KT_Instances_For_Receiver_Web_Interface.KT_Instance_Number) AS Senders, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_Start_Date, Qry_KT_Instances_For_Receiver_Web_Interface.KT_Participate_End_Date FROM Qry_KT_Instances_For_Receiver_Web_Interface LEFT OUTER JOIN Qry_KT_Receivers_By_KT_Instance ON Qry_KT_Instances_For_Receiver_Web_Interface.ID = Qry_KT_Receivers_By_KT_Instance.ID WHERE ([Lookup_To_Tbl_KT_Entries_For_Entry_ID] = @Lookup_To_Tbl_KT_Entries_For_Entry_ID) AND email_address = @email_address"
EnableViewState="False"
UpdateCommand="UPDATE Tbl_KT_Instances SET KT_Participate_Start_Date = @KT_Participate_Start_Date ,KT_Participate_End_Date = @KT_Participate_End_Date WHERE ID = @KT_Instance_ID">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusAppFormView" Name="Lookup_To_Tbl_KT_Entries_For_Entry_ID"
PropertyName="SelectedValue" Type="Int32" />
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="KT_Participate_Start_Date" Name="KT_Participate_Start_Date"
Type="String" />
<asp:ControlParameter ControlID="KT_Participate_End_Date" Name="KT_Participate_End_Date"
Type="String" />
<asp:SessionParameter Name="KT_Instance_ID" SessionField="intKTInstanceID" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="TypesDataSource" runat="server" SelectCommand="select * from Qry_KT_Instance_Types">
</asp:SqlDataSource>
<asp:SqlDataSource ID="PhasesDataSource" runat="server" SelectCommand="select * from Qry_Lst_kt_phases">
</asp:SqlDataSource>
<asp:SqlDataSource ID="ReceiverNameDataSource" runat="server" SelectCommand="select Resource_Name from Tbl_Resources where email_Address=@email_address"
EnableViewState="false">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisInstanceDataSource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Instance where instance_id=@KT_Instance_ID"
EnableViewState="false">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusInstanceFormView" Name="KT_Instance_ID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisAppDataSource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Entry WHERE ([Lookup_To_Tbl_KT_Entries_For_Entry_ID] = @Lookup_To_Tbl_KT_Entries_For_Entry_ID)"
EnableViewState="false">
<SelectParameters>
<asp:ControlParameter ControlID="KTRecordReceiverStatusAppFormView" Name="Lookup_To_Tbl_KT_Entries_For_Entry_ID"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="ThisReceiverDatasource" runat="server" SelectCommand="select * from Qry_KT_Percent_Complete_By_Receiver WHERE ( email_Address=@email_address)"
EnableViewState="false">
<SelectParameters>
<asp:SessionParameter Name="email_address" SessionField="strUserID" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</div>
</body>
</html>
VB.NET Code Behind
Partial Public Class KTMainItemReceiverStatus
Inherits System.Web.UI.Page
Private modified As Boolean
Private navigate As Boolean
Private LocateIndex As Integer
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'If the previous session has timed out, then redirect to error page
If Session.IsNewSession Then
Response.Redirect("SessionTimeOut.aspx")
Exit Sub
End If
Session("strWhichFormDidIStartFrom") = "MainKTRecordReceiverStatus.aspx"
'Set up Help Button
HelpBtn.Attributes.Add("onClick", Session("HelpFilenameAttribute").ToString)
'Set up Data Sources specific to this Client
KTRecordReceiverStatusAppDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
KTIRSLocateDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
KTRecordReceiverStatusInstanceDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
TypesDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
PhasesDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
ThisAppDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
ThisInstanceDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
ThisReceiverDatasource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
ReceiverNameDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString2Dot0").ConnectionString.Replace("ClientName", Session("client"))
Dim lblEntry_Type As Label = CType(KTRecordReceiverStatusAppFormView.FindControl("Entry_TypeLabel"), Label)
If Not lblEntry_Type Is Nothing Then
If lblEntry_Type.Text = "Application" Then
CType(KTRecordReceiverStatusAppFormView.FindControl("WSM_IDLabel"), Label).Visible = True
CType(KTRecordReceiverStatusAppFormView.FindControl("WSMID"), Label).Visible = True
CType(KTRecordReceiverStatusAppFormView.FindControl("tdWSM_ID"), HtmlTableCell).BgColor = "Red"
Else
CType(KTRecordReceiverStatusAppFormView.FindControl("WSM_IDLabel"), Label).Visible = False
CType(KTRecordReceiverStatusAppFormView.FindControl("WSMID"), Label).Visible = False
CType(KTRecordReceiverStatusAppFormView.FindControl("tdWSM_ID"), HtmlTableCell).BgColor = "#cc9900"
End If
End If
If IsDBNull(Session("Allow_Use_Of_Affected_By_Complexity_Factor_In_KT")) Or Session("Allow_Use_Of_Affected_By_Complexity_Factor_In_KT") = False Then
CType(KTRecordReceiverStatusAppFormView.FindControl("lblComplexityDescription"), Label).Visible = False
CType(KTRecordReceiverStatusAppFormView.FindControl("Complexity_Description"), Label).Visible = False
Else
CType(KTRecordReceiverStatusAppFormView.FindControl("lblComplexityDescription"), Label).Visible = True
CType(KTRecordReceiverStatusAppFormView.FindControl("Complexity_Description"), Label).Visible = True
End If
CType(KTRecordReceiverStatusInstanceFormView.FindControl("Participate_Start_End_Label"), Label).Text = Session("strParticipateLabel")
End Sub
'synhcronize footer navigation bar with actual control
Private Sub AppsFooter_PageIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles AppsFooter.PageIndexChanged
KTRecordReceiverStatus1.Save_Grid_Changes()
If KTRecordReceiverStatus1.gridUpdateErrorsFound = True Then Exit Sub
KTRecordReceiverStatusAppFormView.PageIndex = AppsFooter.PageIndex
KTInstanceFooter.PageIndex = 0
KTRecordReceiverStatusInstanceFormView.PageIndex = 0
Session("strReceiverStatusSQLstmt") = Session("strReceiverStatusBeginningOfSQL") & Session("strReceiverStatusRestOfWhere") & Session("strReceiverStatusOrderBy")
Dim xxx As String
xxx = Session("strReceiverStatusSQLstmt")
Dim ctl As UserControl = KTRecordReceiverStatus1
Dim gv As GridView = DirectCast(ctl.FindControl("ItemReceiverStatusGridView"), GridView)
gv.PageIndex = 0
End Sub
'synhcronize footer navigation bar with actual control
Protected Sub KTInstanceFooter_PageIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KTInstanceFooter.PageIndexChanged
KTRecordReceiverStatus1.Save_Grid_Changes()
If KTRecordReceiverStatus1.gridUpdateErrorsFound = True Then Exit Sub
KTRecordReceiverStatusInstanceFormView.PageIndex = KTInstanceFooter.PageIndex
Dim ctl As UserControl = KTRecordReceiverStatus1
Dim gv As GridView = DirectCast(ctl.FindControl("ItemReceiverStatusGridView"), GridView)
gv.PageIndex = 0
End Sub
'Parameters to load data into KTRecordReceiverStatus control
Private Sub SetKTRecordReceiverStatus()
If navigate Then
Dim i As Integer
Dim split(0) As String
Dim ienum As System.Collections.IEnumerator
split(0) = " "
i = 0
ienum = KTRecordReceiverStatusInstanceDataSource.Select(System.Web.UI.DataSourceSelectArguments.Empty).GetEnumerator()
Do While ienum.MoveNext()
If CType(ienum.Current, System.Data.DataRowView)("KT_Instance_Number").ToString() = locaterecord.SelectedValue.Split(split, StringSplitOptions.None)(2).Trim() Then
KTInstanceFooter.PageIndex = i
KTInstanceFooter_PageIndexChanged(New Object(), New System.EventArgs())
Exit Do
End If
i = i + 1
Loop
End If
KTRecordReceiverStatus1.KTIRSAppsCatID = KTRecordReceiverStatusAppFormView.DataKey()("Apps_Cat_ID")
KTRecordReceiverStatus1.KTIRSKTInstanceID = KTRecordReceiverStatusInstanceFormView.SelectedValue
If KTRecordReceiverStatusInstanceFormView.PageCount = 1 Then
InstanceLabel.Text = "(" & KTRecordReceiverStatusInstanceFormView.PageCount & " KT Instance)"
Else
InstanceLabel.Text = "(" & KTRecordReceiverStatusInstanceFormView.PageCount & " KT Instances)"
End If
End Sub
Protected Sub KTRecordReceiverStatusInstanceFormView_DataBound(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KTRecordReceiverStatusInstanceFormView.DataBound
SetKTRecordReceiverStatus()
If KTRecordReceiverStatusInstanceFormView.SelectedValue <> Nothing Then
CType(KTRecordReceiverStatusInstanceFormView.FindControl("Percent_Control"), Label).Text = Get_Percent_Of_Schedule() & "%"
End If
End Sub
Function Format_Progress_For_KTIRS(ByVal strOld As Object) As String
Format_Progress_For_KTIRS = "0.00 %"
If (Not IsDBNull(strOld)) Then
Format_Progress_For_KTIRS = String.Format("{0:0.00}", Convert.ToDouble(strOld) * 100.0) & "%"
End If
End Function
Private Sub KTRecordReceiverStatusAppDataSource_Selected(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles KTRecordReceiverStatusAppDataSource.Selected
If KTRecordReceiverStatusAppFormView.PageCount = 1 Then
applicationLabel.Text = "(" & KTRecordReceiverStatusAppFormView.PageCount & " Entry)"
Else
applicationLabel.Text = "(" & KTRecordReceiverStatusAppFormView.PageCount & " Entries)"
End If
End Sub
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If KTRecordReceiverStatus1.revert Then
KTRecordReceiverStatusInstanceDataSource.DataBind()
End If
End Sub
Protected Sub locaterecord_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles locaterecord.SelectedIndexChanged
Dim i As Integer
Dim split(0) As String
Dim ienum As System.Collections.IEnumerator
split(0) = " "
i = 0
ienum = KTRecordReceiverStatusAppDataSource.Select(System.Web.UI.DataSourceSelectArguments.Empty).GetEnumerator()
Do While ienum.MoveNext()
If CType(ienum.Current, System.Data.DataRowView)("id").ToString() = locaterecord.SelectedValue.Split(split, StringSplitOptions.None)(1).Trim() Then
AppsFooter.PageIndex = i
AppsFooter_PageIndexChanged(New Object(), New System.EventArgs())
Exit Do
End If
i = i + 1
Loop
navigate = True
End Sub
Function Find_Associated_KTIRS_Dropdown_Value(ByVal AppName As String, ByVal KTInstanceNumber As String) As Integer
Dim i As Integer
Dim split(0) As String
Dim ienum As System.Collections.IEnumerator
split(0) = " "
i = 0
ienum = KTIRSLocateDataSource.Select(System.Web.UI.DataSourceSelectArguments.Empty).GetEnumerator()
Do While ienum.MoveNext()
Dim listedAppName As String
listedAppName = CType(ienum.Current, System.Data.DataRowView)(1).ToString()
If CType(ienum.Current, System.Data.DataRowView)(1).ToString() Like "*" & listedAppName & "*" And CType(ienum.Current, System.Data.DataRowView)(1).ToString() Like "*" & KTInstanceNumber & "*" Then
Find_Associated_KTIRS_Dropdown_Value = i
Exit Function
End If
i = i + 1
Loop
Find_Associated_KTIRS_Dropdown_Value = 0
End Function
Private Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRenderComplete
LocateIndex = Find_Associated_KTIRS_Dropdown_Value(CType(KTRecordReceiverStatusAppFormView.FindControl("KTIRS_Application_NameLabel"), Label).Text, CType(KTRecordReceiverStatusInstanceFormView.FindControl("KTIRS_KT_Instance_NumberLabel"), Label).Text)
locaterecord.SelectedIndex = LocateIndex
End Sub
Function Get_Percent_Of_Schedule() As String
Dim dtStartDate As Date
Dim dtEndDate As Date
If CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_End_Date"), Label).Text <> "" Then
Get_Percent_Of_Schedule = "100"
Else
If CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Planned_Start_Date"), Label).Text = "" _
And CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_Start_Date"), Label).Text = "" _
And CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Planned_End_Date"), Label).Text = "" _
And CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_End_Date"), Label).Text = "" Then
Get_Percent_Of_Schedule = ""
Else
Dim actual_start, actual_end, planned_start, planned_end As Date
Try
actual_end = CType(CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_End_Date"), Label).Text, Date)
Catch ex As Exception
actual_end = New DateTime(1900, 1, 1)
End Try
Try
planned_start = CType(CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Planned_Start_Date"), Label).Text, Date)
Catch ex As Exception
planned_start = New DateTime(1900, 1, 1)
End Try
Try
actual_start = CType(CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_Start_Date"), Label).Text, Date)
Catch ex As Exception
actual_start = New DateTime(1900, 1, 1)
End Try
Try
planned_end = CType(CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Planned_End_Date"), Label).Text, Date)
Catch ex As Exception
planned_end = New DateTime(1900, 1, 1)
End Try
If actual_start >= planned_start Then
dtStartDate = actual_start
Else
dtStartDate = planned_start
End If
If actual_end >= planned_end Then
dtEndDate = actual_end
Else
dtEndDate = planned_end
End If
Get_Percent_Of_Schedule = String.Format("{0:0.00}", (DateDiff(DateInterval.Day, dtStartDate, DateTime.Today) / DateDiff(DateInterval.Day, dtStartDate, dtEndDate)) * 100)
CType(KTRecordReceiverStatusInstanceFormView.FindControl("KT_Actual_End_Date"), Label).Text = "TBD"
End If
End If
End Function
End Class
ASKER
Anything further on this?
ASKER
Any further assistance on this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I changed ItemTemplate to EditItemTemplate. Is that what you meant?
I am now getting errors like: "Object reference not set to an instance of an object" on statements like this:
If CType(KTRecordReceiverStat usInstance FormView.F indControl ("KT_Actua l_End_Date "), Label).Text <> "" Then
I am obciously still missing something. What should I look for?
I am now getting errors like: "Object reference not set to an instance of an object" on statements like this:
If CType(KTRecordReceiverStat
I am obciously still missing something. What should I look for?
ASKER
I also just noticed this error message in Design View of the page.
ItemTemplate-Required.bmp
ItemTemplate-Required.bmp
ASKER
Okay, I finally understood I need BOTH an ItemTemplate and an EditItemTemplate.
But, when I click on some button to go to another page, I end up with a network error and the update is not happening.
But, when I click on some button to go to another page, I end up with a network error and the update is not happening.
ASKER
Sorry - that was misleading...
The error I get is "Internet Explorer cannot display the webpage".
The error I get is "Internet Explorer cannot display the webpage".
ASKER
I have been trying to puzzle through this. Could either of these conditions be causing my problem?
First:
I have 2 FormViews, both of which use the same datasource:
FormView ID="KTRecordReceiverStatus InstanceFo rmView"
FormView ID="KTInstanceFooter"
both use DataSourceID="KTRecordRece iverStatus InstanceDa taSource"
One FormView is used to select records, and the other used to only display fields, but now need to update 2 of those fields.
I tried adding an exact duplicate datasource and pointed the second FormView to it, but that did not seem to help.
Second:
In my datasource, I get data from a View in the database. But when I update, I need to update one of the records in a table that supplies data to the view. This is not the same as getting data from a table and updating the specific record from that table. Could this be causing my problem?
First:
I have 2 FormViews, both of which use the same datasource:
FormView ID="KTRecordReceiverStatus
FormView ID="KTInstanceFooter"
both use DataSourceID="KTRecordRece
One FormView is used to select records, and the other used to only display fields, but now need to update 2 of those fields.
I tried adding an exact duplicate datasource and pointed the second FormView to it, but that did not seem to help.
Second:
In my datasource, I get data from a View in the database. But when I update, I need to update one of the records in a table that supplies data to the view. This is not the same as getting data from a table and updating the specific record from that table. Could this be causing my problem?
ASKER
The error I was getting had to do with too much data being passed (my gridview is very large). I made an adjustment to my webconfig that has solved that problem.
So, now I am back to trying to get the FormView to update.
I tried adding AutoPostback="True" to the 2 fields I am trying to update. That did not work.
I removed the Update command and parameters from the DataSource, inserted in my VB.Net a handler called "Item_Changed" and added OnTextChanged="Item_Change d" to the 2 fields. Still no good.
So, now I am back to trying to get the FormView to update.
I tried adding AutoPostback="True" to the 2 fields I am trying to update. That did not work.
I removed the Update command and parameters from the DataSource, inserted in my VB.Net a handler called "Item_Changed" and added OnTextChanged="Item_Change
ASKER
I finally figured out I needed to put the OnTextChanged="Item_Change d" in the ItemTemplate. It works now.
are u binding the formview in the Page_Load event... if yes,bind it withing the iSPostBack property like
if Not IsPostback Then
'Bind ur formview
endif