TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
C B
NA
22
22k
Linq to SQL does not return INT values from SQL Server
Jun 22 2011 5:48 PM
Hello
I cannot get INT values to appear in my WPF datagrid when I use Linq to SQL. Varchar values appear, from the same table, with out issue.
Where am I going wrong? Do I have to add some code to convert the INT to system.int32.
Thanks for your time.
Example of WPF databinding:
<!-- This is the INT value, no values returned-->
<my:DataGridTextColumn Binding="{Binding Path=Key_Word_int}" IsReadOnly="True"
Header="Major System Number" Width="SizeToHeader" />
<!-- This is the Varchar value, values returned-->
<my:DataGridTextColumn Binding="{Binding Path=Key_Word_Ref}"
Header="Major System Reference" Width="SizeToHeader" />
Example of Ling to SQL:
L2SMSDataContext cd = new L2SMSDataContext();
var dbMS = (from p in cd.Key_Words
select p).Take(10);
MSGrid.ItemsSource = dbMS;
MSInfo.Content = "MS Data Loaded";
Reply
Answers (
8
)
VS 2008 winforms does not simulate after build succeeded
How to display 5 item only on dropdownlist