AnalysisCrash.Form1.FillGridView C# (CSharp) Method

FillGridView() private method

private FillGridView ( ) : void
return void
        void FillGridView()
        {
            dgRules.Rows.Clear();

            XmlDocument xml = new XmlDocument();
            xml.Load("RegexRules.xml");
            XmlElement node = xml.DocumentElement;

            dgRules.Rows.Add(node.ChildNodes.Count - 1);

            int i = 0;
            foreach (XmlNode item in node.ChildNodes)
            {
                dicRegexRule[item.Attributes["name"].InnerText] = new RegexRule(item.Attributes["from"].InnerText, item.Attributes["to"].InnerText);

                dgRules.Rows[i].Cells[0].Value = item.Attributes["from"].InnerText;
                dgRules.Rows[i].Cells[1].Value = item.Attributes["to"].InnerText;

                i++;
            }
        }