Can we use Jquery JQgrid with div element instead of table
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t replace
<table>to<div>.The problem is that the code of jqGrid really work with the content of the grid as with the table. The DOM representation of
<tr>element hascellsandrowIndexproperties (see here for example), the<table>hasrowsproperty (see here) which supportsnamedItemmethod (see here) and so on. The usage of methods which are specific for<table>improves performance of jqGrid code.In any way the code of jqGrid really uses that main element of jqGrid is
<table>and not<div>. So the code of jqGrid contains the following lines (see the source code)In other words if you would use come other element (like
<div>) instead of<table>you would get error message with the text “Element is not a table” instead of displaying the grid.