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.

GridDataBoundGrid style and custom cells

Thread ID:





34495 Sep 9,2005 04:08 PM Sep 12,2005 02:47 AM Windows Forms 1
Tags: GridControl
Asked On September 9, 2005 04:08 PM

Sorry, it was previously posted in the ASP.NET forum, but I meant to post it here.. :( Hi, We''''re trying to use a Syncfusions grid here where the data is bound from a DataTable retrieved from the database. To do this I used a GridDataBoundGrid (GDBG) which worked instanly. I added 2 custom columns that weren''''t from the database, these columns are meant to be use for data manipulation. These two new columns have a specific use for every row: The first column, a checkbox, used to select rows I want to delete in a batch. The second column is a button used to launch a dialog to edit the current row. I''''ve tried to do something like this: grid(x,y).Description = "Edit" grid(x,y).CellAppearance = Raised grid(x,y).CellType = "Pushbutton" But it just won''''t work. I''''ve seen it work with the GridControl control, but I can''''t get it to work with DGBD. Maybe I should use another grid control? Thanks

Administrator [Syncfusion]
Replied On September 12, 2005 02:47 AM

Hi Fred, Refer this KB How do I insert an unbound check box column in a GridDataBoundGrid? To add a push button column, use the QueryCellInfo handler as used in the sample. int PushbuttonColIndex = this.gridDataBoundGrid1.Model.NameToColIndex("Pushbutton"); if(e.RowIndex > 0 && e.ColIndex == PushbuttonColIndex) { e.Style.CellType = "PushButton"; e.Style.Description = "Edit"; e.Style.CellAppearance = GridCellAppearance.Raised; } Best regards, Stanley


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.