Returns 1 if GroupingStyle is set to NoGrouping. Otherwise, uses 'Preferred...' and MinimumColumnWidth settings to determine how main groups are in view.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Get the total number of columns being displayed, and the ' total number of groups being displayed Dim inViewColumnCount As Int32 = Me.UltraDayView1.InViewColumnCount Dim inViewGroupCount As Int32 = Me.UltraDayView1.InViewGroupCount ' Get the number of columns being displayed for each group ' by dividing the total number of columns by the number ' of groups Dim columnsPerGroup As Int32 = (inViewColumnCount / inViewGroupCount) Debug.WriteLine("The minimum number of days being displayed for each owner is " + columnsPerGroup.ToString()) End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { // Get the total number of columns being displayed, and the // total number of groups being displayed int inViewColumnCount = this.ultraDayView1.InViewColumnCount; int inViewGroupCount = this.ultraDayView1.InViewGroupCount; // Get the number of columns being displayed for each group // by dividing the total number of columns by the number // of groups int columnsPerGroup = (inViewColumnCount / inViewGroupCount); Debug.WriteLine( "The minimum number of days being displayed for each owner is " + columnsPerGroup.ToString() ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2