Beispiel #1
0
 public void BindDrpRegion()
 {
     //Bind Drop Down Region
     col = ObjRegion.Get_All();
     drpRegion.DataTextField  = "RegionName";
     drpRegion.DataValueField = "Regionid";
     drpRegion.DataSource     = col;
     drpRegion.DataBind();
 }
    public void BindGrid()
    {
        // Declare col as Collection of Region_mst Object to get all records from table
        BLLCollection <Region_mst> col = new BLLCollection <Region_mst>();

        col = Regionobj.Get_All();
        Regiongrdvw.DataSource = col;
        Regiongrdvw.DataBind();
        clearControl();
    }
Beispiel #3
0
    public void BindDrpRegion()
    {
        col = ObjRegion.Get_All();
        drpRegion.DataTextField  = "RegionName";
        drpRegion.DataValueField = "Regionid";
        drpRegion.DataSource     = col;
        drpRegion.DataBind();
        // Declare item as listItem to assign default value to drop down
        ListItem item = new ListItem();

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