title: how to Set the position of Column in datagrid wpf
body: <p>i have a problem i m making  a wpf application and using data grid Control to Show tabular data i m adding a Single Coloum in data Grid through Xaml And My All Other Column Would be add Dynamic my Fixed Column Comes At first postion in Grid i Want to be it  to be come At last</p>
  
  <p>how can i achive it</p>
  
  <p>my Xaml code is As below</p>
  
  <p>Thanks in Advance
  shashank` </p>
  
  <pre><code>            &lt;my:DataGrid.Columns&gt;
                  &lt;my:DataGridTemplateColumn Header="Edit" Width="110" IsReadOnly="True" &gt;
                      &lt;my:DataGridTemplateColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Image Source="file:///D:\Projects\ChadCarpenter\AARFID\AARFID\Images\boardicon.png" /&gt;
                          &lt;/DataTemplate&gt;
                     &lt;/my:DataGridTemplateColumn.CellTemplate&gt; 
                      &lt;/my:DataGridTemplateColumn&gt; 
             &lt;/my:DataGrid.Columns&gt;
  </code></pre>
  
  <blockquote>
    <p>And below are my C #` 
    public void CreateDataTableheader()
            {</p>
  </blockquote>
  
  <pre><code>        if (Utility.CheckGroupFamily == "Group")
          {
              dtAdultinfo.Columns.Add("Group Name", typeof(String));
          }
          dtAdultinfo.Columns.Add("Last Name", typeof(String));
          dtAdultinfo.Columns.Add("First Name", typeof(String));
          dtAdultinfo.Columns.Add("Phone", typeof(String));
          dtAdultinfo.Columns.Add("CellPhone", typeof(String));
          dtAdultinfo.Columns.Add("TowerID", typeof(String));
          dtAdultinfo.Columns.Add("Room #", typeof(String));
          dtAdultinfo.Columns.Add("IS primary", typeof(int));
  
          Lst.ItemsSource = dtAdultinfo.DefaultView;
  
          //DataGridColumn dc;
          //DataGridTemplateColumn  dgColumn = new DataGridTemplateColumn();
  
          //DataTemplate dt = new DataTemplate();
  
          //dgColumn.Header="Edit";
          //dgColumn.Width = 110;
          //dgColumn.IsReadOnly= true;
  
  
          //dgColumn.CellTemplate = dt;
          //Image img = new Image();
          //BitmapImage logo=new BitmapImage();
  
          //logo.UriSource =new Uri("file:///D:/Projects/ChadCarpenter/AARFID/AARFID/Images/boardicon.png");
  
  
          DataGridTemplateColumn dgColumn = new DataGridTemplateColumn();
          dgColumn.Header = "Edit";
          FrameworkElementFactory factory1 = new FrameworkElementFactory(typeof(Image));
          Binding b1 = new Binding("Picture");
          b1.Mode = BindingMode.TwoWay;
          factory1.SetValue(Image.SourceProperty, b1);
          DataTemplate cellTemplate1 = new DataTemplate();
          cellTemplate1.VisualTree = factory1;
          dgColumn.CellTemplate = cellTemplate1;
          Lst.Columns.Add(dgColumn);`
  </code></pre>