GridUpdate

Handles AJAX-based updates for Grid components, enabling real-time synchronization with databases or web services. This component tracks changes to grid data and provides automatic update functionality without full page refreshes.

Syntax

<bx:gridupdate 
    grid="string"
    dataSource="string"
    tableName="string"
    tableOwner="string"
    tableQualifier="string"
    keyOnly="boolean"
    username="string"
    password="string"
    url="string"
    method="string"
    onSuccess="string"
    onError="string">
</bx:gridupdate>

Attributes

Attribute
Type
Required
Default
Description

grid

string

Yes

-

Name of the grid component to update

dataSource

string

No*

""

Data source name for database updates

tableName

string

No*

""

Database table name to update

tableOwner

string

No

""

Database table owner/schema

tableQualifier

string

No

""

Database table qualifier

keyOnly

boolean

No

false

Only update key fields

username

string

No

""

Database username

password

string

No

""

Database password

url

string

No*

""

URL endpoint for HTTP-based updates

method

string

No

"POST"

HTTP method: POST, PUT, or PATCH

onSuccess

string

No

""

JavaScript function to call on successful update

onError

string

No

""

JavaScript function to call on update error

Note: Either dataSource + tableName OR url is required to specify the update destination.

Usage Notes

  • Automatically tracks grid changes (cell edits, row deletions, new rows)

  • Supports both database and HTTP endpoint updates

  • Generates JavaScript handlers for grid interaction

  • Provides event-driven update notifications

  • Maintains change tracking until successful update

Examples

Database Updates

HTTP Endpoint Updates

Database Updates with Authentication

Custom Update Endpoint with Error Handling

Update Data Format

The GridUpdate component sends update data in the following JSON format:

Server-Side Response Format

For HTTP endpoints, the expected response format is:

Error responses should include:

Event Handling

The component fires custom events that can be listened to:

JavaScript API

The component creates a global update function that can be called programmatically:

Security Considerations

  • Database credentials should be handled securely

  • Use HTTPS endpoints for sensitive data

  • Validate all incoming update data on the server

  • Implement proper authentication and authorization

  • Consider rate limiting for update endpoints

  • Grid - Parent grid component that this updates

  • GridColumn - Defines editable columns

  • GridRow - Individual row data that can be modified

Last updated

Was this helpful?