The text of this article is not in this database — only its details are. Read it on the old site: GridView In WPF
18 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: GridView In WPF
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Riya SharmaPosted Jun 27, 2020, 12:57 AM
Any code to perform CRUD operation on listview with gridview?
Sachin HingePosted Nov 28, 2018, 8:08 AM
Can you tell please how to give border all column in listview.
Razali HusainPosted Oct 1, 2018, 1:08 AM
The example uses bindings. I need to create a dynamic list of columns later populate each cell directly. How can I do that using code behind just like a 2D matrix? Thanks.
raghavan raghavanPosted Nov 29, 2017, 11:54 PM
can you please tell us how to add seperators between columns values
ujwal khairnarPosted Oct 18, 2011, 1:01 AM
Thanks for this article. Its solved my half of the problem.... Thank you very much.
Shai BazzPosted May 23, 2011, 2:14 PM
Hello, I am trying to put dataGrid(Gridview) in vertical order. This datagrid works similar to data entry form but user will be editing data instead of entering new one. user should be able to borwse/edit using pagination, so we need to display one dataset at a time. I must be able to create DataGrid dynamically since column name (e.g. FirstName, LastName...250+ columns, is stored in database table). Each column's value could be edited differently. For example if column-name is Age then user should be able to pick some age from Drop down box. See example below. FristName | Steve LastName | Ronald Age | 25 ==> DropDownbox with value from 1- 100 Sex | Male ==> DropDownbox with value of Male and Female Employed | Yes ==> check box and so on Any help is highly appreciated
shriram iyerPosted Apr 9, 2011, 1:00 AM
you have qouted this example by binding the gridview to specific examples like name ,,,,how to do it without binding ?..the header and entries should be displayed dynammically based on the requirement.i hope you are getting my point example: if my query is select name the result should be only one column as name wit entries below it if my query is select name,id the result should be 2 columns and so on please help !!!!
VincentPosted Mar 30, 2011, 3:01 PM
Hi Mahesh, In your MenuItem_Click event method, how do you know the column on which event is fired ? Thanks Vince
Mojalefa RafubeeditedPosted Jan 7, 2011, 4:48 AMEdited Jan 7, 2011, 4:52 AM
thanks for this
CraigPosted Jan 5, 2011, 11:46 PM
Thanks! This helped me. But if I click on a row and want to access the value in a column, how to I do that in codebehind?
MahiPosted Nov 15, 2010, 8:15 AM
can u pls help me on this..... i am creating one registration wpf application.... In that first window customer need to register with his personal details.....once he will submit those details they will store in db.... and in 2 nd window one grid,text box and one search button is there.....when customer is entering some db cust name when we click on search i should get that particular customer data in the grid.....i wrote the below code but still am not finding any data in the grid..... fallowing code i tried pls chk................ //dgNames.ColumnDefinitions.Add(1); SqlConnection con = new SqlConnection("server=.;database=MyApp;uid=sa;pwd=sa;"); SqlDataAdapter da = new SqlDataAdapter("select FirstName from Registration where FirstName='" +txtCustName.Text.Trim() + "'", con); SqlDataReader dr; con.Open(); DataSet ds = new DataSet(); da.Fill(ds, "Names"); dgNames.DataSource = ds; dgNames.DataBind(); dgNames.DataContext = ds; this.DataContext = ds.Tables[0].DefaultView; here when i build this code it is successful but when am debugging that it not deplaying any thing in the Grid...........please help as early as possible..................
mukul rajgurePosted Aug 12, 2010, 4:58 AM
Good Document for fresher
DanielPosted May 11, 2010, 3:00 PM
The default behavior draws a separator after your final column (MVP in this example), followed by an empty column. Is there a way to make your GridView never show this empty column and still have a resizing capabality?
arfan baigPosted Apr 23, 2010, 3:46 AM
nice clean article. Thanks for posting.
Riaan de WetPosted Nov 20, 2009, 1:32 AM
Hi, Good news, there is a DataGrid control in VS2010 Beta2. Cheers
TarikPosted Nov 9, 2009, 3:14 AM
Thanks for this nice article. Please keep posting new articles as well.