This is a migrated thread and some comments may be shown as answers.

Set Disable Row

3 Answers 2705 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Muhammad Fiqih
Top achievements
Rank 1
Muhammad Fiqih asked on 01 Aug 2018, 07:03 AM

Hi, i want to ask about something, can us set disable in row kendo grid with condition? 

Thank's

3 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 02 Aug 2018, 11:32 AM
Hi Muhammad,
      
You can disable any element by applying CSS to it and setting the pointer-events property to none. I have created a sample Dojo project which conditionally applies this style. You can find the sample here: Disable Grid Row Conditionally

For your convenience I am pasting the CSS class here:
.disabled{
    opacity:0.5;
    pointer-events:none;
  }

If you have further questions, feel free to contact us.

Best regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Muhammad Fiqih
Top achievements
Rank 1
answered on 03 Aug 2018, 04:09 AM

thanks for your answer, but i have done for my question in above, with this syntax

{

editable: false,
edit : function(e){
var fieldName = e.container.find("input[data-type='number']").attr("name");
if((fieldName === "contributionMonthN_M3" || 
fieldName === "contributionMonthN_M2" ||
fieldName === "contributionMonthN_M1" ||
fieldName === "contributionMonthN" || 
fieldName === "contributionMonthN_P1" ||
fieldName === "ssuMonthN_P1" || 
fieldName === "ssuAdjustMonthN_P1" ||
fieldName === "contributionMonthN_P2" ||
fieldName === "ssuMonthN_P2" ||
fieldName === "ssuAdjustMonthN_P2" ||
fieldName === "contributionMonthN_P3" ||
fieldName === "ssuMonthN_P3" ||
fieldName === "ssuAdjustMonthN_P3") &&
   !e.model.IsEditable) {
this.closeCell()
}

}

 

thank you

Best regards,

Fiqih

0
Tsvetomir
Telerik team
answered on 06 Aug 2018, 05:33 PM
Hello Fiqih,

Thank you for sharing your specific solution with our community. I hope it will prove helpful to other developers as well.

Best regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Muhammad Fiqih
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Muhammad Fiqih
Top achievements
Rank 1
Share this question
or