diff --git a/djblets/static/djblets/js/datagrid.js b/djblets/static/djblets/js/datagrid.js
index 438ab437fea07161b257b0e57867cd8a07bf477e..0191dab07f12cdf3ca51a7872e17849bc5fe225b 100644
--- a/djblets/static/djblets/js/datagrid.js
+++ b/djblets/static/djblets/js/datagrid.js
@@ -6,12 +6,13 @@
  */
 (function($) {
 
-
-/*
- * Creates a datagrid. This will cause drag and drop and column
- * customization to be enabled.
+/**
+ * Create a datagrid.
+ *
+ * This will enable drag and drop column customization for the datagrid, as
+ * well as supporting a mobile-friendly mode.
  */
-$.fn.datagrid = function(options) {
+$.fn.datagrid = function() {
     var $grid = this,
         gridId = this.attr("id"),
         $menu = $("#" + gridId + "-menu"),
@@ -40,8 +41,6 @@ $.fn.datagrid = function(options) {
         $savedTHead,
         lastWindowWidth;
 
-    options = options || {};
-
 
     /********************************************************************
      * Public methods
@@ -185,7 +184,6 @@ $.fn.datagrid = function(options) {
             numCols = origHeaderCells.length,
             bodyWidths = [],
             headWidths = [],
-            extraWidth = 0,
             bodyContainerWidth,
             width,
             i;
@@ -402,6 +400,10 @@ $.fn.datagrid = function(options) {
 
         $savedTBody = $(table.tBodies[0]);
         $(table.tBodies[0]).replaceWith($newTBody);
+
+        $grid
+            .attr('data-datagrid-display-mode', 'mobile')
+            .trigger('datagridDisplayModeChanged', {mode: 'mobile'});
     }
 
     /*
@@ -415,6 +417,10 @@ $.fn.datagrid = function(options) {
             $($bodyTable[0].tBodies[0]).replaceWith($savedTBody);
             $headTable.find('thead').replaceWith($savedTHead);
         }
+
+        $grid
+            .attr('data-datagrid-display-mode', 'desktop')
+            .trigger('datagridDisplayModeChanged', {mode: 'desktop'});
     }
 
 
