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.

DropDownUserCell Sample

Thread ID:





27445 Apr 12,2005 05:28 PM Apr 13,2005 01:20 PM Windows Forms 7
Tags: GridControl
Administrator [Syncfusion]
Asked On April 12, 2005 05:28 PM

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.

Administrator [Syncfusion]
Replied On April 12, 2005 09: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

Administrator [Syncfusion]
Replied On April 13, 2005 09: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?

Administrator [Syncfusion]
Replied On April 13, 2005 09:48 AM

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

Administrator [Syncfusion]
Replied On April 13, 2005 10: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.

Administrator [Syncfusion]
Replied On April 13, 2005 11:01 AM

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

Administrator [Syncfusion]
Replied On April 13, 2005 12:11 PM

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

Administrator [Syncfusion]
Replied On April 13, 2005 01: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


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.