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.

QueryCellInfo and GetRecordFromRow

Thread ID:

Created:

Updated:

Platform:

Replies:

109603 Jun 23,2013 04:31 PM Sep 10,2013 08:54 AM WPF 4
loading
Tags: GridControl
Eugene
Asked On June 23, 2013 04:31 PM

Hi all,

I'm using syncfusion GridDataControl and I need to set ToolTip for each row. 

I use Behavior<GridDataControl> and QueryCellInfo event. I get row by AssociatedObject.Model.Table.GetRecordFromRow(e.Cell.RowIndex) code. Everything was good before I group data by one of column. After I do this GetRecordFromRow stop to work. Some rows I can handle by this code

                        if (AssociatedObject.Model.Table.HasGroups)
                        {
                            rowIndex = e.Cell.RowIndex - 1;
                        }
But this workaround isn't help for all rows.

Eugene
Replied On June 23, 2013 04:42 PM

There are http://www.syncfusion.com/support/forums/grid-wpf/98774 same post but I'm not able to download example 

Rajasekar G [Syncfusion]
Replied On June 24, 2013 04:38 PM

Hi Eugene, 

Thank you for contacting Syncfusion support.

 We have analayzed query and we are not able to understand your exact scenorio. So could you please share more details like in which value do you want to show in Tooltip for each row(Record  , Group caption row) .

 Please let us know if you have any questions. 

Regards,

Rajasekar


Eugene
Replied On June 25, 2013 03:50 PM

Hi Rajasekar,

I've attached sample. When I expanded groups I'm getting exception ArgumentOutException. Even if I wrap it by try catch It will ask only about last row as I can see from debugger. 

This code is working if I remove grouping. 

Regards,
Eugene Zavgorodny.


Custom Grouping Demo_d213babc.zip

Saravanan M [Syncfusion]
Replied On September 10, 2013 08:54 AM

Hi Eugene,

We have analyzed your issue, there is no corresponding record for the row index when you expand the row. It is the cause of exception. You can get the record by using Record API. You can refer the below codesnippet.

Codesnippet[C#]:

void OnQueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

{

var style = e.Style as GridDataStyleInfo;

var data = style.CellIdentity;

var record = data.Record as Customers;

}

 

We have prepared a sample based on this. Please find the attached sample below.

Please let us know if you need further assistance.

Regards,

Saravanan.M



Custom_Grouping_Demo_8c6aa06e.zip

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.

;