The display of the GridView is incomplete. -- The GridView removes the scroll bar and the gridview -- gridview
The reason that the display of the GridView is incomplete is that a sliding control is applied to its outer layer. The solution is to override the GridView, which means that the GridView cannot be rolled, and write a class that inherits the code of the GridView as follows:
public class TagsGridView extends GridView {public TagsGridView(Context context) {super(context);// TODO Auto-generated constructor stub}@Overrideprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {int expandSpec=MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);super.onMeasure(widthMeasureSpec, expandSpec);}}
C # Use the gridview to display data. Only the page is displayed. the scroll bar will not be displayed.
Can I take a screenshot to see it?
The problem of adding a scroll bar in the gridview is as follows,
As far as I know, scrolling is not required on the gridview. Because the GridView itself can implement paging, it is of little significance to implement Scrolling on the web. So your scroll bar is not the scroll bar of the gridview, but the height of the gridview is higher than that of the outer parent container, so the outer parent container has a vertical scroll bar.
So here we want to talk about the scroll bar of the outer parent container. If you scroll the scroll bar of the parent container, the content is rolled up, and the content of the GridView is the content of its parent container, naturally, it is also scrolled up and won't be left for the title (the term is frozen ). So here is only an outer scroll, and it cannot meet your requirements.
However, we can basically tell from your problem that it is a web programming problem, so I suggest you use pagination instead of scroll bars. If you really want to use the prompt provided by the first floor. But neither of you have a good grasp of the problem.
You are talking about the GridView in web programming, and the DataGridView in forms programming on the first floor, there is a difference between the two. The ScrolBars attribute does not exist in the GridView. However, in forms programming, the attributes of the scroll bar are used because the form paging implementation is not suitable. This is why you cannot find the rolling attribute in the GridView.
So I suggest you do not use the scroll bar. The height of the parent container can be directly extended, and the paging method is used to solve the problem when the data volume is large. If you really do not want to use pagination and must use the scroll bar, you can consider referencing the DataGridView in the Forms space instead of using the GridView. However, such use always seems nondescribable and has poor performance.
So you should understand what I mean on the first floor.
Of course, we usually have a very good hand, that is, if you use WPF, You can redefine the GridView, then you want a scroll bar, it is very easy-Microsoft's goal is to replace Forms and Web programming with WPF. In their words, this kind of implementation is more dazzling and a more intelligent interface is realized.