Exemple #1
0
        void ctrl_ItemDataBound(object sender, RadListBoxItemEventArgs e)
        {
            DataRowView row = (DataRowView)e.Item.DataItem;


            if (!String.IsNullOrEmpty(Me.DataCheckedField))
            {
                e.Item.Checked = Convert.ToBoolean(row[Me.DataCheckedField]);
            }

            if (!String.IsNullOrEmpty(Me.DataCheckableField))
            {
                e.Item.Checkable = Convert.ToBoolean(row[Me.DataCheckableField]);
            }

            if (!String.IsNullOrEmpty(Me.DataSelectedField))
            {
                e.Item.Selected = Convert.ToBoolean(row[Me.DataSelectedField]);
            }

            if (!String.IsNullOrEmpty(Me.DataImageUrlField))
            {
                e.Item.ImageUrl = row[Me.DataImageUrlField].ToString();
            }

            if (!String.IsNullOrEmpty(Me.DataCssClassField))
            {
                e.Item.CssClass = row[Me.DataCssClassField].ToString();
            }

            if (!String.IsNullOrEmpty(Me.DataEnabledField))
            {
                e.Item.Enabled = Convert.ToBoolean(row[Me.DataEnabledField]);
            }
        }
Exemple #2
0
 void box_ItemDataBound(object sender, RadListBoxItemEventArgs e)
 {
     if (DataBounded != null)
     {
         DataBounded(e.Item);
     }
 }
Exemple #3
0
 /// <summary>
 /// Handles the ItemDataBound event of the listCategories control (adds Tooltip)
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">instance containing the event data.</param>
 protected void listCategories_ItemDataBound(object sender, RadListBoxItemEventArgs e)
 {
     if (ShowToolTips)
     {
         e.Item.ToolTip = (string)DataBinder.Eval(e.Item.DataItem, "FaqCategoryDescription");
     }
 }
        protected void lbxList_ItemDataBound(Object sender, RadListBoxItemEventArgs e)
        {
            RadListBoxItem listBoxItem = e.Item;
            ThinkgateUser user = (ThinkgateUser)(listBoxItem).DataItem;

            HyperLink hlkApprover = (HyperLink)listBoxItem.FindControl("lnkApprover");
            hlkApprover.Text = user.UserFullName;
        }
        void ResourceListBox_ItemDataBound(object sender, RadListBoxItemEventArgs e)
        {
            DisplayResource res = e.Item.DataItem as DisplayResource;

            if (!String.IsNullOrEmpty(res.GpsUnitId))
            {
                e.Item.Text += " *";
            }
        }
Exemple #6
0
        protected void OnTagItemDataBound(object sender, RadListBoxItemEventArgs e)
        {
            TagReferenceItem tag  = (TagReferenceItem)e.Item.DataItem;
            RadListBoxItem   item = (RadListBoxItem)e.Item;

            item.Value = tag.TagId.ToString();
            item.Text  = Helper.GetMappedTagWord(tag.Title);
            if (tagList.Contains(tag.TagId.ToString()))
            {
                item.Checked = true;
            }
        }
        protected void LstRoles_Checked(Object sender, RadListBoxItemEventArgs e)
        {
            MembershipUserWrapper userwrapper = MembershipUtil.FindByUserGuid(Request.QueryString["g"]);

            foreach (RadListBoxItem item in ((RadListBox)sender).Items)
            {
                String rolename = TextEncryption.Decode(item.Value);
                if (item.Checked)
                    MembershipUtil.AddUserToRole(userwrapper.MembershipUser.UserName, rolename);
                else
                    MembershipUtil.RemoveUserFromRole(userwrapper.MembershipUser.UserName, rolename);
            }
        }
