Pre select row of datatable in searchpanes that have hyperlink
Pre select row of datatable in searchpanes that have hyperlink
pull_stack_developer
Posts: 4Questions: 2Answers: 0
As per the example given here
I ran the demo and now in this html I have done some changes in the following portions:
old portions:
~~
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
.........
<tr>
<td>Airi Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
</tr>
.........
columnDefs: [
{
searchPanes: {
preSelect: ["Accountant", "19"]
},
targets: [1,2,3]
}
]
Output:
~~
changes I have made:
~~
<tr>
<td>Garrett Winters</td>
<td><a href = "#">Accountant</a></td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
.............
<tr>
<td>Airi Satou</td>
<td><a href = "#">Accountant</a></td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
</tr>
............
columnDefs: [
{
searchPanes: {
preSelect: ["Accountant", "19"]
},
targets: [1,2,3]
}
]
.......
Output:
~~
I want to know how I can preselect that row with hyperlink?
This discussion has been closed.
Replies
It needs the original string, trimmed of spaces included - see example here. Not the most obvious, but it does the trick,
Colin
p.s. apologies that you had to post several times, the messages were getting caught by the spam filter.
Get it! thanks