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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reg: Grid DataBound Control

Thread ID:

Created:

Updated:

Platform:

Replies:

32912 Aug 10,2005 06:35 AM UTC Aug 10,2005 09:39 AM UTC WinForms 5
loading
Tags: GridControl
Anna Srinivasan
Asked On August 10, 2005 06:35 AM UTC

Hi, For a Grid databound control, I am just setting datasource property to a data table. I want to now hide two columns from the grid. I know the column name. I want to do this during runtime. How do I do that? Note: I have not set any other properties of Grid databound control. Regards, Anna

Administrator [Syncfusion]
Replied On August 10, 2005 07:48 AM UTC

One way you can hide a column in a GridDataBoundGrid is to set grid.Model.ColWidths[colIndex] = 0;

Anna Srinivasan
Replied On August 10, 2005 08:39 AM UTC

Hi, I have written the following code: gridDataBoundImport.DataSource = dataTable; gridDataBoundImport.Model.ColWidths[6] = 0; But still the Grid is not hiding colindex=6. Do I need to do anything else? Regards, Anna >One way you can hide a column in a GridDataBoundGrid is to set grid.Model.ColWidths[colIndex] = 0;

Administrator [Syncfusion]
Replied On August 10, 2005 08:43 AM UTC

If you are doing this is form.load, you also have to set grid.AllowResizeToFit = true; http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=92

Anna Srinivasan
Replied On August 10, 2005 09:22 AM UTC

I have set the property to true. Sometimes it appears and sometimes it doesn''t. Do I need to set any other property? How can I make the grid databound not editable?

Administrator [Syncfusion]
Replied On August 10, 2005 09:39 AM UTC

To turn off editing grid-wide, you can set: grid.EnableEdit = false; or grid.TableStyle.ReadOnly = true; For the column not being hidden problem, please post a sample project showing it, and explain how to see the problem in your sample.

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.

Warning Icon 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.Close Icon

;