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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to check the the row belongs to nested table

Thread ID:





34110 Sep 2,2005 05:34 AM UTC Sep 6,2005 08:27 AM UTC WinForms 6
Tags: GridControl
prathima venkobachar
Asked On September 2, 2005 05:34 AM UTC

Hi, I am using this.groupingGridControl.TableControl.ScrollTipFeedback += new ScrollTipFeedbackEventHandler(TableControl_ScrollTipFeedback); event. private void TableControl_ScrollTipFeedback(object sender, ScrollTipFeedbackEventArgs e) { Element el = this.ggdAssetView.SyncfusionGridControl.Table.NestedDisplayElements.GetItemAtYAmount(e.Value); if(el is GridRecordRow) { if (this.ggdAssetView.SyncfusionGridControl.TableDescriptor.Fields.IndexOf(DBColumns.AssetName) > -1) { e.Text = ((GridRecordRow)el).ParentRecord.GetValue(DBColumns.AssetName).ToString(); e.Location = new Point(700, 400); e.Size = new System.Drawing.Size(300, 15); } } } Here I am trying set tool tip text. It to set e.text even when it is a row from a nested table.There it gives "Object reference not set an instance". So I want to a make a check if it is a nested table row..it should still be displaying from the parent table column text. Thanks, Prathima

Administrator [Syncfusion]
Replied On September 2, 2005 08:53 AM UTC

Here is a little sample that shows values from the "Name" column in the 2 inner most tables when their records is at the top. It does so without getting exceptions by using the underlying data object to retrieve the values. http://www.syncfusion.com/Support/user/uploads/GGC_ScrollTips_dd1d3650.zip When the display element at the top is not a record with a "Name" field, it shows the default display values for that particular kind of display element. What different behavior do you want?

prathima venkobachar
Replied On September 2, 2005 10:35 AM UTC

Example is very nice !! It works fine. It would be nice when it scrolls through nested table it display only "ParentID=1" insted of "Category: [ChildTable] 1-Items parentID=1" Can we do this..? Thanks, Prathima

Administrator [Syncfusion]
Replied On September 2, 2005 03:17 PM UTC

You can hack it using the code below. Or, if you have our source code, you can dig through OnScrollTipFeedback in \Windows\Grid.Grouping.Windows\Src\Controls\GridTableControl.cs to see how it prepares that string.
private void TableControl_ScrollTipFeedback(object sender, Syncfusion.Windows.Forms.ScrollTipFeedbackEventArgs e)
	int i = e.Text.IndexOf("Items");
	if(i > -1 && e.Text.StartsWith("Category") )
		e.Text = e.Text.Substring(i + 6);
		e.Size = new Size(200, 20);
		e.Text = " AddNewRow ";

	Element el = this.gridGroupingControl1.Table.NestedDisplayElements.GetItemAtYAmount(e.Value);
	if(el is GridRecordRow) 
		DataRowView drv = el.GetData() as DataRowView;
		if (drv != null && drv.Row.Table.Columns.IndexOf("Name") > -1) 
			e.Text = drv["Name"].ToString();
			e.Size = new Size(200, 20);

prathima venkobachar
Replied On September 6, 2005 05:09 AM UTC

Thanks for the reply. I don''t have grid.grouping.Windows. If I don''t want to show scroll tool tips at all in case of nested table and when there is a grouping..how can I do it..? I tried with e.cancel = true.But it doesn''t seems like working. Thanks, Prathima

Administrator [Syncfusion]
Replied On September 6, 2005 07:41 AM UTC

To not show the sceolltips when grouped, you can unsubscribe to the event when the grid is grouped, and resubscribe when the grid is no longer grouped. The simplest thing to do to hide individual scrolltips, but keep others, would be to set the size to empty. e.Size = Size.Empty;

prathima venkobachar
Replied On September 6, 2005 08:27 AM UTC

Good Idea.Thanks a lot !!


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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