Example #1
0
 public void CargaItemsRadList(RadListBox listbox, string ids)
 {
     listbox.ClearChecked();
     if (ids != "")
     {
         foreach (string id in ids.Split(",".ToCharArray()))
         {
             listbox.FindItemByValue(id).Checked = true;
         }
     }
 }
Example #2
0
    private void getCheckedItems(RadListBox listBox, Label label)
    {
        try
        {
            string   strVal = label.Text;
            string[] Ar     = strVal.Split(new Char[] { ',' });
            for (int i = 0; i < Ar.Length; i++)
            {
                string strTemp = Ar[i].Trim();

                if (listBox.FindItemByValue(strTemp) != null)
                {
                    listBox.FindItemByValue(strTemp).Checked = true;
                }
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Jobs", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #3
0
        /// <summary>
        /// 设置选中的值
        /// </summary>
        /// <param name="box"></param>
        /// <param name="value">值</param>
        public static RadListBoxItem SetSelectedValue(this RadListBox box, string value)
        {
            RadListBoxItem item = box.FindItemByValue(value);

            return(SetSelected(box, item));
        }