async void PopulateFinancialGrid()
        {
            // populate the grid
            _financialData = await FinancialData.GetFinancialData();

            var view = new C1.Xaml.C1CollectionView(_financialData);

            if (!_loaded)
            {
                _financialData.AutoUpdate = false;
            }
            _flexFinancial.ItemsSource = view;
            view.VectorChanged        += View_VectorChanged;

            // configure search box
            _srchCompanies.View = view;
            var props = _srchCompanies.FilterProperties;

            props.Add(typeof(FinancialData).GetRuntimeProperty("Name"));
            props.Add(typeof(FinancialData).GetRuntimeProperty("Symbol"));

            // show company info
            UpdateCompanyStatus();
            UpdateCellFactory();
        }
        // get a default list of financial items
        public async static Task <FinancialDataList> GetFinancialData()
        {
            var list = new FinancialDataList();
            var rnd  = new Random(0);

            Uri resourceUri;

            if (typeof(FinancialData).GetTypeInfo().Module.Name.EndsWith("exe"))
            {
                resourceUri = new Uri("ms-appx:///Resources/StockSymbols.txt");
            }
            else
            {
                resourceUri = new Uri("ms-appx:///FlexGridSamplesLib/Resources/StockSymbols.txt");
            }
            var file = await StorageFile.GetFileFromApplicationUriAsync(resourceUri);

            var fileStream = await file.OpenAsync(FileAccessMode.Read);

            using (var sr = new StreamReader(fileStream.AsStream()))
            {
                while (!sr.EndOfStream)
                {
                    var sn = sr.ReadLine().Split('\t');
                    if (sn.Length > 1 && sn[0].Trim().Length > 0)
                    {
                        var data = new FinancialData();
                        data.Symbol    = sn[0];
                        data.Name      = sn[1];
                        data.Bid       = rnd.Next(1, 1000);
                        data.Ask       = data.Bid + (decimal)rnd.NextDouble();
                        data.LastSale  = data.Bid;
                        data.BidSize   = rnd.Next(10, 500);
                        data.AskSize   = rnd.Next(10, 500);
                        data.LastSize  = rnd.Next(10, 500);
                        data.Volume    = rnd.Next(10000, 20000);
                        data.QuoteTime = DateTime.Now;
                        data.TradeTime = DateTime.Now;
                        list.Add(data);
                    }
                }
            }
            list.AutoUpdate = true;
            return(list);
        }