RadiantQ jQuery Gantt Package
Global Selective ReadOnly settings
Previous Topic  Next Topic 

Selective ReadOnly settings


a) StartTimes are ReadOnly:


To prevent the end user from changing the start time of tasks in the Gantt Chart and Table, use these settings:


   var columns = [

       {

           field: "Activity_M().ID_M()",

           title: "ID",

           width: 25,

           iseditable: false

       },

       {

           field: "Activity_M().ActivityName_M()",

           title: "Activity Name",

           width: 200,

           editor: RadiantQ.Default.Template.ProjectGanttExpandableTextboxEditor(),

           template: RadiantQ.Default.Template.ProjectGanttExpandableTextBlockTemplate()

       },

       {

           field: "Activity_M().StartTime_M()",

           title: "StartTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='ActivityTimeBinder:Activity_M().StartTime_M' />"

       },

       {

           field: "Activity_M().EndTime_M()",

           title: "EndTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='value:Activity_M().EndTime_M' data-getvalueName='getDate' data-setvaluename='setDate'  data-valueUpdate='onBlur'  data-role=\"DateTimePicker\"  />"

       },

       {

           field: "Activity_M().Effort_M()",

           title: "Effort",

           format: "" /*to call the .toString()*/,

           width: 100,

           editor: "<input data-bind='value:Activity_M().Effort_M'  data-role=\"DurationPicker\"  />"

       },

       {

           field: "Activity_M().ProgressPercent_M()",

           title: "ProgressPercent",

           width: 100,

           editor: "<input data-bind='value:Activity_M().ProgressPercent_M' data-role=\"spinner\" data-options='{\"min\":0, \"max\": 100}' />"

       },

       {

           field: "Activity_M().Assignments_M()",

           title: "Resource",

           editor: "<input data-bind='ResourcePickerBinder:Activity_M().Assignments_M'  />",

           template: '<div> ${ RadiantQ.Gantt.ValueConverters.ConverterUtils.GetResourcesText(data.Activity_M().Assignments_M(), false) } </div>',

           width: 100

       },

       {

           field: "Activity.PredecessorIndexString",

           title: "PredecessorIndex",

           isParentEditable: false,

           template: "<div>${data.PredecessorIndexString || '' }</div>",

           editor: "<input data-bind='value:PredecessorIndexString'/>",

           width: 150

       }];


$gantt_container.GanttControl('option', 'IsStartTimesReadOnly', true );

columns[2].iseditable = false;


b) Efforts are ReadOnly:


To prevent the end user from changing the required effort for tasks in the Gantt Chart and Table, use these settings:


   var columns = [

       {

           field: "Activity_M().ID_M()",

           title: "ID",

           width: 25,

           iseditable: false

       },

       {

           field: "Activity_M().ActivityName_M()",

           title: "Activity Name",

           width: 200,

           editor: RadiantQ.Default.Template.ProjectGanttExpandableTextboxEditor(),

           template: RadiantQ.Default.Template.ProjectGanttExpandableTextBlockTemplate()

       },

       {

           field: "Activity_M().StartTime_M()",

           title: "StartTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='ActivityTimeBinder:Activity_M().StartTime_M' />"

       },

       {

           field: "Activity_M().EndTime_M()",

           title: "EndTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='value:Activity_M().EndTime_M' data-getvalueName='getDate' data-setvaluename='setDate'  data-valueUpdate='onBlur'  data-role=\"DateTimePicker\"  />"

       },

       {

           field: "Activity_M().Effort_M()",

           title: "Effort",

           format: "" /*to call the .toString()*/,

           width: 100,

           editor: "<input data-bind='value:Activity_M().Effort_M'  data-role=\"DurationPicker\"  />"

       },

       {

           field: "Activity_M().ProgressPercent_M()",

           title: "ProgressPercent",

           width: 100,

           editor: "<input data-bind='value:Activity_M().ProgressPercent_M' data-role=\"spinner\" data-options='{\"min\":0, \"max\": 100}' />"

       },

       {

           field: "Activity_M().Assignments_M()",

           title: "Resource",

           editor: "<input data-bind='ResourcePickerBinder:Activity_M().Assignments_M'  />",

           template: '<div> ${ RadiantQ.Gantt.ValueConverters.ConverterUtils.GetResourcesText(data.Activity_M().Assignments_M(), false) } </div>',

           width: 100

       },

       {

           field: "Activity.PredecessorIndexString",

           title: "PredecessorIndex",

           isParentEditable: false,

           template: "<div>${data.PredecessorIndexString || '' }</div>",

           editor: "<input data-bind='value:PredecessorIndexString'/>",

           width: 150

       }];


$gantt_container.GanttControl('option', 'IsEffortReadOnly', true);


columns[3].iseditable = false;

columns[4].iseditable = false;


c) Dependencies are ReadOnly:


To prevent the end user from changing the dependencies between tasks in the Gantt Chart and Table, use these settings:


   var columns = [

       {

           field: "Activity_M().ID_M()",

           title: "ID",

           width: 25,

           iseditable: false

       },

       {

           field: "Activity_M().ActivityName_M()",

           title: "Activity Name",

           width: 200,

           editor: RadiantQ.Default.Template.ProjectGanttExpandableTextboxEditor(),

           template: RadiantQ.Default.Template.ProjectGanttExpandableTextBlockTemplate()

       },

       {

           field: "Activity_M().StartTime_M()",

           title: "StartTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='ActivityTimeBinder:Activity_M().StartTime_M' />"

       },

       {

           field: "Activity_M().EndTime_M()",

           title: "EndTime",

           width: 150,

           format: "MM/dd/yy",

           editor: "<input data-bind='value:Activity_M().EndTime_M' data-getvalueName='getDate' data-setvaluename='setDate'  data-valueUpdate='onBlur'  data-role=\"DateTimePicker\"  />"

       },

       {

           field: "Activity_M().Effort_M()",

           title: "Effort",

           format: "" /*to call the .toString()*/,

           width: 100,

           editor: "<input data-bind='value:Activity_M().Effort_M'  data-role=\"DurationPicker\"  />"

       },

       {

           field: "Activity_M().ProgressPercent_M()",

           title: "ProgressPercent",

           width: 100,

           editor: "<input data-bind='value:Activity_M().ProgressPercent_M' data-role=\"spinner\" data-options='{\"min\":0, \"max\": 100}' />"

       },

       {

           field: "Activity_M().Assignments_M()",

           title: "Resource",

           editor: "<input data-bind='ResourcePickerBinder:Activity_M().Assignments_M'  />",

           template: '<div> ${ RadiantQ.Gantt.ValueConverters.ConverterUtils.GetResourcesText(data.Activity_M().Assignments_M(), false) } </div>',

           width: 100

       },

       {

           field: "Activity.PredecessorIndexString",

           title: "PredecessorIndex",

           isParentEditable: false,

           template: "<div>${data.PredecessorIndexString || '' }</div>",

           editor: "<input data-bind='value:PredecessorIndexString'/>",

           width: 150

       }];


$gantt_container.GanttControl('option', 'IsDependencyLinesReadOnly', true);

columns[7].iseditable = false;





� RadiantQ 2022. All Rights Reserved.