Closed SeanPollock closed 8 years ago
Thanks for the suggestion. I'll try to think of a way to do that
@SeanPollock since 0.3.0 you can.
Define a custom filter function.
def some_filter(cert_row):
if cert_row.type == "Authority1":
return "(Authority 1) " + cert_row.num
elif cert_row.type == "Authority 2":
return "(Authority 2) " + cert_row.num
And don't forget in your view when declaring your ColumnDT, to use the new filterarg
property.
columns.append(ColumnDT('cert_type'))
columns.append(ColumnDT('cert_num'), filter=some_filter, filterarg='row'))
This is awesome, thank you!
Hello.
Thanks for the lib! It's very helpful.
Is there a way that I can access another columns value in the filter function? Eg.
columns.append(ColumnDT('cert_type'))
columns.append(ColumnDT('cert_num'), filter=some_filter))
So that some_filter, I can change the display depending on cert_type?