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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DropDownUserCell Sample

Thread ID:

Created:

Updated:

Platform:

Replies:

27445 Apr 12,2005 09:28 PM UTC Apr 13,2005 05:20 PM UTC WinForms 7
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 12, 2005 09:28 PM UTC

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 13, 2005 01:00 AM UTC

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 01:33 PM UTC

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 01:48 PM UTC

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

Administrator [Syncfusion]
Replied On April 13, 2005 02:09 PM UTC

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 03:01 PM UTC

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 04:11 PM UTC

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

Administrator [Syncfusion]
Replied On April 13, 2005 05:20 PM UTC

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 3.0.1.0. Does it for you? What are you doing differently? http://www.syncfusion.com/Support/user/uploads/CS-forum042004.zip

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

;