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

ggc ColIndex have problem with masterdetail child relation

I tried to validate user input into ggc by refer the ColIndex with dataset ordinal value, the problem is that ColIndex did not in consecutive order if there is masterdetail type childtable relation. Pls advise how to fix the problem and make the ColIndex of parent table didn't mix with child table?


6 Replies

HA harisan January 28, 2008 02:30 PM UTC

Hi,
I just resolved it by : ColIndexToField

There is another important issue that I don't know how to deal with. After I updated any changes in particular row and call DS.AcceptChanges then I edit the same row and update it again. But this time I got DBconcurrency error. How to make the data in ggc synchronized with the recent updated dataset and avoid the error?

Thanks and Regards,
Harry



JS Jeba S Syncfusion Team January 30, 2008 01:04 PM UTC

Hi Harisan,

Thank you for your interest in Syncfusion Products.

Please call the EndEdit() method and see it helps to avoid the error.


if(this.gridGroupingControl1.Table.CurrentRecord != null)
this.gridGroupingControl1.Table.CurrentRecord.EndEdit();
this.gridGroupingControl1.CurrencyManager.EndCurrentEdit();


Kindly let us know if you need any further asssitance.

Best Regards,
Jeba.



HA harisan January 31, 2008 06:53 AM UTC

Hello Jeba,

Thanks for your assist.
I tried it but it still got the same error.
Do I need to write BeginInit somewhere in the module? I need further assist of this matter to resolve it.

Best Regards,
Harry



JS Jeba S Syncfusion Team January 31, 2008 09:52 AM UTC

Hi Harry,

Thank you for your update.

Could you please try to reproduce the error in the following browser sample with MasterDetail relation? This will help us to analyze the issue in depth and provide you a solution. Or kindly provide a sample just to show the issue.

{Installation Drive}\Documents and Settings\{Username}\My Documents\Syncfusion\EssentialStudio\6.1.0.34\Windows\Grid.Grouping.Windows\Samples\2.0\RelationsAndHierarchy\RelatedMasterDetails

Regards,
Jeba.



HA harisan February 1, 2008 12:40 PM UTC

Hello Jeba,

I got InvalidCastException error on this line:
Dim dv As System.Data.DataView = cm.List

Unable to cast object of type 'System.Windows.Forms.BindingSource' to type 'System.Data.DataView

How to make this work out?

This is the code to retrieve HeaderText from Haneef:

Private Sub gridGroupingControl1_TableControlCellClick(ByVal sender As Object, ByVal e As GridTableControlCellClickEventArgs)
Dim cm As CurrencyManager = e.TableControl.Table.GetCurrencyManager()
Dim dv As System.Data.DataView = cm.List

If Not dv Is Nothing Then
Dim col As GridColumnDescriptor = e.TableControl.Table.GetColumnDescriptorAt(e.Inner.RowIndex,e.Inner.ColIndex)
If Not col Is Nothing Then
Console.WriteLine(col.MappingName)
Console.WriteLine( dv.Table.Columns.Contains(col.MappingName) )
End If
End If
End Sub

Thanks and Regards,
Harry



HA haneefm Syncfusion Team February 1, 2008 05:18 PM UTC

Hi Harry,

Please follow the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=71382

Best regards,
Haneef


Loader.
Live Chat Icon For mobile
Up arrow icon