Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SelectItem in listgrid not opening from first click

    Hi, I'm using Smartclient v12.1p_2023-08-16/Pro. I'm trying to make a feature that when selecting a selectItem in grid it will open automatically its picklist. Is that even possible? Because in my case by clicking first i select the cell and second time clicking i can open the picklist.
    Click image for larger version  Name:	not selected.png Views:	0 Size:	548 Bytes ID:	272142 - not selected
    Click image for larger version  Name:	firstClicking.png Views:	0 Size:	783 Bytes ID:	272144​ - first click (cell selection)
    Click image for larger version  Name:	secondClick.png Views:	0 Size:	1.6 KB ID:	272145- second click (opening the pick list)
    Attached Files
    Last edited by AlexBabii; 11 Apr 2024, 06:28.

    #2
    SelectItem.showPicker() is the API, and you might call it from startEditing(). You can use listGrid.getEditFormItem() to obtain a reference to the SelectItem (do not try to hang onto a reference, as editors are dynamically re-created).

    Comment


      #3
      Hi Isomorphic is it possible to identify record or cell that i'm clicking on? Because when i change selection to other cell the previous picklist opens for a second then closes. Click image for larger version

Name:	issue.png
Views:	24
Size:	451.3 KB
ID:	272154

      Comment


        #4
        It's not quite clear what you're asking, since you seem to already be identifying the cell correctly (you called getFieldName(), which is fine). getEventRow() would give you the index of the current Record if that's what you need, although getEditedRecord() also does that if you are looking for the value.

        Also, you seem to have implemented cellClick, whereas editorEnter is probably more appropriate.

        Comment


          #5
          Isomorphic thank you for the help!

          Comment

          Working...
          X