Hi,
I am try to bind a RadGridView to DataView because of the Notify events that are already available. I am using the WPF MVVM architecture therefore the Grid is defined in the XAML and the DataView in my presentation Layer. I have a background worker that will populate the table in the DataView and I was hoping the RadGridView would then update accordingly. I am not too sure why it is not working or whether it can work in this context. Please see the code snippet below.
View:
<telerikGrid:RadGridView x:Name="activeSessionsGrid" AutoGenerateColumns="True" ItemsSource="{Binding Path=ActiveSessions}"
</telerikGrid:RadGridView>
Presentation Model:
private DataView _activeSessions;
public DataView ActiveSessions
{
get
{
return this._activeSessions;
}
}
private void GenereateTableStructure ( )
{
this._activeSessions = new DataView ( );
this._activeSessions.Table = new DataTable ( "Sessions" );
this._activeSessions.Table.Columns.Add ( "ID" );
this._activeSessions.Table.Columns.Add ( "Name" );
this._activeSessions.Table.Columns.Add ( "Surname" );
this._activeSessions.Table.Columns.Add ( "Designation" );
this._activeSessions.Table.Columns.Add ( "User Name" );
this._activeSessions.Table.Columns.Add ( "Email Address" );
this._activeSessions.Table.Columns.Add ( "Last Access Time" );
}
//BackgroundWorker that populates the _activeSessions table
Thanks in advance for your assistance.
I want to localize my GridView from xml file which has translation for my GridView headers.
I use next code:
<
Window.Resources
>
<
Style
TargetType
=
"telerik:GridViewDataColumn"
>
<
Setter
Property
=
"Header"
Value
=
"someValue"
/>
</
Style
>
</
Window.Resources
>
<
Grid
>
<
telerik:RadGridView
HorizontalAlignment
=
"Left"
Name
=
"radGridView1"
VerticalAlignment
=
"Top"
>
</
telerik:RadGridView
>
</
Grid
>
public
partial
class
Window1 : Window
{
public
Window1()
{
InitializeComponent();
var lst =
new
List<Foo>
{
new
Foo() {CompanyName =
"Burkinafaso"
, Phone =
"6666"
},
new
Foo() {CompanyName =
"Reebok"
, Phone =
"555"
}
};
radGridView1.SetBinding(RadGridView.ItemsSourceProperty,
new
Binding {Source = lst});
}
}
public
class
Foo
{
public
string
CompanyName {
get
;
set
; }
public
string
Phone {
get
;
set
; }
}
private
void
radDockPanel1_Close(
object
sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)
{
p1.IsHidden = !p1.IsHidden;
}
Hello again,
I want to suggest a better behavior for this control that would help it stay 508 compliant. When I use the RadTabControl in my applications, and a user attempts to change the tab using just the keyboard, this control behaves in a way that is not typical. For starters, the RadTabItem’s default IsTabStop value is “false”. Second, even when we set the IsTabStop to “true”, the focus is automatically changed from the Tabs to the first control in the tab being activated. This is not a typical behavior as seen in the stock TabControl that Microsoft wrote (or any other Tab control to speak of). Finally there is the matter of the AutomationPeer (as in there is none for either the RadTabControl or RadTabItem). This presents an issue for customers like me who are required to make our products accessible.
- Rashad Rivera