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.

UnboundColumn how to access record data in the event handler.

Thread ID:

Created:

Updated:

Platform:

Replies:

104351 Jul 12,2012 12:53 PM Jul 13,2012 06:55 AM Silverlight 2
loading
Tags: GridControl
Paul Mitton
Asked On July 12, 2012 12:53 PM

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

Paul Mitton
Replied On July 12, 2012 01:21 PM

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

Rajasekar [Syncfusion]
Replied On July 13, 2012 06:55 AM

 

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


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.

;