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"
="http://schemas.microsoft.com/winfx/2006/xaml"
="480">
</
UserControl>
HERE IS THE CODE
using
System;
System.Collections.Generic;
System.Collections.ObjectModel;
System.Linq;
System.Net;
System.Windows;
System.Windows.Controls;
System.Windows.Documents;
System.Windows.Input;
System.Windows.Media;
System.Windows.Media.Animation;
System.Windows.Shapes;
Infragistics.Silverlight;
Infragistics.Silverlight.Controls;
Infragistics.Silverlight.Controls.Primitives;
namespace
IG_Samples
{
UserControl
>();
MainPage()
InitializeComponent();
BindData();
}
BindData()
i = 1; i <= 100; i++)
objSource.Add(
+ i.ToString() });
.igGridRequestDetails.ItemsSource = objSource;
e)
.igGridRequestDetails.ColumnTypeMappings.Count;
i = count - 1; i >= 0; i--)
))
);
?))
.Parse(chkIsActive.IsChecked.ToString())});
MyDataSource
; }
I am not sure what you are seeing with this sample, because AllowFixedColumns was set to DropArea and ColumnWidth was set to (well it was not set so it is AutoInit by default).
Under these conditions you would not see a fixed column marker. You would see a SortIndicator which would cover up the text, but this is because AutoInit sets the column width when it renders so sorting tries to shoe horn an extra UI element into a given width.
Setting the ColumnWidth to Auto would eliminate this issue.
I think my query was not clean. let me put it this way: -
1) Create a xamwebgrid 9.2
2) Set AutoGenerateColumns = false
3) Add the following columns. Keep the exact header text as mentioned below
a) TextColumn - HeaderText="ID"
b) DateColumn - HeaderText = "Date of Joining"
c) TextColumn - HeaderText = "Full Name"
d) CheckBoxColumn - HeaderText = "Is Active"
4) Grid should have the following properties set
a) Sort Settings
i) AllowSorting = "True"
ii) AllowMultipleColumnSorting = "True"
iii) ShowSortIndicator = "True"
b) FixedColumnSettings
i) AllowFixedColumns = "Indicator"
5) Set Grid's height = 300
6) Bind the grid with appropriate collection where number of records are more than 100 (just to highlight the issue more prominantly)
=> Run the page
a) Everything would look good with initial load
b) Now sort on the basis of "ID" column and see what happens to the column header
c) Same way sort on the basis of Name column and the header would be chopped off.
For exact reference you can use the following code to generate quick collection used in my sample
ObservableCollection<MyDataSource> objSource = new ObservableCollection<MyDataSource>();
for (int i = 1; i <= 100; i++)
The class structure
public class MyDataSource
public int id { get; set; }
public string joiningDate { get; set; }
public string name { get; set; }
public bool isactive { get; set; }
I hope this helps you understand the scenario properly.
You never set the ColumnWidth property in this sample.
The default value for grid.ColumnWidth is InitialAuto. This setting means that the column fixes it's width during the inital rendering to the largest cell that is currently visiable at intial rendering time.
Setting the value to SizeToHeader or Auto would allow the header to resize when the indicator is brought into view and not clip the text.
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.
Could you submit a sample recreating this issue, it would be easier to determine what is going on.
I have attached a sample project. Can someone tell me, by looking at teh sample, whats causing the column headers to chop off and what is the fix for it ?
I noticed that you are using the original release dlls in this project, so I checked the project against the latest service release and the issue was no longer there.
I would suggest that you get the latest service release for the LOB dlls (build 9.2.20092.2099) and apply that and rebuild your project against that.