powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / Insert в таблицу
2 сообщений из 2, страница 1 из 1
Insert в таблицу
    #35344318
Voitovych
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Unable to scroll to the newly inserted row.
(Error ID:InsScroll)
Это сообщение появляется после нажатия на меню Insert, если указатель был на последней записи.Указанное сообщение появляется также и в примере – после выбора меню "w_customershort". Как определить вид object DataWindow в data window? Если FreeForm, то не выполнять Scrolling.
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
//  Make sure that the new row is visible

//  Function Name:  uf_InsertRow

//  Insert a new row into the DataWindow.

//  Arguments:
//     ai_where      // where to insert the row:
//                  // = - 1  - at the current row position
//                  // =   0  - after the last row (append)
//                  // =  n> 0  - at row # n

//  Return Values:
//     True       // success
//     False      // failure

// НЕ СОВСЕМ ПРАВИЛЬНО работает если указатель на  последней записи
// и сделан click on submenu InsertRow если стиль представления 
//	FreeForm.  Имело место и записано  28 . 05 . 2008 
// Выводится информационное сообщение, но введенная запись
//	при необходимости может быть добавлена в таблицу!
//	Не знаю как проверить стиль представления, если в случае
//	FreeForm , то Scrolling НЕ УМЕСТЕН.

//  If the function returns False, it has also displayed an error
//  by calling error.uf_Error().

//  Local Variables:
Long ll_origrow     // original row #
Long ll_newrow      // new row #
Long ll_result      // result of InsertRow function call

//  Perform row-departure-processing on the current row

IF not This.uf_RowDepart(False) THEN GOTO ErrorExit

//  Determine where to insert the new row

IF ai_where <  0  THEN              // - 1 :  insert at current position
   ll_origrow = This.GetRow()      // what is the current row #
   ll_newrow = ll_origrow            // insert row at current position
ELSEIF ai_where =  0  THEN          //  0 :   append
   ll_newrow =  0                    // code for append
ELSE                             // > 0 :  a row #
   ll_newrow = ai_where             // position for the new row
END IF

//  Insert the new row

ll_result  = This.InsertRow(ll_newrow)  // insert a row here

//  Check the result

IF ll_result <=  0  THEN GOTO ErrorInsert

//  Make sure that the new row is visible

IF This.ScrollToRow(ll_result) <>  1  THEN    // try to scroll
   error.ii_severity  =  3     // warning message
	//+  28 . 05 . 2008  MessageBox(""," 322.u_dw_base~n~nIF This.ScrollToRow(ll_result) <> 1 THEN")
   error.is_errorid   = "InsScroll"
   error.Object      = This.ClassName()
   error.ObjectEvent = "uf_InsertRow"
   error.uf_Error()         // display the warning message
END IF

//  Successful return

RETURN True

//  Error handling

ErrorInsert:
error.is_errorid   = "InsertRow"
GOTO ErrorHandler

ErrorHandler:
error.WindowMenu  = Parent.ClassName()
error.Object      = This.ClassName()
error.ObjectEvent = "uf_InsertRow"
error.ii_severity  =  2 
error.uf_Error()         // display the error message
GOTO ErrorExit

ErrorExit:
RETURN False 
...
Рейтинг: 0 / 0
Insert в таблицу
    #35344838
PaulJB
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Processing DataWindow object property

Description

The type of processing required to display the data in the selected presentation style.

Controls

DataWindows

Syntax

PowerBuilder dot notation:

dw_control.Object.DataWindow.Processing

Describe argument:

"DataWindow.Processing"

Return values are:

0 - (Default) Form, group, n-up, or tabular
1 - Grid
2 - Label
3 - Graph
4 - Crosstab
5 - Composite
6 - OLE
7 - RichText
8 - TreeView
9 - TreeView with Grid
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / PowerBuilder [игнор отключен] [закрыт для гостей] / Insert в таблицу
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]