Hello,
With following code snippet after connecting database(.dbml) in VS 2008 using server explorer etc ā Iām able to bind database with radGridView.
Could you please write some example how can I call store procedure and/or write SQL query in order to retrive specific data?
----------------------------------------------------------------------------
var nwData = new BankDataDataContext();
radGridBankAccounts.ItemsSource = (from tbl_BankAccounts in nwData.tbl_BankAccounts select tbl_BankAccounts);
radGridBankAccounts.IsReadOnly = true;
----------------------------------------------------------------------------
Thank you,
R
Could someone answer the question on Barcode? I know that telerik support the barcode on Reporting. But my requirement is to use the barcode in Winform. Does Telerik Barcode engine support this, if not how do I use the Barcode other than in Reporting? Looking forwards to your suggestions.
Thanks
Faisal.
namespace DataInfo { |
public class Person { |
public Person( string name, int age ) { |
this.Name = name; |
this.Age = age; |
} |
public string Name { |
get; |
set; |
} |
public int Age { |
get; |
set; |
} |
} |
} |
namespace DataInfo { |
public class ViewModel { |
public ViewModel() { |
this.Persons = new ObservableCollection<Person>(); |
this.Persons.Add( new Person( "Ivan", 23 ) ); |
this.Persons.Add( new Person( "Stefan", 34 ) ); |
this.Persons.Add( new Person( "Maria", 16 ) ); |
this.Persons.Add( new Person( "Michael", 78 ) ); |
} |
public ObservableCollection<Person> Persons { |
get; |
set; |
} |
} |
} |
<UserControl x:Class="DataInfo.TabControl" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:DataInfo="clr-namespace:DataInfo" |
xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"> |
<UserControl.Resources> |
<DataInfo:ViewModel x:Key="DataSource" /> |
<DataTemplate x:Key="ContentTemplate"> |
<Grid> |
<TextBlock Text="{Binding Age}" /> |
</Grid> |
</DataTemplate> |
</UserControl.Resources> |
<Grid x:Name="LayoutRoot" |
Background="White"> |
<Controls:RadTabControl x:Name="radTabControl" |
Margin="8" |
ItemsSource="{Binding Source={StaticResource DataSource}, Path=Persons}" |
DisplayMemberPath="Name" |
ContentTemplate="{StaticResource ContentTemplate}" /> |
</Grid> |
</UserControl> |