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

DropDownUserCell Sample

I am trying to use this sample with a databound grid control. In the onsavechanges method I am trying to set a tag with an object (basically a arraylist). However whatever I set I can not read back out. I have tried setting: this.StyleInfo.Tag = ddUser.GetValues(); or this.Grid.Model[this.RowIndex, this.ColIndex].Tag = ddUser.GetValues(); Whenever I try to read it back out I get nothing.

7 Replies

AD Administrator Syncfusion Team April 12, 2005 08:00 PM

A GridDataBoundGrid does not store anything except the Cellvalue. (Your datasource has not Tag property to hold the e.Style.Tag that you are setting, so it is lost.) If you want to do save the style.Tag property, then you need to cache it is grid.Model.SaveCellInfo and then provide it in grid.Model.QueryCellInfo. Here is a kb link that does something similar to save style.FormulaTags in a GridDataBoundGrid. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=104&catId=11

AD Administrator Syncfusion Team April 13, 2005 08:33 AM

I am confused I am trying to read the tag property in my savecellinfo method and it is already gone. Should I use the formulatags instead?

AD Administrator Syncfusion Team April 13, 2005 08:48 AM

So, in your SaveCellInfo event handler, is e.Style.Tag empty?

AD Administrator Syncfusion Team April 13, 2005 09:09 AM

In the DropDownUserCell OnSaveChanges method I added the following code: this.StyleInfo.Tag = ddUser.GetValues(); I have tried many variations (including setting the tag on the model for the cell). In my on save event when I read the cells e.Style.Tag it is undefined.

AD Administrator Syncfusion Team April 13, 2005 10:01 AM

In OnSaveChanges, try putting the Tag directly into the grid. this.Grid.Model[RowIndex,ColIndex].Tag = ddUser.GetValues();

AD Administrator Syncfusion Team April 13, 2005 11:11 AM

See my original post that is what I tried at first.

AD Administrator Syncfusion Team April 13, 2005 12:20 PM

Here is the sample we ship modified to use a GridDataBoundGrid. The Tag set in renderer.OnSaveChanges makes it to the grid.Model.SaveCellInfo eventhandler in this sample for me using Does it for you? What are you doing differently? http://www.syncfusion.com/Support/user/uploads/CS-forum042004.zip

Live Chat Icon For mobile
Up arrow icon