Hi,
I have opened update form after save then dropdown selected value is not showing in the UI.
<
telerik:RadGrid
ID
=
"AttachmentGrid"
GridLines
=
"None"
runat
=
"server"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"False"
AllowPaging
=
"True"
DataSourceID
=
"AttachmentDataSource"
Skin
=
"Metro"
AllowSorting
=
"True"
AutoGenerateDeleteColumn
=
"False"
OnItemCommand
=
"AttachmentGrid_ItemCommand"
>
<
MasterTableView
Width
=
"100%"
DataKeyNames
=
"id"
DataSourceID
=
"AttachmentDataSource"
HorizontalAlign
=
"NotSet"
AutoGenerateColumns
=
"False"
EditMode
=
"PopUp"
>
<
telerik:GridTemplateColumn
UniqueName
=
"InitiatorName"
Groupable
=
"False"
HeaderText
=
"Which entity or company did you receive this file from?"
DataField
=
"InitiatorName"
Visible
=
"false"
>
<
headerstyle
width
=
"1000px"
/>
<
itemtemplate
>
<%#DataBinder.Eval(Container.DataItem, "InitiatorName")%>
</
itemtemplate
>
<
edititemtemplate
>
<
asp:DropDownList
ID
=
"InitiatorName"
runat
=
"server"
CssClass
=
"textbox"
SelectedValue='<%# Bind("InitiatorName") %>'
DataSourceID="CompanyNameDataSource" DataTextField="InitiatorName" Width="300px"
DataValueField="InitiatorName" OnSelectedIndexChanged="InitiatorName_SelectedIndexChanged"
AutoPostBack="true">
</
asp:DropDownList
>
<
asp:RequiredFieldValidator
ID
=
"ReqInitiatorName"
runat
=
"server"
ControlToValidate
=
"InitiatorName"
ErrorMessage
=
"Please Select a Company Name"
Display
=
"Dynamic"
SetFocusOnError
=
"true"
/>
</
edititemtemplate
>
<
asp:SqlDataSource
ID
=
"CompanyNameDataSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:TaskManagementConnectionString %>"
SelectCommand="select distinct InitiatorName from t_TaskMaster where (InitiatorName<>'' and InitiatorName is not null )union all select '' order by InitiatorName asc">
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"AttachmentDataSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:TaskManagementConnectionString %>"
SelectCommand="SELECT id,refid,[filename],[Description],[Content],upper(Status) as [Status],DateUpdated,UpdatedBy, isnull(FileCategory,'') as FileCategory ,isnull(FileMainCategory,'') as FileMainCategory,isnull([MainClassofInsurance],'') as [MainClassofInsurance],isnull([InitiatorName],'') as [InitiatorName],emailrefid FROM [t_Attachments] WHERE (FileCategory is null or FileCategory='') and (([UpdatedBy] = @UpdatedBy)) AND [Status] <>'DELETED' and refid<>'0'"
DeleteCommand="delete from t_Attachments where id=@id ">
<
SelectParameters
>
<
asp:SessionParameter
Name
=
"UpdatedBy"
SessionField
=
"UserName"
Type
=
"String"
/>
</
SelectParameters
>
</
asp:SqlDataSource
>
PLease help me on this why it's not showing selected value even SelectedValue='<%# Bind("InitiatorName") %>' is there ?