[CLOSED] Gridpanel cell edit based on data type

  1. #1

    [CLOSED] Gridpanel cell edit based on data type

    I have a grid panel and one column displays a text value which could be a number of data types, e.g. "true"/"false" (bool), "123" (int), "hello world" (string). As part of the store, I know what data type the value represents as I return bool int, string as part of the record. So I'm wondering if there's a way of having multiple editors inside a single column field and toggling them on/off based on the datatype in the record? Is there an example of this? Ideally I don't want to build the grid panel dynamically, but use markup.

    I've looked at a property grid, but I need to show more than name/value pair (hence the gridpanel), so I would like to know if this if possible. Any help would be appreciated.
    Cheers,
    Kev
    Last edited by Daniil; Dec 27, 2013 at 4:38 AM. Reason: [CLOSED]
  2. #2
    Hello
    I'm sure ext.net guys will answer you more preciselly, so take this just as my opinion.
    I'm not sure I got "text value which could be a number of data types" - as far as I know the underlying Model value is of well-defined datatype, and when store is loaded, it's converted accordingly if different type. So it sounds like you are changing dynamically column dataIndex?
    Anyway - writing own editor sounds like right option here, having all required controls initialized, , and in before edit grid event just hide the edit controls that you are not interested to display.
    If I'm right with my undersatnding of your need,s I can try to prepare some code for you if needed, later on.

    Regards
    Z
  3. #3
    Hi everybody,

    @Zdenek, thank you for posting! Much appreciated.

    @Kev, yes, there is a possibility to have different editors in one Column.

    The following is possible for a GridPanel as well.
    https://examples2.ext.net/#/TreePanel/Basic/Editors/

    Here is an example with a ComponentColumn.
    https://examples2.ext.net/#/GridPane...tiple_Editors/
    Last edited by Daniil; Dec 24, 2013 at 7:58 AM.

Similar Threads

  1. [CLOSED] Disabling cell editing based on cell value in Ext.Net 2.1
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 30, 2013, 5:35 PM
  2. [CLOSED] Disabling checkbox grid column cell based on data.
    By SymSure in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 09, 2012, 4:25 AM
  3. Change input type based on data type
    By bjones in forum 1.x Help
    Replies: 5
    Last Post: Jan 06, 2012, 9:54 AM
  4. Replies: 3
    Last Post: Nov 02, 2010, 8:35 AM
  5. GridPanel - Refresh Cell After Edit not working?
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Sep 28, 2009, 11:07 AM

Tags for this Thread

Posting Permissions