BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
GridCurrentCell cc = this.grid.CurrentCell;
this.grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Cell(cc.MovedFromRowIndex, cc.MovedFromColIndex));
2) You can set the height of the combobox button with this code.
GridComboBoxCellModel cm = (GridComboBoxCellModel)gridControl1.CellModels["ComboBox"];
cm.ButtonBarSize = new Size(cm.ButtonBarSize.Width, 20);
3) You can handle the ClipboardPaste event and paste any way you want to. Here is code that will paste mulitline text into a single cell.
grid.Model.ClipboardPaste += new GridCutPasteEventHandler(Model_ClipboardPaste); private void Model_ClipboardPaste(object sender, GridCutPasteEventArgs e) { if (CurrentCell.HasCurrentCell) { DataObject data = (DataObject) Clipboard.GetDataObject(); if(data.GetDataPresent(DataFormats.Text)) { string s = (string)data.GetData(DataFormats.Text); grid[CurrentCell.RowIndex, CurrentCell.ColIndex].Text = s; // - Or - // CurrentCell.Renderer.ControlText = s; // CurrentCell.BeginEdit(); e.Handled = true; } } }
>GridCurrentCell cc = this.grid.CurrentCell;
>this.grid.Model.RowHeights.ResizeToFit(GridRangeInfo.Cell(cc.MovedFromRowIndex, cc.MovedFromColIndex));
>
>
>2) You can set the height of the combobox button with this code.
>
>GridComboBoxCellModel cm = (GridComboBoxCellModel)gridControl1.CellModels["ComboBox"];
>cm.ButtonBarSize = new Size(cm.ButtonBarSize.Width, 20);
>
>
>3) You can handle the ClipboardPaste event and paste any way you want to. Here is code that will paste mulitline text into a single cell.
>
>>grid.Model.ClipboardPaste += new GridCutPasteEventHandler(Model_ClipboardPaste); > >private void Model_ClipboardPaste(object sender, GridCutPasteEventArgs e) >{ > if (CurrentCell.HasCurrentCell) > { > DataObject data = (DataObject) Clipboard.GetDataObject(); > if(data.GetDataPresent(DataFormats.Text)) > { > string s = (string)data.GetData(DataFormats.Text); > grid[CurrentCell.RowIndex, CurrentCell.ColIndex].Text = s; > > // - Or - > // CurrentCell.Renderer.ControlText = s; > // CurrentCell.BeginEdit(); > > e.Handled = true; > } > } >} >