I want to fix the GridView column and scroll through the scroll bar.

Asked 2 years ago, Updated 2 years ago, 105 views

I'm looking for a way to separate the columns to be displayed and the columns to be crawled when scrolling horizontally in GridView on asp.net.
I'm looking for another way to use the style sheet with the keywords Freezing and FreezingCol found in the search because IE11 in Windows 10 doesn't work.

If you have any knowledge, please take care of me.

jQuery is a last resort, so I would like to avoid it.

c# asp.net

2022-09-30 21:43

2 Answers

It's easy to do with fixed_midashi.js.Both IE and Chrome work well.

注意Caution 】
If the asp.net button is in a fixed column, the asp.net event does not run when you press the button while scrolling.
Therefore, javascript indirectly invokes the asp.net event by placing a javaScript click event on the tag (button) where the button is located.

↓Like this

<td style="text-align:center;color:black;"onclick="if(tdClick(this)==false){return false;}">


2022-09-30 21:43

I'm sorry, but I haven't verified it yet, but I think I can use the following methods.
https://www.aspforums.net/Threads/111780/How-to-freeze-GridView-column-and-row-using-jQuery-in-ASPNet/


2022-09-30 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.