New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

fireCommand

Method which triggers specific command for the RadListView when executed. The method is called for the RadListView client instance. The method arguments are the command which will be processed and its corresponding arguments.

This method can be used to invoke custom commands along with a single string argument which can be accessed later on using the OnItemCommand server event.

ASP.NET
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function FireChangePageSizeCommand() {
            var listView = $find("<%= RadListView1.ClientID %>");
            listView.fireCommand("ChangePageSize", 15);
        }
    </script>
</telerik:RadCodeBlock>
CommandType of object used to invoke the methodfireCommand syntaxeventArgs details
EditRadListViewfireCommand("Edit", itemIndex)Example: fireCommand("Edit", 0)
UpdateRadListViewfireCommand("Update", itemIndex)Example: fireCommand("Update", 0)
CancelRadListViewfireCommand("Cancel", itemIndex)Example: fireCommand("Cancel", 0)
DeleteRadListViewfireCommand("Delete", itemIndex)Example: fireCommand("Delete", 0)
InitInsertRadListViewfireCommand("InitInsert",RadListViewInsertItemPosition)RadListViewInsertItemPosition: None = 0,FirstItem = 1, LastItem = ""Example: fireCommand("InitInsert", 1)
PerformInsertRadListViewfireCommand("PerformInsert", "")Required but not usedExample: fireCommand("PerformInsesrt", "")
CancelInsertRadListViewfireCommand("CancelInsert", "")Required but not usedExample: fireCommand("CancelInsert", "")
SelectRadListViewfireCommand("Select", itemIndex)Example: fireCommand("Select", 0)
DeselectRadListViewfireCommand("Deselect", itemIndex)Example: fireCommand("Deselect", 0)
PageRadListViewfireCommand("Page", pageCommand)string argument: "First", "Next", "Prev", "Last",numeric values as string presentationExample: fireCommand("Page", "First")
ChangePageSizeRadListViewfireCommand("ChangePageSize", pageSize)Example: fireCommand("ChangePageSize", 15)
RebindListViewRadListViewfireCommand("RebindListView", "")Required but not usedExample: fireCommand("RebindListView", "")
SortRadListViewfireCommand("Sort", sortExpression)string argument: fieldName (mandatory), sortOrder (optional)Example:fireCommand("Sort", "ContactName DESC")
Not finding the help you need?
Contact Support