SetInsertRow=true click event

8 posts, 2 answers
  1. Abhay
    Abhay avatar
    22 posts
    Member since:
    Dec 2011

    Posted 27 Dec 2011 Link to this post

    I have applied SetInsertRow=true property to my telerik group but I need to ask if there is any click event associated with this property. When i click on "Click here to add new row" tab which appears when i apply this property I need to carry out some validations and set CanUserInsertRows= true or false based on that. Please tell me if there is any click even for "Click here to add new row" tab????
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 27 Dec 2011 Link to this post

    Hello Abhay,

    Actually, when you click on that specific area, AddingNewDataItem event will be fired. As it is cancelable, you can perform the required logic inside and stop insertion of a new item, if it fails. 

    Kind regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Abhay
    Abhay avatar
    22 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    The solution you have suggested isnt working,,,,,,,,,, i applied AddNewItem event and checked the validation within it but it isnt validating and insertion of rows is happening as usual. Please suggest an alternative or elaborate on the current solution.
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 28 Dec 2011 Link to this post

    Hello Abhay,

    Could you verify what is the exact scenario that you want to implement ? Do you want to be able to cancel insertion of a new item or you want to validate it while editing ? Do you require performing validation for all items ?
    Generally, any relevant information about your exact requirements would be helpful.

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Abhay
    Abhay avatar
    22 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    Thanks, that worked! I am facing one more trouble,,,,,,, in my grid I wish to have first column as a Read only Serial number column( should start from 1 and auto increment for each row added). It should be auto increment column and self generation. Is there any such property for columns in radgrid?  
  6. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 28 Dec 2011 Link to this post

    Hello,

    You can take a look at this demo for a reference.
     

    Regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Abhay
    Abhay avatar
    22 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2011 Link to this post

    It is working,,,, thanks a ton!!!!! Initially I had some trouble with this.Refresh() inside OnPropertyChangedmethod on MyColumn page. In my case i just commented it out and it started working. Could you please explain the purpose of that statement and how it should be?
  8. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 28 Dec 2011 Link to this post

    Hi,

    Generally, this statement ensures that when you remove an item, the values of the column (the indices of the items) are correctly recalculated.
     

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top