.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> WPF >> Post New QuestionBookmark and Share Subscribe to Forum

autosizecolumn=fill in wpf datagrid..

Posted By: Jayakumar     Posted Date: April 08, 2010    Points:2   Category :WPF
hi

how to find autosizecolumn=fill in wpf datagrid..

i want to fit only 3 out of 10 column with wpf datagrid..

how can do that..

regards jai

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: May 27, 2010     Points: 5   

Hi,

Try this

<datacontrol:DataGrid

AutoGenerateColumns="False"

IsReadOnly="True"

ItemsSource="{Binding Customer}">

<datacontrol:DataGrid.Columns>

<datacontrol:DataGridTextColumn

Header="CustName"

Binding="{CID}"

Width="200"/>

<datacontrol:DataGridTextColumn

Header="Cust Name"

Binding="{Binding CustName}"

Width="200"/>

</ datacontrol:DataGrid.Columns>

<datacontrol:DataGridTextColumn

Header="Address"

Binding="{Binding Address}"

Width="200"/>

</ datacontrol:DataGrid.Columns>

</ datacontrol:DataGrid>


Author: Leo             
Posted Date: January 06, 2011     Points: 5   

Set ColumnWidth to *




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend