We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How can I write to any cell or range of cells in the ggc from outside the ggc, for example, from a button click event?

Thread ID:

Created:

Updated:

Platform:

Replies:

56194 Feb 10,2007 11:54 AM Feb 14,2007 06:08 PM Windows Forms 3
loading
Tags: Grouping
James Blibo
Asked On February 10, 2007 11:54 AM

How can I write to any cell or range of cells from out the ggc, for example, from a button click event?

Can the text that I am writing to a cell is greater than the length of the cell, how can I make the cell automatically overflow?

Administrator [Syncfusion]
Replied On February 13, 2007 08:17 PM

Hi James,

The Floatingcells is the terminology that is used for the cells whose content occupies adjacent empty cells. In this manner, the values float on the next cells. The Floatingcells ( \Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Windows\Samples\Appearance\FloatingCells\ )browser sample will show you Essential Grid’s support for floating cells and how to initialize it.

Best regards,
Haneef

James Blibo
Replied On February 13, 2007 09:24 PM

This still doesn't answer the question. Besides, the samples is specific to the grid control and NOT the grouping grid control. My question was more about how to write to any cell in the ggc from outside the ggc, say from a button click event for example, than about floating cell.

Administrator [Syncfusion]
Replied On February 14, 2007 06:08 PM

Hi James,

1) How can I write to any cell or range of cells from out the ggc, for example, from a button click event?
>>>>>>
Use the TableModel indexer property to write the cell from button click event. Please try the code snippet.

foreach(GridRangeInfo info in this.gridGroupingControl1.TableModel.SelectedRanges)
{
for(int i = info.Top ;i <= info.Bottom ;i++)
for(int j = info.Left ;j <= info.Right ;j++)
this.gridGroupingControl1.TableModel[i,j].Text ="Yes";

}

2) Floating...
>>>>>>
There is no built-in support for this. But one way you can do this by handling the TableModel.QueryCoveredRange event and set the e.Range to overflow range in a grid. Here is a code snippet

private void TableModel_QueryCoveredRange(object sender, GridQueryCoveredRangeEventArgs e)
{
GridTableModel tm = sender as GridTableModel;
if( e.ColIndex + 1 < tm.ColCount && tm[e.RowIndex,e.ColIndex + 1 ].Text == string.Empty )
{
e.Range = GridRangeInfo.Cells(e.RowIndex,e.ColIndex,e.RowIndex,e.ColIndex + 1);
e.Handled = true;
}
}

Here is a sample.
GGCFloatCellANDWrite.zip

Best regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;