We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hide the Category when no categories are available

 Is there any way to hide the category in schedule control when no categories are available.Also is there a way to change the column header for the resource in schedule from name to something else.The issues are marked in the image.I'm working in asp.net

scheduler_8533c6c8.zip

1 Reply

UM Uma Maheswari C Syncfusion Team April 16, 2013 08:33 AM UTC

Hi Premith,

 

Thanks for your interest in Syncfusion products.

 

#Query1: Is there any way to hide the category in schedule control when no categories are available?

 

It is not possible to hide the category row in the schedule control even when no categories are available (no support by default). Even if we try to hide it with the help of script, the alignments of the appointments will be getting misplaced.

We have tried the below workaround in order to achieve your specific scenario, but this will lead to appointments misalignment.

<code>

script type="text/javascript">

$(document).ready(function () {

 

  $("#" + '<%= Schedule1.ClientID %>' + "_RootContainer").find("td.ResourceCell")[0].parentNode.style.display = 'none';

  $("#" + '<%= Schedule1.ClientID %>' + "_RootContainer").find("div.ContentContainer").find("tr")[0].style.display = 'none';

});
</script>

</code>

 

Therefore, by default, there is no possibilities to hide the category row that is displayed in the schedule.

 

#Query2: is there a way to change the column header for the resource in schedule from name to something else?

 

Yes, it is possible to change the header column name for the resources in the schedule to your specific one. To achieve this, you need to set the  CultureSource property of the schedule control to “UserOverride” and then you can change the resource name to your specific with the help of the property ResourceNameColumnName. Please find the below code snippet:

 

<code>

[Default.aspx]

 

<Syncfusion:Schedule ID="Schedule1" runat="server" Height="400px" Width="800px" StartDate="2013-04-12" ViewMode="Horizontal" EnableCallbacks = "false" AutoPostBackOnScheduleClick="true" CultureSource="UserOverride" ResourceNameColumnName="Resource" >

…….

…..

</Syncfusion:Schedule>

 

</code>

 

For your convenience, we have also prepared a simple sample which can be downloaded from the below link:

SampleASPCheckHeader.zip

 

Please refer the sample and let us know, if you have any other concerns.

 

Regards,

Uma Maheswari C


Loader.
Live Chat Icon For mobile
Up arrow icon