private void BindGroups() { IStock.BLL.ItemGroups groups = new IStock.BLL.ItemGroups(); if(!string.IsNullOrEmpty(uiDropDownListCats.SelectedValue)) groups.GetItemGroupsByCategoryID(Convert.ToInt32(uiDropDownListCats.SelectedValue)); groups.Sort = "Name"; uiGridViewGroups.DataSource = groups.DefaultView; uiGridViewGroups.DataBind(); }
private void LoadGroups() { IStock.BLL.ItemGroups groups = new IStock.BLL.ItemGroups(); if (!string.IsNullOrEmpty(uiDropDownListCats.SelectedValue)) groups.GetItemGroupsByCategoryID(Convert.ToInt32(uiDropDownListCats.SelectedValue)); uiDropDownListGroup.DataSource = groups.DefaultView; uiDropDownListGroup.DataTextField = "Name"; uiDropDownListGroup.DataValueField = "ItemGroupID"; uiDropDownListGroup.DataBind(); uiDropDownListGroup.Items.Insert(0, new ListItem("إختر مجموعة", "")); }