Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
XamWebGrid 9.2 - ColumnWidth.SizeToHeader issues
posted

Hi,

Bsed on the code below, I am facing the following issue with XamWebGrid 9.2: -

When the ColumnWidth is set to SizeToHeader, the FixedColumnIndicator overlaps last 2-3 alphabets of the column header.

It means that the column header is not completely visible. THIS WAS WORKING FINE WITH INFRAGISTICS 9.1.

Can someone suggest whats causing the problem ? or is it a issue / enhancement in 9.2?

 

Here is the XAML

 

<

 

UserControl xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:igGrid="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.XamWebGrid.v9.2" x:Class="IG_Samples.MainPage"

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

xmlns:x

="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

 

 

mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight

="480">

 

 

 

<Grid x:Name="LayoutRoot" Background="Aquamarine">

 

 

 

<Grid.ColumnDefinitions>

 

 

 

<ColumnDefinition Width="2*"/>

 

 

 

<ColumnDefinition Width="*"/>

 

 

 

</Grid.ColumnDefinitions>

 

 

 

<Grid.RowDefinitions><RowDefinition Height="25"/><RowDefinition Height="*"/></Grid.RowDefinitions>

 

 

 

<igGrid:XamWebGrid x:Name="igGridRequestDetails" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="True"HorizontalAlignment="Stretch" VerticalAlignment="Top" IsAlternateRowsEnabled="False" ActiveCellChanging="igGridRequestDetails_ActiveCellChanging" ActiveCellChanged="igGridRequestDetails_ActiveCellChanged" InitializeRow="igGridRequestDetails_InitializeRow" PageIndexChanged="igGridRequestDetails_PageIndexChanged" Filtering="igGridRequestDetails_Filtering" GroupByCollectionChanged="igGridRequestDetails_GroupByCollectionChanged" CellEnteringEditMode="igGridRequestDetails_CellEnteringEditMode" CellExitedEditMode="igGridRequestDetails_CellExitedEditMode" CellClicked="igGridRequestDetails_CellClicked" Loaded="igGridRequestDetails_Loaded">

 

 

 

<igGrid:XamWebGrid.GroupBySettings>

 

 

 

<igGrid:GroupBySettings AllowGroupByArea="Top"/>

 

 

 

</igGrid:XamWebGrid.GroupBySettings>

 

 

 

<igGrid:XamWebGrid.SortingSettings>

 

 

 

<igGrid:SortingSettings AllowSorting="True" AllowMultipleColumnSorting="True" ShowSortIndicator="True" />

 

 

 

</igGrid:XamWebGrid.SortingSettings>

 

 

 

<igGrid:XamWebGrid.PagerSettings>

 

 

 

<igGrid:PagerSettings AllowPaging="Bottom" PageSize= "25" />

 

 

 

</igGrid:XamWebGrid.PagerSettings>

 

 

 

<igGrid:XamWebGrid.ColumnMovingSettings>

 

 

 

<igGrid:ColumnMovingSettings AllowColumnMoving="Indicator" />

 

 

 

</igGrid:XamWebGrid.ColumnMovingSettings>

 

 

 

<igGrid:XamWebGrid.FixedColumnSettings>

 

 

 

<igGrid:FixedColumnSettings AllowFixedColumns="DropArea"></igGrid:FixedColumnSettings>

 

 

 

</igGrid:XamWebGrid.FixedColumnSettings>

 

 

 

<igGrid:XamWebGrid.FilteringSettings>

 

 

 

<igGrid:FilteringSettings AllowFilterRow="Top" FilteringScope="ColumnLayout"/>

 

 

 

</igGrid:XamWebGrid.FilteringSettings>

 

 

 

<igGrid:XamWebGrid.EditingSettings>

 

 

 

<igGrid:EditingSettings AllowEditing="Cell" IsMouseActionEditingEnabled="SingleClick" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True" IsOnCellActiveEditingEnabled="True" />

 

 

 

</igGrid:XamWebGrid.EditingSettings>

 

 

 

</igGrid:XamWebGrid>

 

 

 

<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">

 

 

 

<TextBlock Text="ID" />

 

 

 

<TextBox MinWidth="50" Name="txtID"/>

 

 

 

<TextBlock Text="Name" />

 

 

 

<TextBox MinWidth="150" Name="txtName"/>

 

 

 

<TextBlock Text="Joining Date" />

 

 

 

<controls:DatePicker Name="dtJoiningDate"></controls:DatePicker>

 

 

 

<TextBlock Text="Is Active" />

 

 

 

