Exemple #1
0
    public void BindGrid()
    {
        // Declare col as Collection of Region_mst Object to get all records from table
        BLLCollection <Vendor_mst> col = new BLLCollection <Vendor_mst>();

        col = ObjVendor.Get_All();
        Vendorgrdw.DataSource = col;
        Vendorgrdw.DataBind();
        ClearControl();
    }
    protected void BindVendor()
    {
        colVendor = objVendor.Get_All();
        drpVendor.DataTextField  = "vendorname";
        drpVendor.DataValueField = "vendorid";
        drpVendor.DataSource     = colVendor;
        drpVendor.DataBind();
        ListItem item = new ListItem();

        item.Text  = "-------Select Vendor------";
        item.Value = "0";
        drpVendor.Items.Add(item);
        drpVendor.SelectedValue = "0";
    }