Home > Net >  ContentControl and DataGrid WPF paging, and then want to achieve in the paging database connection h
ContentControl and DataGrid WPF paging, and then want to achieve in the paging database connection h

Time:10-08

I use first controls ContentControl implement paging




Then add user controls UserControl1 xaml, implements the click the button to achieve different different page

. But I'm UserControl1 xaml because the knowledgeable thought for a long time do not know how to connect to the database, please bosses guidelines


When no ContentControl, can connect to the database, with the DataGrid in UserControl1. Xaml in the DataGrid seems to be no, not even for bosses give directions

CodePudding user response:

Is actually implemented, click the button, the different under the same window, implement different page switching, the key is I don't know how to connect to the database in different pages

CodePudding user response:

https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/controls/walkthrough-display-data-from-a-sql-server-database-in-a-datagrid-control

Is before I learn this website tutorial has realized the database connection, and then I want to reference this on the paging implementation, found work,

CodePudding user response:

Pray who help me!!!!!!!!!!!!!!!!!

CodePudding user response:

With the sqlconnection

CodePudding user response:

Connection and use the contentControl are two different things, the contents of the datagrid as contentControl can also get the data, don't know how to connect the database to find several article basis to learn first

CodePudding user response:

Already connected, for beginners to learn more
  •  Tags:  
  • C#
  • Related