private void FillDataInGrid() { string status = ddlStatus.SelectedValue; int type_id = Convert.ToInt32(ddlMediaTypeList.SelectedValue); MediaTopics media_topic_obj = new MediaTopics(); List<Media_Topics> lst = media_topic_obj.GetListByTypeStatus(type_id, status); GridView1.DataSource = lst; GridView1.DataBind(); }
protected void PopulateMediaTopicList2DDL() { MediaTopics media_topic_obj = new MediaTopics(); List<Media_Topics> lst = media_topic_obj.GetListByTypeStatus(3,"1"); ddlMediaTopicList.Items.Clear(); ddlMediaTopicList.DataSource = lst; ddlMediaTopicList.DataTextField = "Name"; ddlMediaTopicList.DataValueField = "TopicId"; ddlMediaTopicList.DataBind(); ddlMediaTopicList.AutoPostBack = true; }
protected void PopulateMediaTopicList2DDL() { int TypeId = Convert.ToInt32(ddlMediaTypeList.SelectedValue); MediaTopics media_topic_obj = new MediaTopics(); List<Media_Topics> lst = media_topic_obj.GetListByTypeStatus(TypeId, "1"); ddlMediaTopicList.Items.Clear(); ddlMediaTopicList.DataSource = lst; ddlMediaTopicList.DataTextField = "Name"; ddlMediaTopicList.DataValueField = "TopicId"; ddlMediaTopicList.DataBind(); ddlMediaTopicList.AutoPostBack = true; }
protected void PopulateMediaTopicList2DDL(string selected_value) { MediaTopics media_topic_obj = new MediaTopics(); List<Media_Topics> lst = media_topic_obj.GetListByTypeStatus(1, "1"); ddlMediaTopicList.Items.Clear(); ddlMediaTopicList.DataSource = lst; ddlMediaTopicList.DataTextField = "Name"; ddlMediaTopicList.DataValueField = "TopicId"; ddlMediaTopicList.DataBind(); ddlMediaTopicList.SelectedValue = selected_value; }
private void PopulateMediaTopicList2DDL(string select_value) { ddlMediaTopicList.Items.Clear(); //DROPDOWNLIST int TypeId = Convert.ToInt32(ddlMediaTypeList.SelectedValue); MediaTopics media_topic_obj = new MediaTopics(); List<Media_Topics> lst = media_topic_obj.GetListByTypeStatus(TypeId, string.Empty); if (lst.Count > 0) { DataTable dt = CommonLibrary.Data.DataUtils.ConvertToDataTable(lst); RecursiveFillTree(dt, 0); } ddlMediaTopicList.Items.Insert(0, new ListItem("- Root -", "0")); //DROPDOWNLIST ddlMediaTopicList.SelectedValue = select_value; }