Exemplo n.º 1
0
 protected void UsageReport_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
 {
     if (e.Item.ItemType == Telerik.WebControls.GridItemType.Item || e.Item.ItemType == Telerik.WebControls.GridItemType.AlternatingItem)
     {
         DateTime date = Convert.ToDateTime(e.Item.Cells[2].Text);
         e.Item.Cells[2].Text = date.ToString("MM/dd/yyyy").Replace('.', '/');
     }
 }
Exemplo n.º 2
0
        protected void radCompanyUsers_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
        {
            if (e.Item.DataItem != null)
            {
                UserInfo dItem = (UserInfo)e.Item.DataItem;
                Telerik.WebControls.GridItem item = e.Item;

                //Sets the users name
                Literal litUser = item.FindControl("litUsername") as Literal;
                if (litUser != null)
                {
                    litUser.Text = dItem.FirstName + " " + dItem.LastName;
                }
                //Sets the users emailaddress
                Literal litEmail = item.FindControl("litEmail") as Literal;
                if (litEmail != null)
                {
                    litEmail.Text = dItem.Email;
                }
            }
        }
Exemplo n.º 3
0
 public void grdDocuments_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
 {
     if (e.Item.DataItem != null && e.Item.DataItem.GetType() == typeof(PatientDocument))
     {
         Telerik.WebControls.GridItem item = e.Item;
         PatientDocument pDoc    = (PatientDocument)e.Item.DataItem;
         LinkButton      lnkHide = (LinkButton)item.FindControl("lnkHide");
         LinkButton      lnkShow = (LinkButton)item.FindControl("lnkShow");
         if (lnkHide != null && lnkShow != null)
         {
             if (pDoc.Visible)
             {
                 lnkHide.Visible = true;
                 lnkShow.Visible = false;
             }
             else
             {
                 lnkShow.Visible = true;
                 lnkHide.Visible = false;
             }
         }
     }
 }