Avoid Special Characters Search in JqGrid Toolbar

前端 未结 1 2076

I have successfully build Jq GRid with Asp.Net with all the required features except the one to \"Avoid Spl Characters in Tool Bar Search\" . I tried to find the ID of the t

相关标签:
1条回答
  • 2021-01-15 13:06

    The Toolbar Searching has beforeSearch event handler which can return false to stop searching. One can use this for validation of the data.

    If you do want to know how to find the searching field manually you should understand following. The ids of the fields in the searching toolbar will be constructed from the "gs_" prefix and the name of the column. You should also understand, that the toolbar is not a part of the <table> element. jqGrid build some dives over the <table> element. For example if your <table> has id="list", the name of the div which contain the searching toolbar as a child (not a direct child) are #gview_list.

    UPDATED: I created an example for you. Try to type and text in the search field for names which is not 5 characters long and you receive an error message and the searching will be stopped.

    0 讨论(0)
提交回复
热议问题