I have a Rating control in a FormView which is populated using a SQLDataSource.
My issue is that when I attempt to update the data, the rating is not updated and the field value is ste to null.
How can I use the Rating control in the update portion of the formview?
Thanks in advance.
<asp:FormView ID=
"FormView2"
runat=
"server"
DataKeyNames=
"IDProjectsMaster"
DataSourceID=
"sds_MasterProjects"
>
<EditItemTemplate>
<table cellpadding=
"3"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Project Subject:</td>
<td>
<asp:TextBox ID=
"SubjectTextBox"
runat=
"server"
Text=
'<%# Bind("Subject") %>' Width="400px" />
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator1"
runat=
"server"
ControlToValidate=
"SubjectTextBox"
ErrorMessage=
"*"
Font-Bold=
"True"
Font-Size=
"Medium"
ForeColor=
"#FF3300"
></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Enter
Date
:</td>
<td>
<asp:Label ID=
"EnterDateLabel"
runat=
"server"
Text=
'<%# Bind("EnterDate","{0:d}") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Completion
Date
:</td>
<td>
<telerik:RadDatePicker ID=
"RadDatePicker2"
Runat=
"server"
Culture=
"English (United States)"
DbSelectedDate=
'<%# Bind("ResolutionDate") %>'>
<Calendar ID=
"Calendar2"
Runat=
"server"
UseColumnHeadersAsSelectors=
"False"
UseRowHeadersAsSelectors=
"False"
ViewSelectorText=
"x"
>
</Calendar>
<DatePopupButton HoverImageUrl=
""
ImageUrl=
""
/>
<DateInput ID=
"DateInput2"
Runat=
"server"
DateFormat=
"M/d/yyyy"
DisplayDateFormat=
"M/d/yyyy"
>
</DateInput>
</telerik:RadDatePicker>
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Technician: </td>
<td>
<asp:DropDownList ID=
"ddl_IDAssignedTech"
runat=
"server"
AppendDataBoundItems=
"True"
DataSourceID=
"sds_Technician"
DataTextField=
"FullName"
DataValueField=
"ActiveDirID"
Text=
'<%# Bind("IDAssignedTech") %>'>
<asp:ListItem Text=
"Select"
Value=
"0"
/>
<asp:ListItem Text=
"Team"
Value=
"1"
/>
</asp:DropDownList>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator2"
runat=
"server"
ControlToValidate=
"ddl_IDAssignedTech"
ErrorMessage=
"*"
Font-Bold=
"True"
Font-Size=
"Medium"
ForeColor=
"#FF3300"
></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Priority:</td>
<td>
<telerik:RadRating ID=
"RadRating1"
Runat=
"server"
ReadOnly
=
"True"
Skin=
"WebBlue"
Value=
'<%# Eval("Priority") %>'>
</telerik:RadRating>
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 110px"
>
Project Deadline:</td>
<td>
<telerik:RadDatePicker ID=
"RadDatePicker3"
Runat=
"server"
Culture=
"English (United States)"
DbSelectedDate=
'<%# Bind("ResolutionDeadline") %>'>
<Calendar ID=
"Calendar3"
Runat=
"server"
UseColumnHeadersAsSelectors=
"False"
UseRowHeadersAsSelectors=
"False"
ViewSelectorText=
"x"
>
</Calendar>
<DatePopupButton HoverImageUrl=
""
ImageUrl=
""
/>
<DateInput ID=
"DateInput3"
Runat=
"server"
DateFormat=
"M/d/yyyy"
DisplayDateFormat=
"M/d/yyyy"
>
</DateInput>
</telerik:RadDatePicker>
</td>
</tr>
</table>
<h2>
Project Details:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:TextBox ID=
"tbx_Projects"
runat=
"server"
Text=
'<%# Bind("MasterProject") %>'
Height=
"100px"
TextMode=
"MultiLine"
Width=
"625px"
/>
</td>
</tr>
</table>
<h2>
Comments:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:TextBox ID=
"tbx_Comment"
runat=
"server"
Text=
'<%# Bind("Comment") %>'
Height=
"100px"
TextMode=
"MultiLine"
Width=
"625px"
/>
</td>
</tr>
</table>
<h2>
Notes:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:TextBox ID=
"tbx_Notes"
runat=
"server"
Text=
'<%# Bind("Notes") %>'
Height=
"100px"
TextMode=
"MultiLine"
Width=
"625px"
/>
</td>
</tr>
</table>
<br />
<asp:Button ID=
"UpdateButton"
runat=
"server"
CausesValidation=
"True"
CommandName=
"Update"
Text=
"Update"
/>
<asp:Button ID=
"UpdateCancelButton"
runat=
"server"
CausesValidation=
"False"
CommandName=
"Cancel"
Text=
"Cancel"
/>
</EditItemTemplate>
<ItemTemplate>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td>
</td>
</tr>
</table>
<table cellpadding=
"3"
cellspacing=
"0"
style=
"width: 100%"
>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Project Subject:</td>
<td>
<asp:Label ID=
"SubjectLabel"
runat=
"server"
style=
"font-weight: 700"
Text=
'<%# Bind("Subject") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Enter
Date
:</td>
<td>
<asp:Label ID=
"EnterDateLabel"
runat=
"server"
Text=
'<%# Bind("EnterDate","{0:d}") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Deadline
Date
:</td>
<td>
<asp:Label ID=
"lbl_DealineDate"
runat=
"server"
Text=
'<%# Bind("ResolutionDeadline","{0:d}") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Completion
Date
:</td>
<td>
<asp:Label ID=
"ResolutionDateLabel"
runat=
"server"
Text=
'<%# Bind("ResolutionDate","{0:d}") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Technician: </td>
<td>
<asp:Label ID=
"FullNameLabel"
runat=
"server"
Text=
'<%# Bind("FullName") %>' />
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Priority:</td>
<td>
<telerik:RadRating ID=
"RadRating1"
Runat=
"server"
ReadOnly
=
"True"
Skin=
"WebBlue"
Value=
'<%# Eval("Priority") %>'>
</telerik:RadRating>
</td>
</tr>
<tr>
<td class=
"tbltd"
style=
"width: 112px"
>
Project Deadline:</td>
<td>
<asp:Label ID=
"ResolutionDeadlineLabel"
runat=
"server"
Text=
'<%# Bind("ResolutionDeadline","{0:d}") %>' />
</td>
</tr>
</table>
<h2>
Project Details:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 800px"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:Label ID=
"ProjectLabel"
runat=
"server"
Text=
'<%# Eval("MasterProject").ToString().Replace(Environment.NewLine,"<br />") %>' />
</td>
</tr>
</table>
<h2>
Comments:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 800px"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:Label ID=
"CommentLabel"
runat=
"server"
Text=
'<%# Eval("Comment").ToString().Replace(Environment.NewLine,"<br />") %>' />
</td>
</tr>
</table>
<h2>
Notes:</h2>
<table cellpadding=
"0"
cellspacing=
"0"
style=
"width: 800px"
>
<tr>
<td style=
"width: 101px"
>
</td>
<td>
<asp:Label ID=
"NotesLabel"
runat=
"server"
Text=
'<%# Eval("Notes").ToString().Replace(Environment.NewLine,"<br />") %>' />
</td>
</tr>
</table>
<br />
<asp:Button ID=
"EditButton"
runat=
"server"
CausesValidation=
"False"
CommandName=
"Edit"
Text=
"Edit"
/>
<asp:Button ID=
"Button2"
runat=
"server"
Text=
"Delete"
onclick=
"Button2_Click"
/>
</ItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID=
"sds_MasterProjects"
runat=
"server"
ConnectionString=
"<%$ ConnectionStrings:IT_CentralConnectionString %>"
DeleteCommand=
"DELETE FROM [ITC_ProjectsMaster]"
InsertCommand=
""
SelectCommand=
"SELECT [IDProjectsMaster], [EnterDate], [ResolutionDeadline], [ResolutionDate], [FullName], [Subject], [MasterProject], [Priority], [Comment], [Notes], [IDAssignedTech] FROM [vw_ITC_Projects_Masters] WHERE [IDProjectsMaster] = @IDProjectsMaster"
UpdateCommand=
"UPDATE [ITC_Projects_Masters] SET [EnterDate] = @EnterDate, [ModifiedDate] = @ModifiedDate, [IDModifiedUser] = @IDModifiedUser, [ResolutionDeadline] = @ResolutionDeadline, [ResolutionDate] = @ResolutionDate, [IDAssignedTech] = @IDAssignedTech, [Subject] = @Subject, [MasterProject] = @MasterProject, [Priority] = @Priority, [Comment] = @Comment, [Notes] = @Notes WHERE [IDProjectsMaster] = @IDProjectsMaster"
>
<InsertParameters>
<asp:Parameter Name=
"EnterDate"
Type=
"DateTime"
/>
</InsertParameters>
<SelectParameters>
<asp:QueryStringParameter Name=
"IDProjectsMaster"
QueryStringField=
"IDProjectsMaster"
Type=
"Int32"
/>
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name=
"EnterDate"
Type=
"DateTime"
/>
<asp:Parameter Name=
"ModifiedDate"
Type=
"DateTime"
/>
<asp:Parameter Name=
"IDModifiedUser"
Type=
"Int32"
/>
<asp:Parameter Name=
"ResolutionDeadline"
Type=
"DateTime"
/>
<asp:Parameter Name=
"ResolutionDate"
Type=
"DateTime"
/>
<asp:Parameter Name=
"IDAssignedTech"
Type=
"String"
/>
<asp:Parameter Name=
"Subject"
Type=
"String"
/>
<asp:Parameter Name=
"MasterProject"
Type=
"String"
/>
<asp:Parameter Name=
"Priority"
Type=
"Decimal"
/>
<asp:Parameter Name=
"Comment"
Type=
"String"
/>
<asp:Parameter Name=
"Notes"
Type=
"String"
/>
<asp:Parameter Name=
"IDProjectsMaster"
Type=
"Int32"
/>
</UpdateParameters>
</asp:SqlDataSource>
My issue is that when I attempt to update the data, the rating is not updated and the field value is ste to null.
How can I use the Rating control in the update portion of the formview?
Thanks in advance.