Exemple #8
0
        protected void RadListBox1_ItemCheck(object sender, RadListBoxItemEventArgs e)
        {
            eventList.Add("RadListBox1_ItemCheck");
            NotifyEventCalls();
            RadGrid2.MasterTableView.RenderColumns.First(x => x.UniqueName == e.Item.Text).Display = e.Item.Checked;
            //var CheckedItems = RadListBox1.CheckedItems.Select(x => x.Text).ToList();
            //List<GridColumn> cols = RadGrid2.MasterTableView.RenderColumns.Where(p => CheckedItems.Contains(p.UniqueName)).ToList();
            //foreach (GridColumn column in cols)
            //{
            //    if (column.UniqueName != "TierLevel")
            //    {
            //        column.Display = true;

            //    }
            //}
        }
        protected void lbxList_ItemDataBound(Object sender, RadListBoxItemEventArgs e)
        {
            RadListBoxItem listBoxItem = e.Item;
            DataRowView row = (DataRowView)(listBoxItem).DataItem;

            Label lblDesc = (Label) listBoxItem.FindControl("lblDesc");
            lblDesc.Text = row["StatisticName"].ToString();

            Label lblValue = (Label) listBoxItem.FindControl("lblValue");
            lblValue.Text = row["Value"].ToString();

            if (lblValue.Text == string.Empty)
            {
                listBoxItem.ForeColor = System.Drawing.Color.Gray;
                lblDesc.ForeColor = System.Drawing.Color.Gray;
                lblValue.ForeColor = System.Drawing.Color.Gray;
            }
            else
            {
                listBoxItem.ForeColor = System.Drawing.Color.Black;
                lblDesc.ForeColor = System.Drawing.Color.Black;
                lblValue.ForeColor = System.Drawing.Color.Black;
            }
        }
 protected void OnItemChecked(object sender, RadListBoxItemEventArgs e)
 {
     Alerta(e.Item.Text);
 }
 protected void lbxTC_ItemCheck(object sender, RadListBoxItemEventArgs e)
 {
     bool check = false;
     foreach (RadListBoxItem item in lbxTC.Items)
     {
         if (item.Checked)
         {
             check = true;
             break;
         }
     }
     btnTransferForm.Enabled = check;
     foreach (RadListBoxItem item in lbxTC.Items)
     {
         if (item.Checked)
         {
             item.BackColor = Color.LightGray;
         }
         else
         {
             item.BackColor = Color.White;
         }
     }
 }
 protected void lbxSTC_ItemCheck(object sender, RadListBoxItemEventArgs e)
 {
     //reset earlier checked item
     foreach (RadListBoxItem item in lbxSTC.CheckedItems)
     {
         if (item != e.Item)
         {
             item.Checked = false;
         }
     }
     if (((RadListBoxItem)e.Item).Checked)
     {
         txtUpdateTC.Text = ((RadListBoxItem)e.Item).Value;
     }
     else
     {
         txtUpdateTC.Text = "";
     }
 }
 /// <summary>
 /// Handles the OnItemCreated event of the rlbDestination control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Telerik.Web.UI.RadListBoxItemEventArgs"/> instance containing the event data.</param>
 protected void rlbDestination_OnItemCreated(object sender, RadListBoxItemEventArgs e)
 {
     e.Item.Text = string.Format("Процесс '{0}' из шаблона '{1}'", e.Item.Text, ucSiteTemplateComboBox.SelectedText);
     e.Item.Attributes.Add("SiteId", ucSiteTemplateComboBox.SelectedValue.ToString());
 }
Exemple #14
0
		/// <summary>
		/// Handles the ItemDataBound event of the listCategories control (adds Tooltip)
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">instance containing the event data.</param>
		protected void listCategories_ItemDataBound(object sender, RadListBoxItemEventArgs e)
		{
			if (ShowToolTips)
				e.Item.ToolTip = (string)DataBinder.Eval(e.Item.DataItem, "FaqCategoryDescription");
		}
 protected void rlbScriptsAndStyles_OnItemCheck(object sender, RadListBoxItemEventArgs e)
 {
     ApplyStyles();
 }
