User (Old forums)MemberSeptember 23, 2008 at 8:38 amPost count: 23064
Guys, I have placed a grid control on my windows form and I am trying to display a simple table data. I am following the sample but the DataSource and DataMember are not showing up in intellisense. Even if I disregard and go ahead, I get a compile error. I have added references to the Xceed libraries. What am I missing ? Please help. Thanks
—————————————————my code ———————————————-
string connString = ConfigurationManager.ConnectionStrings[“BookStoreString”].ConnectionString;
SqlConnection con = new SqlConnection(connString);
//SqlCommand cmd = new SqlCommand(“select * from tabAuthors”, con);
string sqlString = “select * from tabPatient”;
SqlDataAdapter dataAdapter = new SqlDataAdapter(sqlString, con);
System.Data.DataSet dataSet =new System.Data.DataSet(“Authors”);
grid1.DataMember = “Authors”;
Imported from legacy forums. Posted by sarma (had 558 views)User (Old forums)MemberSeptember 23, 2008 at 5:07 pmPost count: 23064
Are you use the .NET grid or the WPF one?
If you are using the .NET version, then you are not referencing the right dlls. You need to reference Xceed.Grid.dll, Xceed.Editors.dll, Xceed.UI.dll, Xceed.Validation.dll. Right now, you are referencing the WPF version (using Xceed.Wpf.DataGrid).
If you are using the WPF version, first you are not in the right forums section, and second, there is no such properties on the DataGrid. The binding is completely different in WPF.
You can look at the following topic in the documentation to learn how to bind the DataGrid :
Imported from legacy forums. Posted by André (had 227 views)
- You must be logged in to reply to this topic.