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

Navigation in a groupingGrid

Thread ID:





14851 Jun 7,2004 08:58 AM UTC Jun 7,2004 06:45 PM UTC WinForms 1
Tags: Grouping
Asked On June 7, 2004 08:58 AM UTC

Hi Syncfusion! Is it possible to navigate in a groupingGrid like in a gridBoundDataGrid/classic datagrid?? Explanation: Near each datagrid, I have 4 navigation controls (First, prec, next, last) join together in a custom control called "NavControl" and each time I clic on them, the grid''s cursor changes.... I use the bindingContext of the grid and use it in "NavControl"... like that : Dim bmb As BindingManagerBase = Me.FindForm.BindingContext(MyDatatable) bmb.position= +1 if I do Next bmb.position= 0 if I do First etc... So, I want to use this control with my groupingGrid control.... How to do that? because I use 2 datatable in the groupingGrid (parents and children) Thanks bye! syl

Administrator [Syncfusion]
Replied On June 7, 2004 06:45 PM UTC

HI Syl, I am including some sample code that works with the GroupCustomers example. Some pointers: 1) While in form ctor the BindingContext for the form has not been initialized. This happens the first time BindingContext is initialized. The same is true for GridGroupingControl. If now the GridGroupingControl calls BindingContext before the form calls BindingContext, the BindingContext might differ The line this.groupingGrid1.BindingContext = this.BindingContext; will prevent this. 2) While in form ctor the grid is marked dirty. Filling the datasource with SqlAdapter.Fill or ReadXml after setting the datasource does generate lots PositionChanged events sent to the grid. Therefore the grid will ignore these events as long as the table is marked dirty. Calling int count = this.groupingGrid1.Engine.Table.Records.Count; will force the grid records to be initialized (initialization always happens on demand). After the records were initialized you can now call something like this.BindingContext[dv].Position = 5; and the grid will correctly process the PositionChanged event. This is the replacement code for the form ctor in GroupCustomers example: public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // this.groupingGrid1.BindingContext = this.BindingContext; this.groupingGrid1.DataMember = ""; DataView dv = this.dataSet11.Customers.DefaultView; dv.RowFilter = "Country = ''Germany''"; this.groupingGrid1.DataSource = dv; ReadXml(this.dataSet11, @"Data\GDBDdata.XML"); // int count = this.groupingGrid1.Engine.Table.Records.Count; this.BindingContext[dv].Position = 5; Stefan


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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