Function to find the given string in the listView control in any column
sureshv2 posted on December 22, 2008 :: 401 views
//*** This function will return the Matching Index from the List view. If not found it will return -1
//
//
public static int Find_ListView(ref Gizmox.WebGUI.Forms.ListView lvwTmp, string strFindString, int intFindColumn)
{
for (int intLoop = 0; intLoop < lvwTmp.Items.Count; intLoop++)
{
if (lvwTmp.Items[intLoop].SubItems[intFindColumn].Text.CompareTo(strFindString) == 0) return intLoop;
}
return -1;
}