I was looking for how I can hide all buttons in listview, by calling a function, without needing to populate data to the listview again (not using the ItemDataBound event).
Here's the solution I've found, it's so simple!
private void ShowButtons(bool show)
{
foreach (ListViewItem item in lvwQuotations.Items)
{
((Button)item.FindControl("btnView")).Visible = show;
}
}
No comments:
Post a Comment