private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e) { string groupkey = ""; string status = e.Row.Cells["DalamKota"].Value.ToString(); switch (status) { case "True": groupkey = "Dalam Kota"; break; case "False": groupkey = "Luar Kota"; break; } string tunai = e.Row.Cells["Cash"].Value.ToString(); switch (tunai) { case "True": groupkey += " - Tunai"; break; case "False": groupkey += " - Kredit"; break; } e.GroupKey = groupkey; }
private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e) { //string groupkey = ""; //bool bsellable = bool.Parse(e.Row.Cells["sellable"].Value.ToString()); //bool bgoods = bool.Parse(e.Row.Cells["goods"].Value.ToString()); //bool bothers = bool.Parse(e.Row.Cells["others"].Value.ToString()); //bool bupdatable = bool.Parse(e.Row.Cells["updatable"].Value.ToString()); //if (bsellable) //{ // if (bothers) // { // groupkey = "By Product"; // } // else // { // groupkey = "Product"; // } //} //else //{ // groupkey = "Supply"; //} //e.GroupKey = groupkey; }
private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e) { if (this.UseDefaultGrouping(e.Level)) { e.Handled = false; return; } Image photo = e.Row.Cells["Photo"].Value as Image; int index = images.IndexOf(photo); switch (index) { case 0: e.GroupKey = "open"; break; case 1: e.GroupKey = "paste"; break; case 2: e.GroupKey = "pdf"; break; default: e.GroupKey = "Other image"; break; } }
private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e) { string groupkey = ""; string status = e.Row.Cells["Active"].Value.ToString(); switch (status) { case "True": groupkey = "Masih Berjalan"; break; case "False": groupkey = "Lunas"; break; } e.GroupKey = groupkey; }
private void radGridView1_CustomGrouping(object sender, GridViewCustomGroupingEventArgs e) { if (this.UseDefaultGrouping(e.Level)) { e.Handled = false; return; } int color = Color.White.ToArgb(); int columnIndex = this.radGridView.Columns["Country"].Index; ConditionalFormattingObjectCollection conditions = this.radGridView.Columns[columnIndex].ConditionalFormattingObjectList; for (int i = 0; i < conditions.Count; i++) { if (conditions[i].Evaluate(e.Row, this.radGridView.Columns["Country"])) { color = conditions[i].CellBackColor.ToArgb(); } } e.GroupKey = color; }