B4J Question [ABMATERIAL] I Can't Hide \ Remove Delete Button In ABMTableGrid

I Can't Hide \ Remove Delete Button In ABMTableGrid
 

Harris

Expert
Licensed User
Longtime User
I Can't Hide \ Remove Delete Button In ABMTableGrid
Without how you tried to implement this (code) - we can't help you very much...

Imagine yourself reading this (your post). How would you respond?

I don't know why I responded - other than I have a passion for all things ABM...

Thanks
 
Upvote 0
Without how you tried to implement this (code) - we can't help you very much...

Imagine yourself reading this (your post). How would you respond?

I don't know why I responded - other than I have a passion for all things ABM...

Thanks

Sorry For My Shortness


This Is The Original Code In Demo


B4X:
  Dim script As String = $"_${internalID} = $("#${internalID}").jsGrid({
        height: "100%",
        width: "100%",
        filtering: true,
        inserting: true,
        editing: true,
        sorting: true,
        paging: true,
        autoload: true,
        pageSize: 10,
        pageButtonCount: 5,
        deleteConfirm: "Do you really want to delete the client?",
        controller: {
            loadData: function(filter) {
                return $.grep(${DBdata}, function(client) {
                    var fName = filter.Name.toUpperCase();
                    var fAddress = filter.Address.toUpperCase();
                    return (!filter.Name || client.Name.toUpperCase().indexOf(fName) > -1)
                        && (!filter.Age || client.Age === filter.Age)
                        && (!filter.Address || client.Address.toUpperCase().indexOf(fAddress) > -1)
                        && (!filter.Country || client.Country === filter.Country)
                        && (filter.Married === undefined || client.Married === filter.Married);
                    });                           
            },
            insertItem: function(insertingClient) {
                var json = JSON.stringify(insertingClient);
                 b4j_raiseEvent('${ABMComp.ID}_inserted', {'value':json});
            },
            updateItem: function(updatingClient) {
                var json = JSON.stringify(updatingClient);
                b4j_raiseEvent('${ABMComp.ID}_updated', {'value':json});
            },
            deleteItem: function(deletingClient) {
                var json = JSON.stringify(deletingClient);
                b4j_raiseEvent('${ABMComp.ID}_deleted', {'value':json});
            }   
        },
        fields: [
            { name: "Name", type: "text", width: 150 },
            { name: "Age", type: "number", width: 50 },
            { name: "Address", type: "text", width: 200 },
            { name: "Country", type: "select", items: ${cmbCountries}, valueField: "Id", textField: "Name" },
            { name: "Married", type: "checkbox", title: "Is Married", sorting: false},
            { type: "control" }
        ]
    });"$

  InternalPage.ws.Eval(script, Array As Object(ABMComp.ID))



This Is After I Modify IT

By Remove

B4X:
deleteConfirm: "Do you really want to delete the client?",

And

B4X:
,
            deleteItem: function(deletingClient) {
                var json = JSON.stringify(deletingClient);
                b4j_raiseEvent('${ABMComp.ID}_deleted', {'value':json});
            }


And Add

B4X:
deleting: false,

Code Became Like That

B4X:
  Dim script As String = $"_${internalID} = $("#${internalID}").jsGrid({
        height: "100%",
        width: "100%",
        filtering: true,
        inserting: true,
        editing: true,
        sorting: true,
        paging: true,
        autoload: true,
        pageSize: 10,
        pageButtonCount: 5,
        deleting: false,
        controller: {
            loadData: function(filter) {
                return $.grep(${DBdata}, function(client) {
                    var fName = filter.Name.toUpperCase();
                    var fAddress = filter.Address.toUpperCase();
                    return (!filter.Name || client.Name.toUpperCase().indexOf(fName) > -1)
                        && (!filter.Age || client.Age === filter.Age)
                        && (!filter.Address || client.Address.toUpperCase().indexOf(fAddress) > -1)
                        && (!filter.Country || client.Country === filter.Country)
                        && (filter.Married === undefined || client.Married === filter.Married);
                    });                           
            },
            insertItem: function(insertingClient) {
                var json = JSON.stringify(insertingClient);
                 b4j_raiseEvent('${ABMComp.ID}_inserted', {'value':json});
            },
            updateItem: function(updatingClient) {
                var json = JSON.stringify(updatingClient);
                b4j_raiseEvent('${ABMComp.ID}_updated', {'value':json});
            }
        },
        fields: [
            { name: "Name", type: "text", width: 150 },
            { name: "Age", type: "number", width: 50 },
            { name: "Address", type: "text", width: 200 },
            { name: "Country", type: "select", items: ${cmbCountries}, valueField: "Id", textField: "Name" },
            { name: "Married", type: "checkbox", title: "Is Married", sorting: false},
            { type: "control" }
        ]
    });"$

  InternalPage.ws.Eval(script, Array As Object(ABMComp.ID))


Thanks For Your Response Harris
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
This appears to be jsgrid... I have not used this so I have no idea as to the internal workings.
However, you may want to ws.eval.flush to force page update - possibly...

ABMTable is easy to work with.

@alwaysbusy is on a well deserved vacation for a week or so - he may know.

Thanks
 
Upvote 0
This appears to be jsgrid... I have not used this so I have no idea as to the internal workings.
However, you may want to ws.eval.flush to force page update - possibly...

ABMTable is easy to work with.

@alwaysbusy is on a well deserved vacation for a week or so - he may know.

Thanks

I can't work With abmcombo on abmtable


And I Resolve It Today By Adding this line

B4X:
deleteitem: false

Thanks For Your Response Harris
 
Upvote 0
Top