This is a migrated thread and some comments may be shown as answers.

Program Flow for using my own GridButtonColumn to Edit ?

2 Answers 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IQworks
Top achievements
Rank 1
IQworks asked on 21 Mar 2009, 09:33 PM
Hi , 
  I am trying to understand how to use a GridButtonColumn as an Edit button to display my FormTemplate. A few questions.  When I use it, the form magicaly appears. Thats great, but the control freak in me is puzzled.  I would like to control when it displays the form ?
  
  1) When I use a GridButtonColumn, I see it comming into the ItemCommand event, but it disappears, then the form appears. Is it the CommandName, CommandArgument or UniqueName that goes somewhere beyond that to display the actual form ? What events, properties or code is used to turn on a FormTemplate ?  Perhaps the code that turns on the form is expecting a certain combination of CommandName, CommandArgument or even UniqueName ?  Or maybe on of the 'on' properties (onInsert, onUpdate, etc) in combination with ?
  2) Is it just good Telerik to always use the GridEditCommandColum for this ?
  3) Why is there no GridDeleteCommandColumn or is the GridEditCommandColumn used for delete - I see there are delete like properties there ? And I have seen code to that effect - Is this the standard ?
  4)  Is there any documentation explaining the how, why and when for the use of the GridEditCommandColumn vs GridButtonColumn ? Or is the GridButtonColumn intended for all other button uses except Edit and Delete ?
  5) There is some code that requires a UniqueID, but the GridEditCommandColum and GridButtonColumn only have the UniqueName.   

   Sorry, looks like I have 10 "?" for 5 question Items :-)

   When I test changing CommandName, CommandArgument or even UniqueName in certain combinations, I am beginning to think there is a conflict of sorts when I use a  GridButtonColumn for Edit vs a GridEditCommandColumn to display the form.
 
 thanks,
 David

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Mar 2009, 08:12 AM
Hi IQworks,

GridButtonColumn displays a button for each entry in the column. This button can then perform some command.

There are two types of button columns with pre-defined commands:

  • Select - when a button in this column is pressed, the entire row is selected.
  • Delete - when a button in this column is pressed, the entire row is deleted.

In addition, you can add a generic button column and specify what command it performs by setting the CommandName (and CommandArgument) properties. For details on using commands, see Command reference (Event bubbling in Telerik RadGrid).

In addition to specifying the command a button performs, you can specify the type of button the column displays. The available buttons types are: PushButton, LinkButton and ImageButton.

About GridEditCommandColumn:
Initially, the GridEditCommandColumn displays only an Edit button. When the user presses the edit button, if the table view is configured for in-line editing, the Update and Cancel buttons appear in place of the edit button and the cells on the row become editable.

For more information about column types and how to use them, please refer to the following articles:
Column types
Using columns
Demo about column types

I hope this information helps.

Regards,

Pavlina
the Telerik team

 


Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Peter
Top achievements
Rank 1
answered on 10 Dec 2012, 04:34 AM
Yes, why is there no GridDeleteCommandColumn?

The fix is to use:
<telerik:GridButtonColumn ConfirmText="Delete this Item?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
Tags
Grid
Asked by
IQworks
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Peter
Top achievements
Rank 1
Share this question
or