Alpha Product is new to me for Browser based Software Development. Also I�m new in Browser based Software Development Area.
V11 grid video example we found:
M8 SettingDefaultValuesInNewRecordsInGridPart
Server-side Events:
function AfterInsertRecord as v (e as p)
dim js as c
dim ar as p
ar.defaultValue_Company = e.dataSubmitted.company
dim json as c
json = vartojson(ar,.f.,.t.)
js = �{grid.object}.setStateInfo(� + json + �);�
e.rtc.A_AjaxResponses[].text = js
e.rtc.A_AjaxResponses[..].id = 1
end function
Client-side Events:
afterRowPopulate
if (e.rowNumber == -1) {
var newValue = this.stateInfo.defaultValue_Company;
var ele = $(�{Grid.ComponentName}.V.R +e.rowNumber+�.Company�)
ele.value = newvalue;
}
My 1st query is in which Client-side Event procedure I�ll put the Client-side code when I�ll add the record from Grid�s DetailView component (My configuration is Grid for display data and DetailView for adding new record only. And I�m saving record clicking �Save record and enter a new record� image link button which is provided with the Grid Component)?
My 2nd query is when I�ll use the Server-side Event �AfterInsertRecord� what is the best practice if I want to keep default values for more than one field (i.e. company and lastname field)?
Is there any one who can help me? Your helping will be appreciated.
V11 grid video example we found:
M8 SettingDefaultValuesInNewRecordsInGridPart
Server-side Events:
function AfterInsertRecord as v (e as p)
dim js as c
dim ar as p
ar.defaultValue_Company = e.dataSubmitted.company
dim json as c
json = vartojson(ar,.f.,.t.)
js = �{grid.object}.setStateInfo(� + json + �);�
e.rtc.A_AjaxResponses[].text = js
e.rtc.A_AjaxResponses[..].id = 1
end function
Client-side Events:
afterRowPopulate
if (e.rowNumber == -1) {
var newValue = this.stateInfo.defaultValue_Company;
var ele = $(�{Grid.ComponentName}.V.R +e.rowNumber+�.Company�)
ele.value = newvalue;
}
My 1st query is in which Client-side Event procedure I�ll put the Client-side code when I�ll add the record from Grid�s DetailView component (My configuration is Grid for display data and DetailView for adding new record only. And I�m saving record clicking �Save record and enter a new record� image link button which is provided with the Grid Component)?
My 2nd query is when I�ll use the Server-side Event �AfterInsertRecord� what is the best practice if I want to keep default values for more than one field (i.e. company and lastname field)?
Is there any one who can help me? Your helping will be appreciated.