Exemple #16
0
 protected void lbsUserPermissions_ItemDataBound(object sender, RadListBoxItemEventArgs e)
 {
     e.Item.ToolTip = (string)DataBinder.Eval(e.Item.DataItem, "Description");
 }
 protected void lstAllSize_ItemDataBound(object sender, RadListBoxItemEventArgs e)
 {
     RadAjaxPanel1.ResponseScripts.Add(string.Format("window['AllSize'] = '{0}';", lstAllSize.ClientID));
 }
        /// <summary>
        /// Binds a data source to either list box: Original or Calculated Item Statistics
        /// </summary>
        /// <param name="sender">Event source</param>
        /// <param name="e">ListBox Event Arguments</param>
        protected void lbxList_ItemDataBound(Object sender, RadListBoxItemEventArgs e)
        {
            try
            {
                BindItemData(e);
            }

            catch (Exception ex)
            {
                throw new ApplicationException(ItemDataBoundExceptionMessage, ex);
            }
        }
        private void BindItemData(RadListBoxItemEventArgs e)
        {
            RadListBoxItem listBoxItem = ExtractRadListBoxItem(e);

            RadListBoxItemState state = GetRadListBoxItemState(listBoxItem);

            ApplyRadListBoxItemState(listBoxItem, state);
        }
      protected void lbxList_ItemDataBound(object sender, RadListBoxItemEventArgs e)
      {
          RadListBoxItem listBoxItem = e.Item;
          var row = (ImprovementPlanTileOutput)(listBoxItem).DataItem;
          string schoolname = string.Empty;
          switch (row.PlanType)
          {
              case ImprovementPlanType.District:
                  break;
              case ImprovementPlanType.School:
                  schoolname = row.School.SchoolName;
                  break;
          }
          HyperLink hlkTestname = (HyperLink)listBoxItem.FindControl("lnkImpPlanName");
          hlkTestname.Text = row.Year + " " + row.PlanType + " Improvement Plan " + schoolname;
         // hlkTestname.NavigateUrl = "~/ImprovementPlan/ImprovementPlanViewMode.aspx?impID=" + Cryptography.EncryptInt(row.ImprovementPlanID, sessionObject.LoggedInUser.CipherKey) + "&actType=" + Cryptography.EncryptString(ActionType.View.ToString(), sessionObject.LoggedInUser.CipherKey);
          hlkTestname.NavigateUrl = "~/ImprovementPlan/ImprovementPlanViewMode.aspx?impID=" +row.ImprovementPlanID + "&actType=" + ActionType.View;

          HyperLink hlkEdit = (HyperLink)listBoxItem.FindControl("hlkEdit");
          hlkEdit.Visible = (ImprovementPlanType) row.PlanType == ImprovementPlanType.District ? UserHasPermission(Permission.Icon_Edit_DistrictImprovementPlan)
              : UserHasPermission(Permission.Icon_Edit_SchoolImprovementPlan);
          //hlkEdit.NavigateUrl = "~/ImprovementPlan/ImprovementCoverPage.aspx?impID=" + Cryptography.EncryptInt(row.ImprovementPlanID, sessionObject.LoggedInUser.CipherKey) + "&actType=" + Cryptography.EncryptString(ActionType.Edit.ToString(), sessionObject.LoggedInUser.CipherKey);
          hlkEdit.NavigateUrl = "~/ImprovementPlan/ImprovementCoverPage.aspx?impID=" + row.ImprovementPlanID + "&actType=" + ActionType.Edit;
          
      }
        private RadListBoxItem ExtractRadListBoxItem(RadListBoxItemEventArgs e)
        {
            Debug.Assert(e != null);
            Debug.Assert(e.Item != null);

            RadListBoxItem listBoxItem = e.Item;

            Debug.Assert(listBoxItem != null);

            return listBoxItem;
        }
 protected void lstAllSize_ItemDataBound(object sender, RadListBoxItemEventArgs e)
 {
     RadAjaxPanel1.ResponseScripts.Add(string.Format("window['AllSize'] = '{0}';", lstAllSize.ClientID));
 }
        protected void rlst_OnItemDataBound(object sender, RadListBoxItemEventArgs e)
        {
            //System.Data.DataRowView dataItem = e.Item.DataItem as System.Data.DataRowView;
            Label lbl1 = (Label)e.Item.FindControl("lblFileName");
            if (lbl1 != null)
            {

                HtmlTableRow tr1 = (HtmlTableRow)e.Item.FindControl("rwFile");
                if (rowCount % 2 == 0)
                    tr1.Attributes.Add("bgcolor", "#f7f7f7");
                else
                    tr1.Attributes.Add("bgcolor", "#EEF5F9");
                System.Web.UI.WebControls.Image img1 = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgFileTyp");
                if (img1 != null)
                {
                    img1.ImageUrl = "~/images/icons/" + Path.GetExtension(lbl1.Text).Substring(1) + "16.png";
                }
                rowCount++;
            }
            //e.Item.Value = dataItem["UIDRef"].ToString();
        }