Exemplo n.º 1
0
    protected void SortStepGrid(object sender, GridViewSortEventArgs e)
    {
        DataView dv = new DataView((DataTable)Session["VendorFiles"]);

        dv.Sort = e.SortExpression;
        VendorFilesGridView.DataSource = dv;
        VendorFilesGridView.DataBind();
    }
Exemplo n.º 2
0
    private void FillFileGrid()
    {
        DataTable dtFiles = new DataTable();

        dtFiles.Columns.Add("Ready For Review", typeof(String));
        dtFiles.Columns.Add("Date Modified", typeof(String));
        string targetDirectory = DefaultDirLabel.Text;

        // Process the list of files found in the directory.
        string[] fileEntries = Directory.GetFiles(targetDirectory);
        foreach (string fileName in fileEntries)
        {
            AddFileInfoToTable(fileName, dtFiles);
        }
        VendorFilesGridView.DataSource = dtFiles;
        VendorFilesGridView.DataBind();
        Session["VendorFiles"] = dtFiles;
    }