How to insert a string value into a column that is the type of column is int

Posted by: samo3889 on 12 November 2017, 6:06 am EST

    • Post Options:
    • Link

    Posted 12 November 2017, 6:06 am EST

    Hello,

    I have a column that the Datatype of column is int .

    i have function that convert each int to string and insert into the column But not updated because his type is different than column , Then returns the value as it was.

    i want to be DisplayMember is string

    and ValueMember is int

    How can I do something like that (DataMap or Translate)?

    i use Combolist (…) for int Values, in separate window we select the values,

    (look at the following example in Attachment.)

    Thanks,

    Saleem j

    TestCodeC1flexGrid.zip

  • Posted 13 November 2017, 6:15 am EST

    Hi,

    take a look at the C1FlexGrid sample “DataMap”: https://www.grapecity.com/en/samples/datamap

    Hope this helps

    Wolfgang

  • Posted 14 November 2017, 1:26 am EST

    Hi!

    Thanks Wolfgang.

    And Saleem! yes, you can use DataMap property of FlexGridClassic column to achieve the desired behaviour. I am attaching the modified sample for your reference.

    To know more about DataMap, you can see this:

    http://helpcentral.componentone.com/nethelp/c1flexgrid/C1.Win.C1FlexGrid.4~C1.Win.C1FlexGrid.RowCol~DataMap.html

    Regards,

    Meenakshi

    Prj_GridDataMap.zip

  • Posted 15 November 2017, 12:26 pm EST

    Hi!

    Thanks Wolfgang , Meenakshi

    Meenakshi i have looked up on your attachment “Prj_GridDataMap.zip”

    i notice that you convert the column to comboBox but i want to keep as is

    “choose an option by select item by another form”

    how i can do it without convert column to comboBox ?

    Regards,

    Saleem

  • Posted 16 November 2017, 4:50 am EST

    Hi Saleem,

    I modified your sample so that the column contains an ID value, but the ID is replaced with a text. Note that your selection form also has to provide the selected ID instead of the selected text.

    TestCodeC1flexGrid.zip

    Hope this helps

    Wolfgang

  • Posted 16 November 2017, 6:10 am EST

    Thanks Wolfgang :slight_smile:

    • Meenakshi
  • Posted 16 November 2017, 10:15 am EST

    Thank you Wolfgang for your help and support i really appreciate :slight_smile:

    Regards,

    Saleem

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels