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 to get the value of a caption summary collumn

Thread ID:

Created:

Updated:

Platform:

Replies:

70651 Dec 24,2007 04:51 AM Jan 22,2008 05:52 PM Windows Forms 5
loading
Tags: Grouping
Wills Jiang
Asked On December 24, 2007 04:51 AM

Hi,

.NET2003,Syncfustion 3.2.1.0

I try to get the value of a caption summary collumn.but can't get the rowindex of it(it return -1 for a summary row on caption).

how to do it.

need your help.
Thanks.


haneefm [Syncfusion]
Replied On December 27, 2007 04:12 PM

Hi Wills,

Please refer to the below forum threads and let me know if this helps.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=24926
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=49480

Best regards,
Haneef


Wills Jiang
Replied On December 30, 2007 02:17 AM

Thanks for your reply.

I have went through the articles.It is useful.

But Actrually what I want to do is:

Mouse click a cell of the GroupingControl,and get the value from a raw data row and a summary row on caption.
I can get value of raw data row ,but cann't for summary row on caption


haneefm [Syncfusion]
Replied On January 4, 2008 02:02 PM

Hi Wills,

To get get the CaptionText in TableControlCellClick event, please try these code.

void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo Style = e.TableControl.Table.GetTableCellStyle(e.Inner.RowIndex, e.Inner.ColIndex) as GridTableCellStyleInfo;
Element el = Style.TableCellIdentity.DisplayElement;
if (el.Kind == DisplayElementKind.Caption)
{
string CaptionText = el.GetCaptionSection().ParentGroup.CategoriesToString();
Console.WriteLine(CaptionText);

}
}

Best regards,
Haneef


Wills Jiang
Replied On January 14, 2008 03:46 AM

Hi Haneef,

Thanks for your reply.

I tried the code,
but it prompts a message:
'Syncfusion.Grouping.Element' does not contain a definition for 'GetCaptionSection'

hot to solve it?

Thanks a lot.

Regards
Wills


haneefm [Syncfusion]
Replied On January 22, 2008 05:52 PM

Hi Wills,

You can use the below code snippet to get the caption section from the element.

public CaptionSection GetCaptionSection(Element el)
{
CaptionSection cs = el as CaptionSection;
if (cs == null && el != null)
cs = el.ParentSection as CaptionSection;
return cs;
}

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.

;