0
我有SQL列表,其中有三列ID
,CUSTOMERNAME
和ADDRESS
。使用組合框將數據從sql數據庫加載到datagridview中
我想在combobox1中顯示所有客戶ID的列表,當我選擇任何一個ID時,客戶名稱和地址應顯示在datagridview1屬於該ID的位置。
請諮詢我的代碼爲我學習編程的C#
下面是我的app.config
供你參考
<connectionStrings>
<add name="dbx"
connectionString="Data Source=USER\SQLEXPRESS;Initial Catalog=dbInventory;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
請分享您嘗試使用的代碼。 –
我如何分享代碼請指導我。我無法在此寫入 –
您可以編輯您的帖子併爲您提到的問題添加相關的aspx和cs代碼。您還可以使用適當的編輯器功能來格式化文本。看到屏幕截圖.. http://prntscr.com/d8b0c1 –