|
|
|
DataGrid с просмотром master - detail - master
|
|||
|---|---|---|---|
|
#18+
Имеется dataset с 2-мя таблицами в отношении master-detail. На форме одна DataGrid. При загрузке формы надо видеть содержимое master и иметь возможность перехода к соотв.части detail, при просмотре соотв.части detail надо иметь возможность перехода к master в той же DataGrid. Как этого добиться ? Сколько нужно dataAdapters ? Например, table master (m_id, m_name), table detail (d_id, m_id, d_name). Спасибо ! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.02.2004, 19:17 |
|
||
|
DataGrid с просмотром master - detail - master
|
|||
|---|---|---|---|
|
#18+
типа того private void CreateRelation() { // Get the DataColumn objects from two DataTable objects in a DataSet. DataColumn parentCol; DataColumn childCol; // Code to get the DataSet not shown here. parentCol = DataSet1.Tables["Customers"].Columns["CustID"]; childCol = DataSet1.Tables["Orders"].Columns["CustID"]; // Create DataRelation. DataRelation relCustOrder; relCustOrder = new DataRelation("CustomersOrders", parentCol, childCol); // Add the relation to the DataSet. DataSet1.Relations.Add(relCustOrder); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.02.2004, 19:58 |
|
||
|
|

start [/forum/topic.php?fid=18&gotonew=1&tid=1395973]: |
0ms |
get settings: |
7ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
55ms |
get topic data: |
8ms |
get first new msg: |
5ms |
get forum data: |
2ms |
get page messages: |
30ms |
get tp. blocked users: |
1ms |
| others: | 205ms |
| total: | 331ms |

| 0 / 0 |
