Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、DataGrid を使用するアプリケーションをコーディングしています。私がしたいのは、ヘッダーテキストをSQLデータベース内の列のテキストに置き換えることです..誰かがこれを試したことがありますか、それをどのように達成できるか考えていますか?
あなたがすべきこと。
SQLクエリを使用してDataTableにデータを入力します(GoogleとStackoverflowで簡単に検索できます)。
あなたのクエリが
Select id, Emp_Name from emp;
そのDatatableをItemSourceとしてDataGridに提供します。
これで、グリッドの列はSQLクエリの列と同じになります。すなわち。datagridには2つの列(idとEmp_Name)があります