S
simon
I have template column in dataGrid and visible=false.
<asp:TemplateColumn visible=false>
<ItemTemplate><asp:CheckBox Runat=server ID=chkExists Checked='<%# Container.DataItem( "obstaja" ) % >'></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
When user clicks link button in dataGrid I check the chkExists value:
Private Sub dgdAdvert_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgdAdvert.ItemCommand
If e.CommandName = "AdvName" Then
exists = CType(e.Item.Cells(5).Controls(0), CheckBox).Checked
...
...
end if
end sub
If exists=true then I disable some fields for update.
If I have <asp:TemplateColumn visible=false> then exists is always false.
If I have <asp:TemplateColumn visible=true> then it works fine, exists is true or false.
But I don't want that user see the template column, I have it only for checking the exists value.
Where is the problem?
Thank you,
Simon
<asp:TemplateColumn visible=false>
<ItemTemplate><asp:CheckBox Runat=server ID=chkExists Checked='<%# Container.DataItem( "obstaja" ) % >'></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
When user clicks link button in dataGrid I check the chkExists value:
Private Sub dgdAdvert_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgdAdvert.ItemCommand
If e.CommandName = "AdvName" Then
exists = CType(e.Item.Cells(5).Controls(0), CheckBox).Checked
...
...
end if
end sub
If exists=true then I disable some fields for update.
If I have <asp:TemplateColumn visible=false> then exists is always false.
If I have <asp:TemplateColumn visible=true> then it works fine, exists is true or false.
But I don't want that user see the template column, I have it only for checking the exists value.
Where is the problem?
Thank you,
Simon