Hi to all, I really appreciate the developers of this software.
I created a subform called employees.
In this subform I am able to edit the fields which is really cool.
I want to be able to freeze the left 2 columns while I scroll to the fields to the right.
May I know how to go about this?
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Subform Freeze Columns
-
- Posts: 51
- Joined: Sat May 16, 2020 10:08 am
Subform Freeze Columns
You do not have the required permissions to view the files attached to this post.
Last edited by ernesttan1976 on Sat Aug 01, 2020 8:42 am, edited 2 times in total.
-
- Posts: 51
- Joined: Sat May 16, 2020 10:08 am
Re: Subform
Something like this columns selector, to be able to order the fields in a customized way
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Subform
This is how you could freeze columns. Is this what you had in mind?
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Subform
Add the following code to your (main) form's Custom Code.
Code: Select all
// Save the left position of your 2nd column. Replace **accform000slf_zzzzsys_form_idbutton** with your object ID. (Use the developer console to figure it out)
var originalBtnLeft = $('#accform000slf_zzzzsys_form_idbutton')[0].offsetLeft;
if (nuFormType() == 'edit') {
$('#accform').scroll(function (e) {
var scrollLeft = $(this).scrollLeft();
// Replace slf_zzzzsys_form_idcode with the object ID of your first column
$("[id$='slf_zzzzsys_form_idcode']").each(function () {
$(this).css({
'left': 0 + scrollLeft,
'z-index': '100'
});
});
// Replace slf_zzzzsys_form_idbutton with the object ID of your first column
$("[id$='slf_zzzzsys_form_idbutton']").each(function () {
$(this).css({
'left': originalBtnLeft + scrollLeft,
'z-index': '100'
});
});
});
}
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Subform
For your 2nd question: May I ask you to open a new topic for that? It will be easier for others to find answers in the future.
-
- Posts: 51
- Joined: Sat May 16, 2020 10:08 am
-
- Posts: 51
- Joined: Sat May 16, 2020 10:08 am
Re: Subform Freeze Columns
Success! Thank you Kevin

Code: Select all
// Save the left position of your 2nd column. Replace //**accform000slf_zzzzsys_form_idbutton** with your object ID. (Use the //developer console to figure it out)
var originalBtnLeft = $('#assigned_personnel000emp_name')[0].offsetLeft;
if (nuFormType() == 'edit') {
$('#assigned_personnel').scroll(function (e) {
//assigned_personnel
var scrollLeft = $(this).scrollLeft();
// Replace slf_zzzzsys_form_idcode with the object ID of your first column
//All first column ends with "user_field_01"
$("[id$='user_field_01']").each(function () {
$(this).css({
'left': 0 + scrollLeft,
'z-index': '100'
});
});
//First column header
$("title_assigned_personneluser_field_01").each(function () {
$(this).css({
'left': 6 + scrollLeft,
'z-index': '100'
});
});
//All second column ends with emp_name
$("[id$='emp_name']").each(function () {
$(this).css({
'left': originalBtnLeft + scrollLeft,
'z-index': '100'
});
});
});
}