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

UnboundColumn how to access record data in the event handler.

Hi
 
I am working from the Unbound_Columns_Demo that I downloaded from another forum message.
 
I need to know how to access the fields from the data source from within the event handler.
 
I think I need to use GridDataQueryUnboundColumnCellEventArgs .Record or .RecordEntry
but I have been unable to find any examples.
 
I need to put a looked up value from an IDictionary lookup based on an int value in a data row (not visible on grid) into the unbound cell.
 
Thanks Paul

2 Replies

PM Paul Mitton July 12, 2012 05:21 PM UTC

Hi
 
This seems to work is it the best way to do this?  I also tried to get IValueConvert(Converter) to work but could not seem to figure out how to get the Dictionary in to the convert method.
 
GridDataRecord record = args.RecordEntry;
var data = (MailMergeTemplate)record.Data;
if (tableCellIdentity.Column.HeaderText == "Document Format")
{
    gridDataStyle.CellValue = _DocumentFormatOptionSetValues[(int)data.DocumentFormat.Value];
    args.Handled = true;
}
Thanks Paul


RA Rajasekar Syncfusion Team July 13, 2012 10:55 AM UTC

 

Hi Paul,

 

Thank you for your reply. Yes, you have to get the record object by using “RecordEntry.Data”  and also you have updated that, ” you could not seem to figure out how to get the Dictionary in to the convert method” this is something to be investigated at your end.  Suppose if you face any difficulties please replicate this problem in the simple sample application, so that we will investigate with that and update you the appropriate details.

 

Please let us know if you have any queries.

 

Thanks,

Rajasekar


Loader.
Live Chat Icon For mobile
Up arrow icon