protected void DetailsItemDataBound(object o, RadListViewItemEventArgs e) { if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem) { var lb = e.Item.FindControl("lbDetailViewItem") as IdeaSeed.Web.UI.LinkButton; var avatar = e.Item.FindControl("imgUser") as Telerik.Web.UI.RadBinaryImage; if (lb != null) { if (this.OnItemsDataBound != null) { var args = new InsightGridItemEventArgs(); args.Item = ((User)((RadListViewDataItem)e.Item).DataItem); this.OnItemsDataBound(this, args); } } if (avatar != null) { if (!string.IsNullOrEmpty(((User)((RadListViewDataItem)e.Item).DataItem).Avatar)) { avatar.ImageUrl = ((User)((RadListViewDataItem)e.Item).DataItem).Avatar; } else { avatar.ImageUrl = ResourceStrings.NoImageFound; } } } }
protected void DetailsItemDataBound(object o, RadListViewItemEventArgs e) { if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem) { var detailContact = e.Item.FindControl("lblDetailContactType") as IdeaSeed.Web.UI.Label; var detailAccount = e.Item.FindControl("lblDetailAccountName") as IdeaSeed.Web.UI.Label; var lb = e.Item.FindControl("lbDetailViewItem") as IdeaSeed.Web.UI.LinkButton; var avatar = e.Item.FindControl("imgContact") as Image; if (lb != null) { if (this.OnItemsDataBound != null) { var args = new InsightGridItemEventArgs(); args.Item = ((ClientContact)((RadListViewDataItem)e.Item).DataItem); this.OnItemsDataBound(this, args); } detailAccount.Text = this.AccountName; lb.Attributes.Add("accountname", this.AccountName); } if (avatar != null) { if (!string.IsNullOrEmpty(((ClientContact)((RadListViewDataItem)e.Item).DataItem).AvatarPath)) { avatar.ImageUrl = ((ClientContact)((RadListViewDataItem)e.Item).DataItem).AvatarPath; } else { avatar.ImageUrl = ResourceStrings.NoImageFound; } } } }
protected void ItemDataBound(object o, GridItemEventArgs e) { if (e.Item is GridEditableItem) { var name = e.Item.FindControl("lblAccount") as IdeaSeed.Web.UI.Label; var lb = e.Item.FindControl("lbEdit") as IdeaSeed.Web.UI.LinkButton; if (name != null) { if (this.OnItemsDataBound != null) { var args = new InsightGridItemEventArgs(); args.Item = ((ClientContact)e.Item.DataItem); this.OnItemsDataBound(this, args); } name.Text = this.AccountName; lb.Attributes.Add("accountname", this.AccountName); } } }
void _view_OnItemsDataBound(object sender, InsightGridItemEventArgs e) { throw new NotImplementedException(); }
void _view_OnItemsDataBound(object sender, InsightGridItemEventArgs e) { var item = (ClientContact)e.Item; _view.AccountName = item.ContactAccount.Name; }
void _view_OnItemsDataBound(object sender, InsightGridItemEventArgs e) { var item = (ContactEmail)e.Item; _view.AccountName = item.ContactReference.ContactAccount.Name; }