Well, that didnt work for me. What i want is to make the entire row
invisible.
<asp:DataGrid ....... bla bla....>
<asp:BoundColumn DataField="U_Username" SortExpression="U_Username"
HeaderText="<strong>Username</strong>" />
<asp:BoundColumn DataField="A_LEVELNAAM" SortExpression="A_LEVELNAAM"
HeaderText="<strong>Level</strong>" />
<asp:BoundColumn DataField="U_Posts" SortExpression="U_Posts"
HeaderText="<strong>Posts</strong>" />
<asp:BoundColumn DataField="U_Registered_On"
SortExpression="U_Registered_On" HeaderText="<strong>Date
Registered</strong>" />
<asp:BoundColumn DataField="U_Last_Logged_In"
SortExpression="U_Last_Logged_In" HeaderText="<strong>Last Active</strong>"
/>
</columns>
</asp:DataGrid>
Whenever a username equels "Deleted_User" i would like that the entire row
would be invisible not only the username but every column.
If it's possible i'd like the example/code in VB. my C# aint good. :D
thx in advance Richard
"avnrao" <av*@newsgroups.com> schreef in bericht
news:uq**************@TK2MSFTNGP09.phx.gbl...
use this..
private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if((e.Item.FindControl("") as Label).Text == "Deleted_User")
e.Item.Visible = false;
}
Av.
"Richard" <ri*****@nospam.com> wrote in message
news:40***********************@newsreader.eweka.nl ... After printing a userlist to a Datagrid i want some names not to be
shown. I
want to know how i can make a entire datagrid row invisible.
I suspect its something with the OnItemDatabound but i am kinda stuck
there.
but this is basicly what i want.
if Username = "Deleted_User" then
'make entire table row invisible.
End if
I hope someone can give me the code on how i can accomplish this. Thx in
advance.
Richard