Hi,
I add textbox in code-behind like that :
So, i would like that my textbox will be visible if another field of that datasource =1 and every texbox will be visible or not(not all). Thanks!
I add textbox in code-behind like that :
Public
Sub
New
(
ByVal
cName
As
String
)
colname = cName
End
Sub
Public
Sub
InstantiateIn(
ByVal
container
As
System.Web.UI.Control)
Implements
ITemplate.InstantiateIn
textBox =
New
TextBox()
textBox.Width = 27
container.Controls.Add(textBox)
AddHandler
textBox.DataBinding,
AddressOf
textValue_DataBinding
End
Sub
Sub
textValue_DataBinding(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
Dim
MyTextBox
As
TextBox =
DirectCast
(sender, TextBox)
Dim
container
As
GridDataItem =
DirectCast
(MyTextBox.NamingContainer, GridDataItem)
MyTextBox.Text =
DirectCast
((
DirectCast
(container.DataItem, DataRowView))(colname),
Integer
)
End
Sub
End
Class
So, i would like that my textbox will be visible if another field of that datasource =1 and every texbox will be visible or not(not all). Thanks!