|
|
|
vs2005, c#, db
|
|||
|---|---|---|---|
|
#18+
Создал пользуясь руководством из msdn проект с бд(борей.mdb) Creating the ColumnChanging Event Handler To create the validation event handlers Open the NorthwindDataSet in the Dataset Designer by double-clicking the NorthwindDataSet.xsd file in Solution Explorer. Double-click the Quantity column in the OrderDetails table to create the OrderDetailsDataTable_ColumnChanging event handler. (In C# only the data table's partial class will be created.) //-------------------------------------------------- На это действие у меня появляется код в модуле БорейDataSet.cs namespace ValidationWalkthrough { partial class БорейDataSet { partial class ЗаказаноDataTable { } } } и ни духу обработчика ColumnChanging, ужо потыкал по всем компонентам что на форме и под формой — нема такого — как его добавить? //--------------------------------------------------------------------------------------------- Add code to verify that e.ProposedValue contains values greater than 0. If the proposed value is 0 or less, set the column to indicate that it contains an error. Paste the following code into the column-changing event handler below the Add user code here comment: C# Copy Code if ((short)e.ProposedValue <= 0) { e.Row.SetColumnError("Quantity", "Quantity must be greater than 0"); } else { e.Row.SetColumnError("Quantity", ""); } C ув. Tors ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.07.2006, 11:28 |
|
||
|
|

start [/forum/topic.php?fid=17&fpage=106&tid=1353229]: |
0ms |
get settings: |
8ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
56ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
38ms |
get tp. blocked users: |
2ms |
| others: | 231ms |
| total: | 373ms |

| 0 / 0 |
