Inhalte aufrufen

Profilbild

dropdown loading in grid

dropdown loading in grid

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
7 Antworten zu diesem Thema

#1 venkatesh.r

venkatesh.r

    Newbie

  • Members
  • 7 Beiträge

Geschrieben: 15 November 2019 - 09:27

I tried to show dropdown in grid.But i can't load.I also refered the  Admin/Product/_CreateOrUpdate.Categories & Admin/Product/_CreateOrUpdate.Attributes pages and used that below code.But that particular function not hitted.Kinldy help me.

 

<script>

function OntestdropEdit(e) {
            if (e.mode == "edit") {
$('#testdrop')
                        .data('select-selected-id', e.dataItem['testdropId'])
.data('select-init-text', e.dataItem['testdropName'])
                        .val(e.dataItem['testdropId'])
                        .trigger('change');
              
}
        }
 
        function ontestdropBound(e) {
              $('#testdrop').selectWrapper({ resetDataUrl: '@Url.Action("LoadDrop", "Test")'});

 

</script>

 


#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3441 Beiträge

Geschrieben: 15 November 2019 - 12:31

No error message, i.e. in the browser console? Maybe your Url.Action requires an area statement. Note that the related model properties
uses editor templates like ProductCategory, ProductManufacturer, ProductAttribute by using UIHint attribute.

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#3 venkatesh.r

venkatesh.r

    Newbie

  • Members
  • 7 Beiträge

Geschrieben: 15 November 2019 - 12:54

Yes,No error message in browser console.Thats the reason to can't find out the error.I also declared area name in the url action and UIhint attribute in the configure model.still i click the edit button in grid it showed as  the textbox instead of dropdown and not hitted the function.



#4 venkatesh.r

venkatesh.r

    Newbie

  • Members
  • 7 Beiträge

Geschrieben: 16 November 2019 - 06:22

Below line is using to show dropdown in grid.any wrong with that line or add any attributes?

 

columns.Bound(x => x.testdrop);



#5 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3441 Beiträge

Geschrieben: 18 November 2019 - 12:58

Where is your editor template located and how do the template and Test.LoadDrop look like?


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#6 venkatesh.r

venkatesh.r

    Newbie

  • Members
  • 7 Beiträge

Geschrieben: 19 November 2019 - 06:47

Sorry i didn't understand.Please show some example



#7 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3441 Beiträge

Geschrieben: 19 November 2019 - 11:04

For instance editor template to render product categories.
For instance action method to load all categories via Ajax.
For instance applying an editor template to a view model property.

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#8 venkatesh.r

venkatesh.r

    Newbie

  • Members
  • 7 Beiträge

Geschrieben: 20 November 2019 - 07:24

Thank you so much.Its working perfectly :)