<CheckBox Name="chkIsActive" IsChecked="False"/>

 

 

 

<Button Content="Add" Click="Button_Click"></Button>

 

 

 

 

 

 

 

</StackPanel>

 

 

 

</Grid>

</

 

UserControl>

 HERE IS THE CODE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

using

 

 

System;

using

 

 

System.Collections.Generic;

using

 

 

System.Collections.ObjectModel;

using

 

 

System.Linq;

using

 

 

System.Net;

using

 

 

System.Windows;

using

 

 

System.Windows.Controls;

using

 

 

System.Windows.Documents;

using

 

 

System.Windows.Input;

using

 

 

System.Windows.Media;

using

 

 

System.Windows.Media.Animation;

using

 

 

System.Windows.Shapes;

using

 

 

Infragistics.Silverlight;

using

 

 

Infragistics.Silverlight.Controls;

using

 

 

Infragistics.Silverlight.Controls.Primitives;

namespace

 

 

IG_Samples

{

 

 

public partial class MainPage :

UserControl

{

 

 

ObservableCollection<MyDataSource> objSource = new ObservableCollection<MyDataSource

>();

 

 

public

MainPage()

{

InitializeComponent();

BindData();

}

 

 

public void

BindData()

{

 

 

 

for (int

i = 1; i <= 100; i++)

{

objSource.Add(

 

new MyDataSource() { id = i, isactive=true, joiningDate= DateTime.Today.AddDays(1), name ="test - "

+ i.ToString() });

}

 

 

this

.igGridRequestDetails.ItemsSource = objSource;

}

 

 

private void igGridRequestDetails_ActiveCellChanging(object sender, Infragistics.Silverlight.ActiveCellChangingEventArgs

e)

{

}

 

 

private void igGridRequestDetails_ActiveCellChanged(object sender, EventArgs

e)

{

}

 

 

private void igGridRequestDetails_InitializeRow(object sender, Infragistics.Silverlight.InitializeRowEventArgs

e)

{

}

 

 

private void igGridRequestDetails_PageIndexChanged(object sender, Infragistics.Silverlight.PageChangedEventArgs

e)

{

}

 

 

private void igGridRequestDetails_Filtering(object sender, Infragistics.Silverlight.CancellableFilteringEventArgs

e)

{

}

 

 

private void igGridRequestDetails_GroupByCollectionChanged(object sender, Infragistics.Silverlight.GroupByCollectionChangedEventArgs

e)

{

}

 

 

private void igGridRequestDetails_CellEnteringEditMode(object sender, Infragistics.Silverlight.BeginEditingCellEventArgs

e)

{

}

 

 

private void igGridRequestDetails_CellExitedEditMode(object sender, Infragistics.Silverlight.CellExitedEditingEventArgs

e)

{

}

 

 

private void igGridRequestDetails_CellClicked(object sender, Infragistics.Silverlight.CellClickedEventArgs

e)

{

}

 

 

private void igGridRequestDetails_Loaded(object sender, RoutedEventArgs

e)

{

 

 

int count = this

.igGridRequestDetails.ColumnTypeMappings.Count;

 

 

for (int

i = count - 1; i >= 0; i--)

{

 

 

if (this.igGridRequestDetails.ColumnTypeMappings[i].DataType == typeof(DateTime

))

{

 

 

this.igGridRequestDetails.ColumnTypeMappings[i].ColumnType = typeof(TextColumn

);

}

 

 

else if (this.igGridRequestDetails.ColumnTypeMappings[i].DataType == typeof(DateTime

?))

{

 

 

this.igGridRequestDetails.ColumnTypeMappings[i].ColumnType = typeof(TextColumn

);

}

}

 

}

 

 

private void Button_Click(object sender, RoutedEventArgs

e)

{

 

 

this.objSource.Add(new MyDataSource() { id = int.Parse(this.txtID.Text), name = this.txtName.Text, joiningDate = DateTime.Parse(this.dtJoiningDate.Text), isactive = bool

.Parse(chkIsActive.IsChecked.ToString())});

}

}

 

 

public class

MyDataSource

{

 

 

public int id { get; set

; }

 

 

public DateTime joiningDate { get; set

; }

 

 

public string name { get; set

; }

 

 

 

public bool isactive { get; set

; }

Parents Reply
  • 225
    posted in reply to Darrell Kress

    look at the snapshot. the are highlighted in RED indicates teh problem statement.

    The column name is getting chopped off and I am not able to understand why it is happening. I tried all possible combination of properties related to column width and indicators.

    hope this makes easy to drill down to the root cause.

Children