Spectral
09.18.2008
Hello,
You can do the following:
ASPX:
<dxe:ASPxCheckBox ID="ASPxCheckBox1" runat="server">
<ClientSideEvents CheckedChanged="function(s, e) {
grid.PerformCallback(s.GetChecked());
}" />
</dxe:ASPxCheckBox>
C#:
protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
((GridViewCommandColumn)ASPxGridView1.Columns["CommandColumn"]).EditButton.Visible = Convert.ToBoolean(e.Parameters);
}
Regards,
Nathan
I don't think you understood my question, so let me try to explain a bit more. I have attached a picture of the "ASPxGridView Tasks" pane where we have checked the "Enable Editing", "Enable Inserting", and "Enable Deleting". We are looking for a control property like "ASPxGridView1.EnableEditing" that will allow us to modify those ASPxGridView properties, but we couldn't find them. As I explained in our my previous message we need to invoke this to allow/disallow users from inserting/editing/updating records.
Hi,
There are no such properties. When you turn on the 'Enable Editing' task, a command column is automatically created (if needed), and its EditButton.Visible property is set to true. The same occurs when you enable "Enable Inserting", and "Enable Deleting". To prevent end-users from inserting/editing/updating records at runtime, you need to hide required command buttons.
Thanks,
Nathan
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+