Filtering Columns that starts with a given string

Filtering Columns that starts with a given string

dgupta23dgupta23 Posts: 4Questions: 0Answers: 0
edited July 2009 in General
Hi ,
As suggested by Allan in order to customize the filtering criteria of Data tables there are two ways

1. Write your own custom function

2. Modify the regular expression according to your needs

i am following the second approach of modifying the regular expression. I have a business case where i need to filter columns in which the text starts with a given input string

for example If I have two rows

Row 1 : ABC YYXYZ DEF
Row 2 : ABCC XYZ DEF

Now if I search for substring "XYZ" then only Row 2 should be filtered and not row1 . I tried changing the original regular expression but with no luck.

Any help will be appreciated

Thanks

Replies

  • allanallan Posts: 63,578Questions: 1Answers: 10,483 Site admin
    Hi dgupta23,

    Have a look at this post, which covered what you are looking at: http://datatables.net/forums/comments.php?DiscussionID=261

    Regards,
    Allan
This discussion has been closed.