Skip to main content
Nintex Community Menu Bar
Solved

How to select a row in a list view

  • November 6, 2017
  • 3 replies
  • 140 views
  • Translate

Is there a possibilty to select a row in list view programmatically (via rule or javascript code), so that the item click event will be fired? E.g. select the row with id = 1234.

One thing to mention: a "list item click"-method exists for a view, but there a no input mappings for it. So, what is it good for?

 

Best answer by Albarghouthy

Hi,


 


Yes, you can use the following script to select a row and trigger list item click event:


 


$(".grid-body-content-wrapper tbody tr").each(function(index)
{

var itemType ;
itemType = JSON.parse($(this).find("td").eq(0).attr("data-options"));

if(itemType.value=="ListItemID")
{

$(this).addClass("highlighted selected");
$(this).click();
}
})


List item click is an event, you can use it to execute a set of actions (i.e open subview, transfer data...etc)

View original
Did this topic help you find an answer to your question?

Albarghouthy
Forum|alt.badge.img+16

Hi,


 


Yes, you can use the following script to select a row and trigger list item click event:


 


$(".grid-body-content-wrapper tbody tr").each(function(index)
{

var itemType ;
itemType = JSON.parse($(this).find("td").eq(0).attr("data-options"));

if(itemType.value=="ListItemID")
{

$(this).addClass("highlighted selected");
$(this).click();
}
})


List item click is an event, you can use it to execute a set of actions (i.e open subview, transfer data...etc)

Translate

Forum|alt.badge.img+16
How do you apply this script?

Do you add a data label and click literal and then transfer the script over?

If my list view has 3 items, how can i get it to go to row 2?

Thanks

Translate

Hi Sharpharp1,
did you solve that issue already? I have the same need and it appears I am missing something. I want to select the line item the user has clicked before the list was refreshed and updated. Many thanks!
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings