private static void AddPreviousCategory(string captionName, Widget dataset, Widget prevRow, WidgetCollection temp, params string [] args) { Widget data = dataset.Use<Widget>(Convert.ToString(prevRow[captionName])); foreach (string i in args) { string[] item = i.Split('='); if (item.Length == 1 && prevRow.ContainsKey(item[0])) { data[i] = prevRow[item[0]]; } else if (item.Length > 1) { string key = item[0]; item[0] = string.Empty; data[key] = string.Join("=", item).Substring(1); } } data["rows"] = temp; }