using System;
using System.Data;
using System.Text;
using System.Windows;

namespace DisableCellBasedOnValueInAnotherCell
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            this.InitializeComponent();

            this.GridView.ItemsSource = GetData();

        }

        private static DataTable GetData()
        {
            var dummyDataSource = new DataTable();
            dummyDataSource.Columns.Add("StringColumn", typeof(string));
            dummyDataSource.Columns.Add("DoubleColumn", typeof(double));
            dummyDataSource.Columns.Add("IntColumn", typeof(int));
            var random = new Random();
            for (int i = 0; i < 3; i++)
            {
                var sb = new StringBuilder();
                sb.Append((char) random.Next(48, 122)); //from 0 to z
                sb.Append((char) random.Next(48, 122));
                sb.Append((char) random.Next(48, 122));
                string stringVal = sb.ToString();
                dummyDataSource.Rows.Add(
                    stringVal
                    ,
                    random.NextDouble() * 100
                    ,
                    random.Next(0, 100));
            }

            return dummyDataSource;
        }
    }


}