Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:15:33+00:00 2026-05-26T14:15:33+00:00

As I don’t find the right connection between the CommandName property and the calling

  • 0

As I don’t find the right connection between the CommandName property and the calling of the matching method in the C# CodeBehind, I would love to find what happenes here behind the curtains and who’s firing which event and how the connection appears between those two things.

Here is my sample code:

 <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:CommandColumn ButtonAlign="Center">
                    <Commands>
                        <ext:GridCommand Icon="User" CommandName="SwitchToUserDetail" Text="Details"></ext:GridCommand> 
                    </Commands>
                </ext:CommandColumn>
            </Columns>
        </ColumnModel>  


    <DirectEvents>
        <Command OnEvent="SwitchToUserDetail" >
            <ExtraParams>
                <ext:Parameter Name="ID" Value="this.selModel.getSelected().data.id" Mode="Raw" />
            </ExtraParams>
        </Command>
    </DirectEvents>

Everything works fine so far, but again, just to clarify and to explain it hopefully a bit better in my bad english:

This attribute

CommandName="SwitchToUserDetail"

Has some connection with my DirectEvent

<Command OnEvent="SwitchToUserDetail" >
        <ExtraParams>
            <ext:Parameter Name="ID" Value="this.selModel.getSelected().data.id" Mode="Raw" />
        </ExtraParams>
    </Command>

Which I don’t get cause if I have a look in my CodeBehind where my Method SwitchToUserDetail is defined, I’ll get the object and DirectEventArgs of my DirectEvent while that thing has no more to do with The GridCommand…

Any explanation on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:15:33+00:00Added an answer on May 26, 2026 at 2:15 pm

    Connection between the CommandName and the method in code behind provided by command name value. If you will look in JavaScript code that generated by Ext.NET you will see something like this:

    directEvents: {
    command: {fn:function(command,record,rowIndex,colIndex){var params=arguments;
        Ext.net.DirectEvent.confirmRequest({
            extraParams: {"ID":'id'}
            ,control:this,action:'Command'});},delay:20}
    } 
    

    As you see, handler which call your DirectEvent has this arguments: command,record,rowIndex,colIndex. And if you will add new extra parameter “command” to direct event you can make different things accordingly command.

    <Command OnEvent="SwitchToUserDetail" >
        <ExtraParams>
            <ext:Parameter Name="ID" Value="this.selModel.getSelected().data.id" Mode="Raw" />
            <ext:Parameter Name="command" Value="command" Mode="Raw" />
        </ExtraParams>
    </Command>
    

    And on server side you can read it as follows:

    e.ExtraParams[“command”]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't need to do this right now but thinking about the future... What would
Don't know if I worded the question right, but basically what I want to
Don't know what's wrong here, when I run the application it says Specified method
Don't know if this is the right place to ask this, but I will
Don't get me wrong - I love Smalltalk, but... To me, the Squeak interface
Don't ask me why but i can't use this method because I need to
Don't know why but I can't find a solution to this. I have 3
Don't think this is a repost, difficult to search for the word between because
Don't you hate it when you have class Foobar { public: Something& getSomething(int index)
Don't let below code scare you away . The question is really simple, only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.