I have 3 standard toolbar buttons Insert/Edit/Delete and I would like to enable them accordingly, I am using this code but after I insert or edit something, the values of the conditions are good, yet the buttons are still wrongly enabled... What am I doing wrong?
thanks
<asp:LinkButton ID="btnEditSelected" Style="vertical-align: bottom" runat="server"
CommandName="EditSelected" CausesValidation="false"
Enabled='<%# (theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 && theGrid.SelectedIndexes.Count > 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="edit..." src="../../Include/Images/grid/Edit.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Edit.gif" /></asp:LinkButton>
<asp:LinkButton ID="btnInitInsert" runat="server"
CommandName="InitInsert" CausesValidation="false"
Enabled='<%# !theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="ins..." src="../../Include/Images/grid/Insert.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Insert.gif" /></asp:LinkButton>
<asp:LinkButton ID="btnCancel" runat="server"
CommandName="Delete" CausesValidation="false"
Enabled='<%# !theGrid.MasterTableView.IsItemInserted && theGrid.EditIndexes.Count == 0 && theGrid.SelectedIndexes.Count > 0 %>'>
<img style="border:0px;vertical-align:middle;" alt="del..." src="../../Include/Images/grid/Delete.gif" originalAttribute="src" originalPath="../../Include/Images/grid/Delete.gif" /></asp:LinkButton>