telerik:RadGridView delete and delete Message

8 posts, 0 answers
  1. Shakti SIngh Dulawat
    Shakti SIngh Dulawat avatar
    89 posts
    Member since:
    Oct 2009

    Posted 17 Nov 2010 Link to this post

    Hello friend
    I have telerik:RadGridView
    I want
    1) User can not delete record
    2) I want a message when they delete record confirmation message
    3) User can not insert new record

    I am using keyboard Insert and delete key for that

    Shakti
  2. Shakti SIngh Dulawat
    Shakti SIngh Dulawat avatar
    89 posts
    Member since:
    Oct 2009

    Posted 17 Nov 2010 Link to this post

    I got two answer CanUserDeleteRows="False" CanUserInsertRows="False"
    Now only want to know about confirmation message before delete
  3. DevCraft banner
  4. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 17 Nov 2010 Link to this post

    Hi Shakti SIngh Dulawat,

    Setting CanUserDeleteRows to false will disable item removal altogether. If you would like to be able to delete rows only after the pending delete operation has been confirmed you should use our Deleting event. This event will fire just before any items are deleted. You can show the confirmation window when the Deleting event is fired and cancel it, which will cancel the pending delete operation, by setting e.Cancel = true.

    Hope this helps.


    Sincerely yours,
    Milan
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. joao rodrigues
    joao rodrigues avatar
    20 posts
    Member since:
    Mar 2010

    Posted 09 Nov 2011 Link to this post

    Hi Milan,

    How can I perform the same but with an Async call in RadGridView_Deleting event ?

    Examples:
    1 - I need to check in database if some condition is valid before allowing the user to save.
    2 - Or, I need to open a ChildWindow and Wait for it to be closed before feeding the "e.Cancel" with a value.

    Currently I'm using some kind of trick but I really don't like it. 
    The trick is that :
    e.Cancel is allways True in RadGridView_Deleting. After that the async operation is called (opening of the ChildWindow, RIA call, etc...) and in it's Closed/Loaded/Done. event I perform the delete (or not) myself based on Async Return.
    Yet, as I've said, I really hate this way...

    There is Any COOL "Telerik's Way" to perform this kind of tasks ?

    Thanks
  6. Heiko
    Heiko avatar
    123 posts
    Member since:
    Oct 2012

    Posted 28 Sep 2012 Link to this post

    I have a similar issue here when I try to use RadWindow.Confirm(...) In Grd_Deleting event I set e.Cancel = true, then call RadWindow.Confirm(...) and finally in the Closed callback I call RadGridViewCommands.Delete.Execute(this.grdAppt.SelectedItems); Nothing happens.
    What is going wrong? Any idea someone?

    Regards
    Neils
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Sep 2012 Link to this post

    Hello Neils,

     This thread is actually quite old, that is why it would be better to open a new thread sending us a demo project showing the problem you have met.

    Greetings,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  8. joao rodrigues
    joao rodrigues avatar
    20 posts
    Member since:
    Mar 2010

    Posted 29 Sep 2012 Link to this post

    This thread is old indeed, yet, my question remains unanswered.

    Regards,
    Joao
  9. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 29 Sep 2012 Link to this post

    Hi Neils,

    Please use this code instead and let me know about the result:

    var deleteCommand = RadGridViewCommands.Delete as RoutedUICommand;
    deleteCommand.Execute(null, this.grdAppt);


    Greetings,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top
DevCraft banner