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. Image for the cookie policy date

celltype = "image" not working after upgrading to 3.0.1.0

hi, i have a column in a ggc, not mapped to any column in the datasource, with celltype = "image". previously i am able to display an image by assigning an imagelist control, and an imageindex. however, after the upgrade i did, the column is no longer showing up. i tried mapping the column in tabledescriptor to one of the columns specified (type = varchar) in the datasource. now i am able to see the column, but the image is still not showing up. is there a change in behaviour for celltype = "image"? need help urgently. thanks!

10 Replies

AD Administrator Syncfusion Team April 5, 2005 06:34 AM

Did you add this unbound column to the TableDescriptor.UnboundFields collection? grid.TableDescriptor.UnboundFields.Add("unbound"); grid.TableDescriptor.Columns["unbound"].Appearance.AnyRecordFieldCell.ImageIndex = 0; grid.TableDescriptor.Columns["unbound"].Appearance.AnyRecordFieldCell.ImageList = imageList1; grid.TableDescriptor.Columns["unbound"].Appearance.AnyRecordFieldCell.CellType = "Image";


AD Administrator Syncfusion Team April 5, 2005 09:26 AM

it did not work. i tried using codes to create a datatable and populate it using a loop. assigning it as the datasource for the ggc, and i am able to get the image to show up. however, when i load the datatable from database and assign it to the ggc, i am able to get all columns up. the image column just wont show up.


AD Administrator Syncfusion Team April 5, 2005 10:06 AM

Here is a little sample showing it working. http://www.syncfusion.com/Support/user/uploads/GGC_BookMark_765b397c.zip If you cannot spot something, if you upload a sample showing the problem, we can try to spot it here.


AD Administrator Syncfusion Team April 6, 2005 04:44 AM

i am still in the midst of trying to understand the behaviour of ggc in 3010. i have a few findings and they are as follows: scenarios: 1. - columns are defined in tabledescriptor of the ggc''s properties in design time, including the 2 columns (no mapping name defined) that the icon will be showing on. setting for the 2 columns: celltype = image imagelist = img16x16 imageindex = 0 - assign datatable to the ggc''s datasource - all columns shows up, except the 2 columns (doesn''t appear on screen at all) 2. - columns are defined in tabledescriptor of the ggc''s properties in design time, including the 2 columns (no mapping name defined) that the icon will be showing on. setting for the 2 columns: celltype = image imagelist = img16x16 imageindex = 0 - define the 2 columns again in unboundfields properties in tabledescriptor. - assign datatable to the ggc''s datasource - all columns shows up, including the 2 image columns. 3. - columns are defined in tabledescriptor of the ggc''s properties in design time, including the 2 columns (no mapping name defined) that the icon will be showing on. setting for the 2 columns: celltype = image imagelist = img16x16 imageindex = 0 - define the 2 columns again in unboundfields properties in tabledescriptor. - assign datatable to the ggc''s datasource - all columns shows up, except the 2 columns (doesn''t appear on screen at all) 4. - do not define any columns in tabledescriptor of ggc. - assign datatable to the ggc''s datasource - apply following codes: GridGroupingControl1.TableDescriptor.UnboundFields.Add("Gender") GridGroupingControl1.TableDescriptor.Columns("Gender").Appearance.AnyRecordFieldCell.ImageIndex = 0 GridGroupingControl1.TableDescriptor.Columns("Gender").Appearance.AnyRecordFieldCell.ImageList = Me.ImageList GridGroupingControl1.TableDescriptor.Columns("Gender").Appearance.AnyRecordFieldCell.CellType = "Image" - all columns show up, including the unbounded field "Gender". do note that this Gender does not exist in the datasource. with the above findings, i am trying to apply scenario 2 into my apps. as it seem for now, it don''t look good.


AD Administrator Syncfusion Team April 6, 2005 05:27 AM

correction for scenario 2. - columns are defined in tabledescriptor of the ggc''''s properties in design time, including the 2 columns (MAPPING NAME DEFINED) that the icon will be showing on. setting for the 2 columns: celltype = image imagelist = img16x16 imageindex = 0 - define the 2 columns again in unboundfields properties in tabledescriptor. - assign datatable to the ggc''''s datasource - all columns shows up, including the 2 image columns.


AD Administrator Syncfusion Team April 6, 2005 05:49 AM

>>with the above findings, i am trying to apply scenario 2 into my apps. as it seem for now, it don''''t look good. Do you have a sample project that you can upload where this is not working for you?


AD Administrator Syncfusion Team April 6, 2005 01:02 PM

i have attached a sample project. custdb is an mssql 2000 db backup file that the project uses. WindowsApplication1_4180.zip


AD Administrator Syncfusion Team April 6, 2005 02:17 PM

Exactly what is custdb, and how do I use it? It does not appear to be an mdf that I can attach, is it?


AD Administrator Syncfusion Team April 6, 2005 08:42 PM

I changed your sample to create a DataTable form code. The only strange thing I noticed was a null reference exception being thrown in the QueryCellStyoeInfo code. I added a check to avoid this so the exception is no longer raised. Exactly what behavior in the sample is not as you expected. http://www.syncfusion.com/Support/user/uploads/GGC_2250445e.zip


AD Administrator Syncfusion Team April 6, 2005 10:26 PM

i tried running the changes you made. basically its the same result i got from running through the db as the datasource. i am trying to get my codes to work and function in the same way as datagrid2 but was not successful. i dont think i am able to attach actual codes from my project over here. for now, i will try to download 3.2.0.0 and see if i can get it to work in that version.

Loader.
Live Chat Icon For mobile
Up arrow icon