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. Image for the cookie policy date

QueryCellInfo and GetRecordFromRow

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.

4 Replies

EU Eugene June 23, 2013 08:42 PM UTC

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


RG Rajasekar G Syncfusion Team June 24, 2013 08:38 PM UTC

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



EU Eugene June 25, 2013 07:50 PM UTC

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


SM Saravanan M Syncfusion Team September 10, 2013 12:54 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon