We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Customizing a cell in a DataBoundGrid

Thread ID:





21838 Nov 24,2004 04:40 AM Nov 24,2004 05:15 AM Windows Forms 1
Tags: GridControl
Dott. Geol. Gianfranco BUCCIANTI
Asked On November 24, 2004 04:40 AM

What is the procedure to personalize a singular cell in a DataBoundGrid as I can make with a GridControl? For example, changing the Backgroud colour or to associate an image? The attached code works in a GridControl but does not work in a DataBoundGrid. Thanks, Gianfranco Private Sub gridControl1_CellClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs) Handles gridControl1.CellClick Dim gridModel As GridModel = sender.Model gridModel.BeginUpdate() gridModel.Item(e.RowIndex, e.ColIndex).BackColor = gridModel.Item(e.RowIndex, e.ColIndex).BackColor.Beige gridModel.Item(e.RowIndex, e.ColIndex).ImageList = Me.ImageList1 gridModel.Item(e.RowIndex, e.ColIndex).ImageIndex = 1 gridModel.EndUpdate(True) gridModel.Refresh() End Sub

Administrator [Syncfusion]
Replied On November 24, 2004 05:15 AM

You would need to use either the PrepareViewStyleInfo or Model.QueryCellInfo events to specify style properties on a cell by cell basis in a GridDataBoundGrid. Here are a couple of KBs on this.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.