void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
cr = this.gridGroupingControl1.TableControl.CurrentCell.Renderer as GridComboBoxCellRenderer;
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex);
if (cr != null && cr.ListBoxPart.SelectedValue != null)
{
int rowIndex = this.gridGroupingControl1.TableControl.CurrentCell.RowIndex;
if (!String.IsNullOrEmpty(style.TableCellIdentity.DisplayElement.GetRecord().GetValue("ValueList").ToString()))
value += "," + cr.ListBoxPart.SelectedValue.ToString();
else
value = cr.ListBoxPart.SelectedValue.ToString();
if (!String.IsNullOrEmpty(style.TableCellIdentity.DisplayElement.GetRecord().GetValue("DisplayList").ToString()))
displayvalue += "," + (((DataRowView)cr.ListBoxPart.SelectedItem).Row["Display Items"]).ToString();
else
displayvalue = (((DataRowView)cr.ListBoxPart.SelectedItem).Row["Display Items"]).ToString();
if (!string.IsNullOrEmpty(cr.ListBoxPart.SelectedValue.ToString()))
{
style.TableCellIdentity.DisplayElement.GetRecord().SetValue("ValueList", value);
style.TableCellIdentity.DisplayElement.GetRecord().SetValue("DisplayList", displayvalue);
this.gridGroupingControl1.TableControl.RefreshRange(GridRangeInfo.Row(rowIndex));
}
}
} |