How can I close row edit in Batch RadGrid using Javascript ?

6 posts, 0 answers
  1. Abitar
    Abitar avatar
    22 posts
    Member since:
    May 2015

    Posted 25 Aug 2015 Link to this post

    I need to ​exit edit mode in batch radgrid ​on client click of a button in that radgrid. Is there any way to do this ?

    I couldn't retreive data entered in the RadGrid while its in edit mode (using javascript : "batchManager.getCellValue(mapCell)").

    I have to do this in client side too.

    Thanks for your help ! 

    AbbasB

     

     
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2213 posts

    Posted 27 Aug 2015 Link to this post

    Hi Abitar,

    Note that when Batch Editing is enabled for RadGrid the cells exit edit mode when they are blurred. There is no need to add custom logic for that functionality.

    Regarding your other query. Would you elaborate in more detail on what data you would like to retrieve? Also when do you need to access that info?

    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Abitar
    Abitar avatar
    22 posts
    Member since:
    May 2015

    Posted 27 Aug 2015 in reply to Viktor Tachev Link to this post

    Hello Viktor,

    I will simplify m demand...

    In my RadGrid I have 2 visible columns : a GridTemplateColumn (col1)  (TextBox in Edit mode) and a GridButtonColumn (col2).

    The client click on the GridButtonColumn opens a RadWindow without firing a postback.

    The user must fill the textbox in col1 then click on the button of the col2 to complete filling data in a PopUp window.

    In the RadWindow, I have 1 Label and 1 Textbox (that represents 2 hidden columns  (col3 and col4) in the RadGrid) and a validation buttons.

    The Label must show the value filled of the col1. The user must fill the textbox and then on validation button click I fire BatchEditingCommand to save data in the RadGrid (and the PopUp of course).

    What I need to do is to retreive the value of the textbox (col2) when I am in edit mode.

    If my request is not clear let me know so I can provide a portion of my code.

    Thank you in advance.

    Abitar

     

     

     

  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2213 posts

    Posted 01 Sep 2015 Link to this post

    Hello Abitar,

    In order to retrieve the value from a cell you can use the getCellValue() client-side method of BatchEditingManager.

    When you have the necessary values you can pass them as additional arguments to the RadWindow when opening it. The approach is illustrated here.

    You can use the OnClientClose event of RadWindow to pass the information entered by the user to the parent window.

    When you have the new data you can set the values for the cells in RadGrid via the changeCellValue() client-side method. For additional information regarding the client-side API available with Batch Editing check out the following article.



    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Abitar
    Abitar avatar
    22 posts
    Member since:
    May 2015

    Posted 01 Sep 2015 in reply to Viktor Tachev Link to this post

    Hello Viktor, 

    The simplest way to do what I wanted was by using RadGrid Batch with edit mode = "Cell". In this edit mode I was able to retreive cells content in read mode and in edit mode. That did the job for me !

    Thank you for your reply anyway.

    Regards,

    Abitar

     ​

     

  6. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2213 posts

    Posted 03 Sep 2015 Link to this post

    Hello Abitar,

    Thank you for sharing your approach with the community.

    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top