Пример #1
0
        private void Grid_ItemDataBound(object sender, GridItemDataBoundEventArgs e)
        {
            Assert.ArgumentNotNull(sender, "sender");
            Assert.ArgumentNotNull(e, "e");
            object obj2 = e.Item["Name"] ?? e.Item["DisplayName"];

            if (obj2 != null)
            {
                e.Item["scGridID"] = StringUtil.GetString(obj2).Replace(" ", "!").Replace(";", "-scsemicolon-");
            }
        }
Пример #2
0
        /// <summary>
        /// Handles the ItemDataBound event of the Grid control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ComponentArt.Web.UI.GridItemDataBoundEventArgs"/> instance containing the event data.</param>
        protected virtual void OnGridItemDataBound(object sender, GridItemDataBoundEventArgs e)
        {
            var rowValues = e.DataItem as List <string>;

            if (rowValues == null)
            {
                return;
            }

            for (var i = 0; i < this.GridColumns.Count; i++)
            {
                e.Item[i] = rowValues[i];
            }
        }
        /// <summary>
        /// Called when item is bounded.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="ComponentArt.Web.UI.GridItemDataBoundEventArgs"/> instance containing the event data.</param>
        private void OnItemDataBound(object sender, GridItemDataBoundEventArgs args)
        {
            var record = (ICrmEntity)args.DataItem;

            if (record != null)
            {
                foreach (var property in record.Attributes)
                {
                    if (this.Entities.Levels[0].Columns[property.Key] != null)
                    {
                        var value = property.Value;
                        args.Item[property.Key] = value != null?value.GetStringifiedValue() : string.Empty;
                    }
                }
            }
        }
 private void PublishActivityGrid_ItemDataBound(object sender, GridItemDataBoundEventArgs e)
 {
     Item dataItem = e.DataItem as Item;
 }
Пример #5
0
        /// <summary>
        /// Handles the ItemDataBound event of the Grid control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ComponentArt.Web.UI.GridItemDataBoundEventArgs"/> instance containing the event data.</param>
        protected virtual void OnGridItemDataBound(object sender, GridItemDataBoundEventArgs e)
        {
            var rowValues = e.DataItem as List<string>;
              if (rowValues == null)
              {
            return;
              }

              for (var i = 0; i < this.GridColumns.Count; i++)
              {
            e.Item[i] = rowValues[i];
              }
        }
Пример #6
0
 private void Redirects_ItemDataBound(object sender, GridItemDataBoundEventArgs e)
 {
     RedirectGridEntry redirectEntry = e.DataItem as RedirectGridEntry;
     Assert.IsNotNull(redirectEntry, "redirect");
 }
Пример #7
0
        private void Redirects_ItemDataBound(object sender, GridItemDataBoundEventArgs e)
        {
            RedirectGridEntry redirectEntry = e.DataItem as RedirectGridEntry;

            Assert.IsNotNull(redirectEntry, "redirect");
        }