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.

Databoundgrid Static???

Thread ID:

Created:

Updated:

Platform:

Replies:

2928 Feb 20,2003 12:55 PM Feb 21,2003 07:47 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 20, 2003 12:55 PM

How can I make cells in a databoundgrid and make them Static? When I use GridDataBoundGrid1(1, 1).CellType = "Static" ...I can still enter data into the cell John

Administrator [Syncfusion]
Replied On February 20, 2003 03:43 PM

You need to handle the PrepareViewStyleInfo event if you want to change style information for specific cells in a databound grid. The event is fired on cell-by cell basis. Check out the Grid\Samples\DataBound\GDBGMultiHeader sample. There you will find an override for this event. There should be also other samples that handle this event. Stefan

Administrator [Syncfusion]
Replied On February 21, 2003 05:26 AM

Stefan, Is there an easy way to disable entry into an entire column in VB.NET? Would you have a code sample, I am evaluating this toolset and like it alot, I just can't figure out the column locking. Thank you John O > You need to handle the PrepareViewStyleInfo event if you want to change style information for specific cells in a databound grid. > > The event is fired on cell-by cell basis. Check out the Grid\Samples\DataBound\GDBGMultiHeader sample. There you will find an override for this event. > > There should be also other samples that handle this event. > > Stefan >

Administrator [Syncfusion]
Replied On February 21, 2003 07:47 AM

You could actually do all that from designer. Just drop a GridDataBoundGrid onto a form and a valid datasource (from the Server Controls), e.g. the Customers table from Nothwind. Then select the grid. In the properties window select the correct DataSource and then search for the "GridBoundColumns" collection. Open its editor and add the columns to be shown in the grid. For each column, you can modify the style setting. There you can set CellType to be "Static" for the specific column you want to change. If you do not want to manually specify the columns to be displayed in the grid at design-time, then you could access InternalColumns collection in your forms OnLoad event instead: Dim supplierIDStyle As GridStyleInfo = hlCategory_Products.InternalColumns("SupplierID").StyleInfo supplierIDStyle.CellType = "Static" Stefan

CONFIRMATION

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.

;