Problem with PrimaryKeySortedRecords

Hello…. I have added an unbound checkbox column to the main table and also to the child table in a gridgrouping control. Public Sub unboundField_QueryValue(ByVal sender As Object, ByVal e As FieldValueEventArgs) Dim RecordIndex As Integer = Me.GridGroupingControl1.Table.PrimaryKeySortedRecords.IndexOf(e.Record) The checkbox column works fine for the main table .However,For the child table, I am not able to do the same. Public Sub unboundField_QueryValue1(ByVal sender As Object, ByVal e As FieldValueEventArgs) Dim RecordIndexchild As Integer = Me.GridGroupingControl1.Table.RelatedTables(0).PrimaryKeySortedRecords.IndexOf(e.Record) when i check the code i realied that there are no values returned for PrimaryKeySortedRecords? is there a problem with relations? Please inform asap Thanx

3 Replies

AD Administrator Syncfusion Team May 9, 2006 10:10 AM UTC

Hi Cheryl, Could you try this code to find the index of the record.Here is a code snippet. Dim RecordIndexchild As Integer = e.Record.ParentTable.PrimaryKeySortedRecords.IndexOf(e.Record) Please let me know if this helps. Best Regards, Haneef


CH cheryl May 9, 2006 10:14 AM UTC

Hello Hansel thanx for the quick response...... bur the problem is the same recordindexchild returns -1 .... according to me , primarykeysortedrecords is null when i try '' MsgBox(Me.GridGroupingControl1.Table.RelatedTables("ParentToChild").PrimaryKeySortedRecords.Count) >Hi Cheryl, > >Could you try this code to find the index of the record.Here is a code snippet. > >Dim RecordIndexchild As Integer = e.Record.ParentTable.PrimaryKeySortedRecords.IndexOf(e.Record) > >Please let me know if this helps. >Best Regards, >Haneef


AD Administrator Syncfusion Team May 9, 2006 11:11 AM UTC

Hi Cheryl, I have tested this issue by creating a sample using GridGroupingcontrol in v.3.3 and then again tested by upgrading to 4.1. I was not able to reproduce the issue.If you can provide more information, we can try to suggest some solution. Here is a sample. http://www.syncfusion.com/Support/user/uploads/UnboundCheckboxGridGroup_ee290e7a.zip Could you please run this at your end and let me know how it goes? Thanks for choosing Syncfusion Products. Best Regards, Haneef Notes: Before run the attached sample, you need to change the connection string.

Loader.
Up arrow icon