Removing tables from the HTML output of the Datalist Web Part

Lucas Johnson asked on October 23, 2015 00:13

HEllo all,

I'm new to Kentico and I am using the Datalist Web Part to add and display content. The problem I am having is that when it comes to styling the part I notice in inspector that Kentico has added a table. I would like to be able to remove this, or at the very least hide it so that it doesn't effect the styling of my site. Does anyone know a solution to this problem? I'm assuming that this is happening because I am displaying the tabled contents of a database.

Any and all help is greatly appreciated :)

Thanks!

Image Text

Correct Answer

Brenden Kehren answered on October 23, 2015 05:19

You will find what you need in the Output Filter section of the web part. Check the box to filter the output and uncheck the others. Then in the drop-down select the second option to convert all table tags.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Lucas Johnson answered on October 23, 2015 16:37

Thanks Brenden!

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 23, 2015 17:33

You can set it globally as well, bad part is your site will take a performance hit by enabling this. I typically set it up on a web part by webpart basis.

1 votesVote for this answer Mark as a Correct answer

Lucas Johnson answered on October 23, 2015 18:00

I'm thinking the best solution would be to just clone the Web Part that I want to use, and just customize it to how you want it? In my case, set to remove tables.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 23, 2015 18:28

Some controls don't allow you to. For example a gridview or unigrid. Those are meant for tabular data. Same with a data grid. Easiest OOTB solution is to render the tables as div tags.

1 votesVote for this answer Mark as a Correct answer

Lucas Johnson answered on October 23, 2015 20:25

Gotcha, thanks again :)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.