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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FindRecord - IConvertible

Thread ID:

Created:

Updated:

Platform:

Replies:

26508 Mar 23,2005 10:42 PM UTC Mar 24,2005 02:28 PM UTC WinForms 1
loading
Tags: Grouping
Shipra Gupta
Asked On March 23, 2005 10:42 PM UTC

Hello, I am using GroupingGrid.Table.PrimaryKeySortedRecords.FindRecord function to find a record given the primary key. The primary key consists of 1 string and 2 intergers. The primary key is bundled together as type object and passed to FindRecord function but I get an unhandled exception from mscorlib, System.Object ChangeType(System.Object, System.Type. System.IFormatProvider) function indicating that the object must implement IConvertible. Is there a sample available where FindRecord is used with composite primary keys? Thanks Shipra

Administrator [Syncfusion]
Replied On March 24, 2005 02:28 PM UTC

Hi Shipra, we made changes to ChangeType for the 3.x version to be able to handle more scenarios. So, with 3.x the problem might go away. Otherwise with 2.x you will need to implement IConvertible interface for the object that is stored in your database as PrimaryKey. ChangeType will query IConvertible to match up the type that is passed in to FindRecord to be of exactly the same type as the object store in the record. Attached find also a sample for Multiple primary keys: http://www.syncfusion.com/Support/user/uploads/MultiplePrimaryKey_834307a8.zip Stefan MultiplePrimaryKey.zip Stefan >Hello, > >I am using GroupingGrid.Table.PrimaryKeySortedRecords.FindRecord function to find a record given the primary key. The primary key consists of 1 string and 2 intergers. The primary key is bundled together as type object and passed to FindRecord function but I get an unhandled exception from mscorlib, System.Object ChangeType(System.Object, System.Type. System.IFormatProvider) function indicating that the object must implement IConvertible. > >Is there a sample available where FindRecord is used with composite primary keys? > >Thanks >Shipra

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.

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

;