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.
Syncfusion Feedback

GGC & Frozen summary row

Thread ID:

Created:

Updated:

Platform:

Replies:

61778 Jun 1,2007 01:53 PM UTC Jun 11,2007 09:14 PM UTC Windows Forms 3
loading
Tags: GridControl
Srdjan
Asked On June 1, 2007 01:53 PM UTC

As the title says.

It is impractical for my users to see summaries on the bottom row because some grids contain a lot of data.

I need this summary row frozen to the bottom.

What are my options??

Thanks.

haneefm [Syncfusion]
Replied On June 1, 2007 06:09 PM UTC

Hi Srdjan,

You can only freeze rows at the top of a grid. There are two techinique to resolve this issue. One way to get a totalrow at the bottom is to use two grids, one your normal grid and the other a single row grid at the bottom on the normalgrid.

KB Link : http://www.syncfusion.com/Support/article.aspx?id=10398

The KB sample has a total grid under the primary grid. The total grid exposes two events, one that is fired once to initialize the summary row, and a second event that is fireed any time a cell changes so you can modify the summary row to reflect your users editing the information.

Secon way to fix a summary row at top. You can do this by overriding the OnInitializeSections method of the GridGroup class and CreateChildTable / GridChildTable class. When you add the CreateSummarySection before the CreateRecordsDetails or CreateGroupsDetails section then the Summary row will be shown before the details. This will assist you to point the summary row above all the rows. Doing this will also freeze the summary row from getting scrolled.

Here is a sample that show this
http://websamples.syncfusion.com/samples/Grid.Windows/Incident34309/main.htm

See, the below forum thread for placing multiple summary at top:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=48942

Best regards,
Haneef

Srdjan
Replied On June 11, 2007 01:40 PM UTC

Thanks for your sample. I have decided to use GridControl for summaries.

I have modified your sample a bit and it works.

However, moving columns doesn't work. Can you give me code snippet to show me how to sync columns of GGC control and GridControl.

Thanks in advance.



WindowsApplication82.zip

haneefm [Syncfusion]
Replied On June 11, 2007 09:14 PM UTC

Hi Srdjan,

You can handle the TableControlQueryAllowDragColumn event and move the corresponding SummaryGrid column by using the MoveRange method. Here is a code snippet

void grid_TableControlQueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
{
if (e.Reason == GridQueryAllowDragColumnReason.MouseUp)
{
int ColIndex = e.TableControl.TableDescriptor.NameToField(e.Column);
ColIndex = e.TableControl.TableDescriptor.FieldToColIndex(ColIndex);
int insertColIndex = e.TableControl.TableDescriptor.NameToField(e.InsertBeforeColumn);
insertColIndex = e.TableControl.TableDescriptor.FieldToColIndex(insertColIndex);
sumRow.summaryGrid.Cols.MoveRange(ColIndex, insertColIndex - 1);
}
}

Here is a modified sample that shows this task
ModifiedWindowsApplication82.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.

Warning Icon 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.Close Icon

;