c# - Datagrid scrolling in Windows s Mobile way to get rid of scroll bar? -


I have a very simple form using a compact framework. I have two search fields, a search button and a datagrid. The button sets the data grid on the form for the data source, I know that I can set the height and width on the datagrid, but I do not want the user to use scroll bars on the data grid because it contains a few hundred records Are there. I want to use the scroll bar on the form to scroll the user. How can I complete it? I'm assuming that the behavior you want is for a vertical scroll bar

is spread across the form, it does not take all the space on the DataGrid form.

You can add a VScrollBar on the side of the form and set to its maximum, the total line number of your DataGrid . Then append the scroll bar to ValueChanged and manipulate the selected row of your DataGrid . This effect would be copying the scrolling behavior of DataGrid .

Hiding the scroll bar of the hard part DataGrid , because there is no one in it to hide the property, you can increase its width so that the scroll bar is render on the screen , But remember to set the form's Autosolol property to false so that it does not render the horizontal scroll bar DataGrid clause will appear

Depending on your application, you ListView to view From property to description . ListView is very easy to manipulate compact profiles and can fit your application better. If you want, you can also use the VScrollBar technology and apply it to ListView .


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -