Results 1 to 2 of 2

Thread: WPF Change a DataGrid column from Read/Wright to Read only in back code.

Threaded View

  1. #2
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: WPF Change a DataGrid column from Read/Wright to Read only in back code.

    I use DataGridTextColumn instead of TemplateColumn since DataGridTextColumn inherits DataGridColumn class.

    DataGridTextColumn Class

    Xaml
    XAML Code:
    1. <DataGridTextColumn Header="Name" Binding="{Binding SEQ, Mode=OneWay}" Width="50" />

    VB.NET Code:
    1. dgTop.Columns(0).IsReadOnly = True
    Last edited by KGComputers; Apr 29th, 2016 at 11:12 AM.
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width