A
André
Hi,
I made a detailsview containing several fields for inserting only. I also
made a dropdownlist which is invisible at start.
Now, when clicking in a particular textbox, the dropdownlist must become
visible (in order to put the selected value of the dropdownlist into the
textbox of the detailsgrid.). I must say, the detailsview contains
textboxes, but also a checkbox.
I tried a lot of things, but i don't know which events to take:
<aspetailsView ID="DetailsView1" runat="server"
DataSourceID="SqlDataSource1
.....
<aspropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource2"
.....
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
....
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
.....
In the code-behind, i tried thinks like:
Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DetailsView1.DataBound
Dim a As DataControlField
a = DetailsView1.Fields(5)
if ??? then
dropdownlist1.visible=True
end if
End Sub
or
Protected Sub DetailsView1_ItemInserting(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertEventArgs) Handles
DetailsView1.ItemInserting
Dim a As New TextBox
a = DetailsView1.Rows(2)
if ??? then
dropdownlist1.visible=True
end if
End Sub
Can somebody tell me which event to take and how to check if the mouse is
clicked in the right textbox?
Thanks
André
I made a detailsview containing several fields for inserting only. I also
made a dropdownlist which is invisible at start.
Now, when clicking in a particular textbox, the dropdownlist must become
visible (in order to put the selected value of the dropdownlist into the
textbox of the detailsgrid.). I must say, the detailsview contains
textboxes, but also a checkbox.
I tried a lot of things, but i don't know which events to take:
<aspetailsView ID="DetailsView1" runat="server"
DataSourceID="SqlDataSource1
.....
<aspropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource2"
.....
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
....
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
.....
In the code-behind, i tried thinks like:
Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DetailsView1.DataBound
Dim a As DataControlField
a = DetailsView1.Fields(5)
if ??? then
dropdownlist1.visible=True
end if
End Sub
or
Protected Sub DetailsView1_ItemInserting(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertEventArgs) Handles
DetailsView1.ItemInserting
Dim a As New TextBox
a = DetailsView1.Rows(2)
if ??? then
dropdownlist1.visible=True
end if
End Sub
Can somebody tell me which event to take and how to check if the mouse is
clicked in the right textbox?
Thanks
André