Example #1
0
        public int Compare(object x, object y)
        {
            UltraGridCell xCell = (UltraGridCell)x;
            UltraGridCell yCell = (UltraGridCell)y;

            //return DateTime.Compare((DateTime)xCell.Row.Cells["Date"].Value, (DateTime)yCell.Row.Cells["Date"].Value);

            string strFirstIP  = xCell.Row.Cells[m_strKey].Value.ToString();
            string strSecondIP = yCell.Row.Cells[m_strKey].Value.ToString();

            if (strFirstIP == "")
            {
                return(1);
            }
            else if (strSecondIP == "")
            {
                return(-1);
            }
            else
            {
                return(IPAddressComparer.ComapreIP(strFirstIP, strSecondIP));
            }
        }