Skip to main content
WPF DataGrid MouseDoubleClick 01

WPF DataGrid Row MouseDoubleClick Example

WPF DataGrid MouseDoubleClick Example: Let’s see How we can create WPF DataGrid MouseDoubleClick method. WPF DataGrid with Mouse double click methods can be used for capturing the clicked row by the user and also show or call appropriate functions or methods according to the captured data of the corresponding wpf datagrid row. In this particular […]

Read More

WPF ComboBox SelectionChanged 001

WPF ComboBox SelectionChanged – SelectedItem Method

WPF ComboBox SelectionChanged method helps us get the object selected by the users on the WPF Form/Page. Method for WPF Combox SelectionChanged : Object[] data = ((DataRowView)e.AddedItems[0]).Row.ItemArray; txtBSelectedDay.Text = “You Selected : ” + data[1].ToString() + ” and its Id : ” + data[0].ToString(); We get data in form of Array. We can then select […]

Read More

WPF ComboBox SelectionChanged 001

WPF Bind ComboBox using MS SQL database

WPF Bind ComboBox using SQL database. WPF Fill Combo Box using MS SQL Database. Code : String connectionString = “Data Source=192.168.0.192;Initial Catalog=ParallelCodes;User ID=sa;Password=789”; SqlConnection con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(“select * from Producttbl”, con); con.Open(); SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); adapter.Fill(dt); cbbDays.ItemsSource = dt.DefaultView; cbbDays.DisplayMemberPath = “ProName”; […]

Read More

wpf datagrid from database

WPF Bind DataGrid using SQL Database

In this post we will Bind our WPF DataGrid control from MS SQL Database. WPF Datagrid bind sql database. Fill WPF Datagrid from MS SQL Database. WPF Datagrid control Binding from MS SQL Database Code : String connectionString = “Data Source=192.168.0.192;Initial Catalog=ParallelCodes;User ID=sa;Password=789”; SqlConnection con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(“select * from Producttbl”, […]

Read More