2 Search Pane for same row
2 Search Pane for same row
antoniocib
Posts: 277Questions: 62Answers: 1
It seems strange but it is not, I try to be as clear as possible I need to use the same panes for the same column but only using the if condition I have to sort the data
Eg:
searchPanes:{
columns:[5,3,2 ]
option:[ if (rowData[5] == "Vercelli"){
.draw(); } ]
},
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Can you build a simple example representing what you want to do?
Kevin
Kevin if u want i can do a photo, example is impossible cause idk how to do this,okay?
Hi @antoniocib,
It sounds like you want to implement SearchPanes with custom options. Take a look at this example showing how to set a variety of different custom options.
Take a look at this page for more details on how to set these up.
If this is not what you are after then a photo would be great to try and understand the problem further.
Hope this helps,
Sandy
its same man!
http://damoratraffico.netsons.org/webing/scrivania1.html
@kthorngren and @sandy look this doesnt work, where i wrong
Looks like you have a few issues.
targets: [5]
twice incolumnDefs
with both having the optionsearchPanes
. Only one will be used the others are duplicates and will be dropped. The second set you have will not be used.columns.data
but you are trying to access the row data using array syntax. Instead of this:You need to use this:
columns.searchPanes.options
in the secondsearchPanes
is not correct as it expects label/value pairs as shown in the docs.Kevin
Kevin, i need to see the panes with same column how to do?
Btw works ur way for the first problem.
So you want two search panes for one column?
I don't know of a builtin way to do this. @sandy my be able to provide some options. The only option I can think of is to create a second
scarico
column and usecolumns.visible
to hide the column. For the second pane use the hidden column.Kevin
i thinks is the right way this.. i try it, can u do let me a example in live.datatables?
i used this way but doesnt work
Here you go:
http://live.datatables.net/luwafeqi/1/edit
Kevin
Ty kevin, works, u r the best as always,now I need to do another thing, i need to change the count column in the pane,so i want to change in with data in my column (EPAL,IND,PERD) can i do this?
Attack the photo :
Are you talking about the Cascade Panes feature?
Kevin
Mh,no Kevin, the count of column in the searchpane i want to change with my data
same:
searchpane:{
countColumn: function(row, data){
return data.epal, data.ind, data.perd
}
}
i improvise the code..
You are correct Kevin - there is not built in way to do this. We couldn't see why you would need to have two panes for the same column as the functionality would be exactly the same, only taking up more real estate on the page. I would say that if for some reason you want to have two panes for the same column where SearchPanes generates the options then the solution you have given is probably best. If you are going to be adding custom options however, I would suggest that you make use of the documentation I linked above. This will remove the need to duplicate the column and hide it.
I think from what I am seeing in the picture you want to change the count column to display the totals of the cells in red, is that correct?
Thanks,
Sandy
yes @sandy
For the question 2 serchpanes for the same column i create this:
and
searchPanes:{
columns:[5,7]
},
No, I'm afraid you can't do that when it comes to the count column.
mhh, so i need to create a mini table with column 5 and column 7, can u help me?
@kthorngren Kevin ii think only u can help me, i have this 2 query
select scarico, sum(epal + perd), Sum(ind) From scrivania1 where dlinea !==" " GROUP BY scarico
select scarico_m, sum(epal + perd), Sum(ind) From scrivania1 where dlinea !== " " GROUP BY scarico_m
and i need to stamp this in a mini table in a page where already exist the complete table with all data in