or
Protected
Sub
ImageButtonRicerca_Click(sender
As
Object
, e
As
System.Web.UI.ImageClickEventArgs)
Handles
ImageButtonRicerca.Click
Response.Redirect(
"Resultsearch.aspx?_str1="
& Txt_ricerca1.Text &
"&_str2="
& Txt_ricerca2.Text)
End
Sub
Dim
lista
As
List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
RadListView1.DataSource = lista
RadListView1.DataBind()
protected
void
gridCPDiag_SortCommand(
object
source, GridSortCommandEventArgs e)
{
GridTableView tableView = e.Item.OwnerTableView;
if
(e.Item.OwnerTableView.Name ==
"Detail2"
&& e.SortExpression ==
"VisitFrequency"
)
{
e.Canceled =
true
;
GridSortExpression expression =
new
GridSortExpression();
expression.FieldName =
"VisitFrequency"
;
if
(tableView.SortExpressions.Count == 0 || tableView.SortExpressions[0].FieldName !=
"VisitFrequency"
)
{
expression.SortOrder = GridSortOrder.Descending;
}
else
if
(tableView.SortExpressions[0].SortOrder == GridSortOrder.Descending)
{
expression.SortOrder = GridSortOrder.Ascending;
}
else
if
(tableView.SortExpressions[0].SortOrder == GridSortOrder.Ascending)
{
expression.SortOrder = GridSortOrder.None;
}
tableView.SortExpressions.AddSortExpression(expression);
tableView.Rebind();
}
}
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 ?