This blog is about my history as a software engineer utilizing technologies C#, Java, React, JavaScript, .NET Core, SQL Server , Oracle, GIT, GitHub, Jira, Azure, AWS and HTML5. “I have not failed. I've just found 10,000 ways that won't work.” Thomas A. Edison. Please click on all my ADVERTISING links to help support this blog. Thank you.
Tuesday, February 19, 2013
DropDownList set dl.SelectedValue
Private Sub dg_srvc_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg_srvc.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
Dim dl_span As DropDownList
Dim t As Label
dl_span = CType(e.Item.FindControl("dl_span"), DropDownList)
dl_span.SelectedValue = dl_span.Items.IndexOf(dl_span.Items.FindByText(s_span.Trim.ToLower))
t = CType(e.Item.FindControl("temp"), Label)
t.Text = s_span.Trim
End If
WARNING: ENSURE your values if hard coded match the value from the DB...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment