Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
167 views

I have a radScheduler agenda view and I want to change the color of certain entries in the scheduler. I want to do something like this http://imgur.com/a/2ot4X where some rows are a certain color

This is my code at the moment but it is not working  

1.<p>protected void rs_Calendar_AppointmentDataBound(object sender, SchedulerEventArgs e)
<   if (e.Appointment.DataItem is vw_CalendarDate)<
    vw_CalendarDate ce = (vw_CalendarDate)e.Appointment.DataItem;
 if (ce.Title != null && ce.Title.ToLower().StartsWith("sgt"))
e.Appointment.BackColor = Color.Red;</p><p>}</p>

This is the code for the rad scheduler.

1.<telerik:RadScheduler runat="server" ID="rs_Calendar"<br>                    SelectedView="AgendaView" AllowEdit="false" AllowDelete="false"<br>                    Height="100%" OverflowBehavior="Expand"<br>                    Width="100%" DataKeyField="TourInstanceId" DataSubjectField="Title"<br>                    DataStartField="DateStart" DataEndField="DateEnd" BackColor="#E6E6E6"<br>                    Skin="Metro" <br>                    OnAppointmentDataBound="rs_Calendar_AppointmentDataBound"<br>                     OnAppointmentCreated="RadScheduler1_AppointmentCreated"<br>                    OnNavigationComplete="rs_Calendar_NavigationComplete"<br>                    OnClientAppointmentInserting="CancelEvent"<br>                    OnClientAppointmentEditing="CancelEvent"<br>                    CustomAttributeNames="Color,TourInstanceId,Title,Bookings,Guideinitials,Availability,GroupName"<br>                    OnClientAppointmentMoveEnd="MoveAppt"<br>                    OnClientAppointmentResizeStart="ResizeAppt"<br>                    OnClientAppointmentClick="onClientAppointmentClick"<br>                    OnClientAppointmentDoubleClick="onClientAppointmentDoubleClick"><br>                    <WeekView UserSelectable="false" /><br>                    <DayView UserSelectable="false" /><br>                    <MonthView UserSelectable="true" /><br>                    <MultiDayView UserSelectable="false" /><br>                    <TimelineView UserSelectable="true" /><br>                    <AgendaView UserSelectable="true" /><br>                    <AppointmentTemplate><br>                        <div class="appt-title" style="border-color: <%# Eval("Attributes['BackGroundColor']") %>; color: <%# Eval("Attributes['TextColor']") %>;"><br><br>                            <span runat="server" id="calendar_icons_alerts"><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Completed']") %>" alt="Completed" width="20px" style="display: <%# Eval("Attributes['Completed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Closed']") %>" alt="Closed" width="20px" style="display: <%# Eval("Attributes['Closed']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Custom']") %>" alt="Custom" width="50px" style="display: <%# Eval("Attributes['Custom']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Transfer']") %>" alt="Transfer" width="50px" style="display: <%# Eval("Attributes['Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Attention']") %>" alt="Attention" width="20px" style="display: <%# Eval("Attributes['Attention']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['No Bookings']") %>" alt="No Bookings" width="20px" style="display: <%# Eval("Attributes['No Bookings']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Headsets']") %>" alt="Headsets" width="20px" style="display: <%# Eval("Attributes['Headsets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Bikes']") %>" alt="Bikes" width="20px" style="display: <%# Eval("Attributes['Bikes']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Tickets']") %>" alt="Tickets" width="20px" style="display: <%# Eval("Attributes['Tickets']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Guide']") %>" alt="Guide" width="20px" style="display: <%# Eval("Attributes['Guide']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Money']") %>" alt="Money" width="20px" style="display: <%# Eval("Attributes['Money']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Kids']") %>" alt="Kids" width="20px" style="display: <%# Eval("Attributes['Kids']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Voucher']") %>" alt="Voucher" width="20px" style="display: <%# Eval("Attributes['Voucher']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Arrange Transfer']") %>" alt="Arrange Transfer" width="20px" style="display: <%# Eval("Attributes['Arrange Transfer']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Radio']") %>" alt="Radio" width="20px" style="display: <%# Eval("Attributes['Radio']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['VIP client']") %>" alt="VIP client" width="20px" style="display: <%# Eval("Attributes['VIP client']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Finelli & Shaw']") %>" alt="Finelli & Shaw" width="20px" style="display: <%# Eval("Attributes['Finelli & Shaw']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Trip planning']") %>" alt="Trip planning" width="20px" style="display: <%# Eval("Attributes['Trip planning']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['People Together']") %>" alt="People Together" width="20px" style="display: <%# Eval("Attributes['People Together']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Press']") %>" alt="Press" width="20px" style="display: <%# Eval("Attributes['Press']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Restaurant Reservation']") %>" alt="Restaurant Reservation" width="20px" style="display: <%# Eval("Attributes['Restaurant Reservation']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Pick Up Location']") %>" alt="Pick Up Location" width="20px" style="display: <%# Eval("Attributes['Pick Up Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Drop Off Location']") %>" alt="Drop Off Location" width="20px" style="display: <%# Eval("Attributes['Drop Off Location']")!=null ? "inline-block": "none" %>" /><br>                                <img class="icons_on_calendar" src="<%# Eval("Attributes['Meeting Point']") %>" alt="Meeting Point" width="20px" style="display: <%# Eval("Attributes['Meeting Point']")!=null ? "inline-block": "none" %>" /><br>                            </span><br><br>                            <%# Eval("Subject") %><br>                        </div><br>                    </AppointmentTemplate><br>                </telerik:RadScheduler>
Cathal
Top achievements
Rank 1
 asked on 02 Aug 2017
8 answers
466 views
Does the grid-filter not work with EntityDataSource-Control when AutoGenerateWhereClause is set to "true" ?

I've a grid bound on entitydatasource-control.
The DataSourceControl has whereparameters and the property AutoGenerateWhereClause is set to "true"
I'm filtering the column "CreateDate" with a selected value of radDatePicker on my page.
The first call of the page works fine and the data is filtered.

If i try to filter a column wiht "Equal" then an System.InvalidOperationException accours with the message:
AutoGenerateWhereClause can't be 'true' when Where is defined.


Here is the aspx-code:

      <asp:EntityDataSource ID="InventoryEntityDataSource" runat="server"  
                ConnectionString="name=Entities" DefaultContainerName="Entities"  
                EnableDelete="True" EnableInsert="True" EnableUpdate="True"  
                EntitySetName="Inventory"  
            EntityTypeFilter="Inventory" AutoGenerateWhereClause="True"  
            Select="" Where=""
                <WhereParameters> 
                    <asp:ControlParameter ControlID="ProcessDateRadDatePicker" Name="CreateDate"  
                        PropertyName="SelectedDate" /> 
                </WhereParameters> 
            </asp:EntityDataSource> 




Thank you for your help!



Eyup
Telerik team
 answered on 02 Aug 2017
1 answer
97 views

Hello Team, 

We have a new feature in application where we will have a page with one RadTreeView and two or three RadEditor.

The RadTreeView will be added to display the list of images and user will drag the image and drop to any editor.

As per the demo the one Treeview and one Editor is working okay. But when I add two or more Editor the dropping is not working in all editor. We can drop the image only the last editor.  I also tried to get the destination item (editor or div ) in OnClientNodeDropping event but I did not get the destination item. If we get it when we can add the image in destination item (editor or div ). 

Dear expert, is there anyway to get the Id of destination item in  OnClientNodeDropping event?

Or 

Any solution of this problem problem.

 

Thanks

 

 

 

 

Rumen
Telerik team
 answered on 02 Aug 2017
1 answer
264 views

I don't know how this has been missed in the documentation. Alternatively, it's well hidden in some obscure place. I'm trying to filter a column of a detail table using a static radcombobox. Using the instructions from the "Filter Template" documentation (http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/filtering/filter-template) I'm not seeing any filtering in action on the detail table. The documentation for "Detail Tables Filtering" is rather useless (http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/filtering/detail-tables-filtering).

Someone show me where I'm going wrong?

<telerik:RadGrid ID="rgdepots" runat="server"
AutoGenerateColumns="False"
DataSourceID="depots"
AllowFilteringByColumn="True"
AllowSorting="True" Height="900px"
OnItemDataBound="rgdepots_ItemDataBound" EnableLinqExpressions="false">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView DataKeyNames="dID" DataSourceID="depots">
<DetailTables>
<telerik:GridTableView runat="server"
Name="rgIncidents"
AllowAutomaticInserts="true"
AllowAutomaticUpdates="True"
DataKeyNames="iID"
DataSourceID="sql"
EditMode="PopUp"
AutoGenerateColumns="False"
AllowPaging="True"
PageSize="30"
CommandItemDisplay="Top" EditFormSettings-FormMainTableStyle-Width="480px" EditFormSettings-FormStyle-Width="490px">
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr><td>Date</td><td><telerik:RadDatePicker ID="iDatePick" runat="server" DbSelectedDate='<%# Bind("iDate") %>'></telerik:RadDatePicker></td></tr>
<tr><td colspan="3" style="text-align: center; border-bottom: 1px solid black;">Forms</td></tr>
<tr style="text-align: center;"><td>Notification</td><td>Accident</td><td>Interview</td></tr>
<tr style="text-align: center;">
<td><telerik:RadCheckBox ID="chkNotification" runat="server" Checked='<%# Bind("iNotificationForm") %>'></telerik:RadCheckBox></td>
<td><telerik:RadCheckBox ID="chkAccident" runat="server" Checked='<%# Bind("iAccidentForm") %>'></telerik:RadCheckBox></td>
<td><telerik:RadCheckBox ID="chkInterview" runat="server" Checked='<%# Bind("iInterviewForm") %>'></telerik:RadCheckBox></td>
</tr>
<tr>
<td>Damage to</td>
<td><telerik:RadCheckBox ID="chkClarkeDamage" runat="server" Text="Clarkes" Checked='<%# Bind("iDamageClarkes") %>'></telerik:RadCheckBox></td>
<td><telerik:RadCheckBox ID="chkOtherDamage" runat="server" Text="3rd Party" Checked='<%# Bind("iDamageThirdParty") %>'></telerik:RadCheckBox></td>
</tr>
<tr>
<td>Repaired by</td>
<td><telerik:RadCheckBox ID="chkClarkeRepair" runat="server" Text="Clarkes" Checked='<%# Bind("iRepairedClarkes") %>'></telerik:RadCheckBox></td>
<td><telerik:RadCheckBox ID="chkOtherRepair" runat="server" Text="3rd Party" Checked='<%# Bind("iRepairedThirdParty") %>'></telerik:RadCheckBox></td>
</tr>
<tr>
<td>Costs</td>
<td>Estimated <telerik:RadTextBox ID="txtEstCost" runat="server" Text='<%# Bind("iEstimate") %>'></telerik:RadTextBox></td>
<td>Actual <telerik:RadTextBox ID="txtActualCost" runat="server" Text='<%# Bind("iClarkesCost") %>'></telerik:RadTextBox></td>
</tr>
<tr><td>Costs Paid</td><td><telerik:RadCheckBox ID="chkPaid" runat="server" Checked='<%# Bind("iNotificationForm") %>'></telerik:RadCheckBox></td></tr>
<tr><td>Location</td><td colspan="2"><telerik:RadTextBox ID="txtLocation" runat="server" Width="320px" Text='<%# Bind("iLocation") %>'></telerik:RadTextBox></td></tr>
<tr><td>Description</td><td colspan="2"><telerik:RadTextBox ID="txtDescription" runat="server" Text='<%# Bind("iDescription") %>' TextMode="MultiLine" Width="320px"></telerik:RadTextBox></td></tr>
<tr>
<td>Driver</td>
<td><telerik:RadCheckBox ID="chkAware" runat="server" Text="Aware" Checked='<%# Bind("iDriverAware") %>'></telerik:RadCheckBox></td>
<td><telerik:RadCheckBox ID="chkFault" runat="server" Text="At Fault" Checked='<%# Bind("iDriverFault") %>'></telerik:RadCheckBox></td>
</tr>
<tr><td>AJG Reference</td><td><telerik:RadTextBox ID="txtAJG" runat="server" Text='<%# Bind("iAJGRef") %>'></telerik:RadTextBox></td></tr>
<tr><td>Depot</td><td><telerik:RadDropDownList ID="txtFK1dID" runat="server" DataSourceID="depots" DataTextField="dCode" DataValueField="dID" SelectedValue='<%# Bind("fk1_dID") %>'></telerik:RadDropDownList></td></tr>
<tr><td><telerik:RadDropDownList ID="rgEddlDriver"runat="server" DataSourceID="sqlDriver" SelectedValue='<%# Bind("fk2_dID") %>' DataTextField="dName" DataValueField="dID" AppendDataBoundItems="true"><Items><telerik:DropDownListItem Value="-1" Text="Select One" /></Items></telerik:RadDropDownList></td>
<td><telerik:RadDropDownList ID="rgEddlCab" runat="server" DataSourceID="sqlCab" SelectedValue='<%# Bind("fk3_cID") %>'  DataTextField="cReg" DataValueField="cID" AppendDataBoundItems="true"><Items><telerik:DropDownListItem Value="-1" Text="Select One" /></Items></telerik:RadDropDownList></td>
<td><telerik:RadDropDownList ID="rgEddlTrailer" runat="server" DataTextField="tRef" DataValueField="tID" AppendDataBoundItems="true"><Items><telerik:DropDownListItem Value="-1" Text="Select One" /></Items></telerik:RadDropDownList></td>
</tr>
<tr>
<td><asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button></td>
<td> </td>
<td><asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button></td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="fk1_dID" MasterKeyField="dID" />
</ParentTableRelation>
<Columns>
<telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
<telerik:GridTemplateColumn DataField="iID" DataType="System.Int32" FilterControlAltText="Filter iID column" HeaderText="ID" ReadOnly="True" SortExpression="iID" UniqueName="iID" ForceExtractValue="Always">
<FilterTemplate>
</FilterTemplate>
<ItemTemplate>
<asp:Label ID="lblID" runat="server" Text='<%# string.Format("{0:00#}",Eval("iID")) %>'></asp:Label>/<asp:Label ID="lblDate" runat="server" Text='<%# string.Format("{0:yyyy}",Eval("iDate")) %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="iDate" DataType="System.DateTime" FilterControlAltText="Filter iDate column" HeaderText="Date" SortExpression="iDate" UniqueName="iDate" DataFormatString="{0:d}" ForceExtractValue="Always">
<FilterTemplate>
<table>
<tr><td>From</td><td><telerik:RadDateInput ID="fDateFrom" runat="server" Width="80"></telerik:RadDateInput></td></tr>
<tr><td>To</td><td><telerik:RadDateInput ID="fdateTo" runat="server" Width="80"></telerik:RadDateInput></td></tr>
</table>
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn AllowFiltering="false" EnableHeaderContextMenu="false" ReadOnly="false" DataField="iNotificationForm" DataType="System.Boolean" HeaderText="Notification Form" UniqueName="iNotificationForm" ForceExtractValue="Always">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DataField="iInterviewForm" AllowFiltering="false" DataType="System.Boolean" FilterControlAltText="Filter iInterviewForm column" HeaderText="Interview Form" SortExpression="iInterviewForm" UniqueName="iInterviewForm" ForceExtractValue="Always">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DataField="iAccidentForm" AllowFiltering="false" DataType="System.Boolean" FilterControlAltText="Filter iAccidentForm column" HeaderText="Accident Form" SortExpression="iAccidentForm" UniqueName="iAccidentForm" ForceExtractValue="Always">
</telerik:GridCheckBoxColumn>
<telerik:GridTemplateColumn HeaderText="Damage" UniqueName="iDamageClarkes" ForceExtractValue="Always">
<FilterTemplate>
<telerik:RadTextBox ID="fTxtDamage" runat="server" Width="60"></telerik:RadTextBox>
</FilterTemplate>
<ItemTemplate>
<asp:Label ID="lblDamage" runat="server" Text='<%# Eval("iDamageClarkes").ToString() == "True" ? Eval("iDamageThirdParty").ToString() == "True" ? "Clarkes, Third Party" : "Clarkes" : Eval("iDamageThirdParty").ToString() == "True" ? "Third Party" : ""%>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="iRepairedClarkes" DataType="System.Boolean" FilterControlAltText="Filter iRepairedClarkes column" HeaderText="Repaired by" SortExpression="iRepairedClarkes" UniqueName="iRepairedClarkes" ForceExtractValue="Always">
<FilterTemplate>
<telerik:RadTextBox ID="fTxtRepaired" runat="server" Width="60"></telerik:RadTextBox>
</FilterTemplate>
<ItemTemplate>
<asp:Label ID="lblRepairs" runat="server" Text='<%# Eval("iRepairedClarkes").ToString() == "True" ? Eval("iRepairedThirdParty").ToString() == "True" ? "Clarkes, Third Party" : "Clarkes" : Eval("iRepairedThirdParty").ToString() == "True" ? "Third Party" : ""%>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="iEstimate" DataType="System.Decimal" FilterControlAltText="Filter iEstimate column" HeaderText="Estimate" SortExpression="iEstimate" UniqueName="iEstimate" ForceExtractValue="Always">
<FilterTemplate>
<telerik:RadTextBox ID="fTxtEstimate" runat="server" Width="80"></telerik:RadTextBox>
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="iClarkesCost" DataType="System.Decimal" FilterControlAltText="Filter iClarkesCost column" HeaderText="ClarkesCost" SortExpression="iClarkesCost" UniqueName="iClarkesCost" ForceExtractValue="Always">
<FilterTemplate>
<telerik:RadTextBox ID="fTxtCost" runat="server" Width="80"></telerik:RadTextBox>
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn AllowFiltering="false" DataField="iPaid" DataType="System.Boolean" FilterControlAltText="Filter iPaid column" HeaderText="Paid" SortExpression="iPaid" UniqueName="iPaid" ForceExtractValue="Always">
</telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="iDescription" FilterControlAltText="Filter iDescription column" HeaderText="iDescription" SortExpression="Description" UniqueName="iDescription" ForceExtractValue="Always">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="iLocation" FilterControlAltText="Filter iLocation column" HeaderText="iLocation" SortExpression="Location" UniqueName="iLocation" ForceExtractValue="Always">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="iDriverAware" HeaderText="Driver" UniqueName="iDriverAware" ForceExtractValue="Always" AllowFiltering="true">
<FilterTemplate>
<telerik:RadComboBox ID="rcbFDriverAware" runat="server" AutoPostBack="true" ShowToggleImage="false" Width="80" OnSelectedIndexChanged="rcbFDriverAware_SelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="Any" />
<telerik:RadComboBoxItem Text="Aware" />
<telerik:RadComboBoxItem Text="At Fault" />
<telerik:RadComboBoxItem Text="Both" />
</Items>
</telerik:RadComboBox>
</FilterTemplate>
<ItemTemplate>
<asp:Label ID="lblDriver" runat="server" Text='<%# Eval("iDriverAware").ToString() == "True" ? Eval("iDriverFault").ToString() == "True" ? "Aware, At Fault" : "Aware" : Eval("iDriverFault").ToString() == "True" ? "At Fault" : ""%>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="iDriverFault" UniqueName="iDriverFault" Display="false" AllowFiltering="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="iAJGRef" FilterControlAltText="Filter iAJGRef column" HeaderText="AJGRef" SortExpression="iAJGRef" UniqueName="AJGRef" ForceExtractValue="Always">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Depot" AllowFiltering="false" ForceExtractValue="Always">
<ItemTemplate>
<telerik:RadDropDownList ID="rgddlDepot" runat="server" DataTextField="dCode" DataValueField="dID" Enabled="false" AppendDataBoundItems="true">
<Items>
<telerik:DropDownListItem Value="-1" Text="Select One" />
</Items>
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Driver">
<ItemTemplate>
<telerik:RadDropDownList ID="rgddlDriver" runat="server" DataTextField="dName" DataValueField="dID" Enabled="false" AppendDataBoundItems="true">
<Items>
<telerik:DropDownListItem Value="-1" Text="Select One" />
</Items>
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Vehicle">
<ItemTemplate>
<telerik:RadDropDownList ID="rgddlCab" runat="server" DataTextField="cReg" DataValueField="cID" Enabled="false" AppendDataBoundItems="true">
<Items>
<telerik:DropDownListItem Value="-1" Text="Select One" />
</Items>
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Trailer">
<ItemTemplate>
<telerik:RadDropDownList ID="rgddlTrailer" runat="server" DataTextField="tRef" DataValueField="tID" Enabled="false" AppendDataBoundItems="true">
<Items>
<telerik:DropDownListItem Value="-1" Text="Select One" />
</Items>
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn DataField="dID" DataType="System.Int32" Display="False" FilterControlAltText="Filter dID column" HeaderText="dID" ReadOnly="True" SortExpression="dID" UniqueName="dID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="dCode" AllowFiltering="false" FilterControlAltText="Filter dCode column" HeaderText="Code" SortExpression="dCode" UniqueName="dCode">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="dName" AllowFiltering="false" FilterControlAltText="Filter dName column" HeaderText="Name" SortExpression="dName" UniqueName="dName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Incidents" AllowFiltering="false" DataType="System.Int32" FilterControlAltText="Filter Incidents column" HeaderText="Incidents" ReadOnly="True" SortExpression="Incidents" UniqueName="Incidents">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

 

protected void rcbFDriverAware_SelectedIndexChanged( object sender,RadComboBoxSelectedIndexChangedEventArgs e ) {
    string fe;
    switch( e.Text ) {
        case "Any":
            fe = "";
            break;
        case "Aware":
            fe = $"([iDriverAware] = 'true')";
            break;
        case "At Fault":
            fe = $"([iDriverFault] = 'true')";
            break;
        case "Both":
            fe = $"([iDriverAware] = 'true') AND ([iDriverFault] = 'true')";
            break;
        default:
            fe = "";
            break;
    }
    rgdepots.MasterTableView.DetailTables[0].FilterExpression = fe;
    rgdepots.MasterTableView.DetailTables[0].Rebind();
}
Eyup
Telerik team
 answered on 02 Aug 2017
3 answers
124 views
Hi,

I have implemented the SpellChecker in combination with RadEditor where I haven't used the RadEditor's AjaxSpellCheck tool, but I have pointed separate SpellChecker component to Radeditor's content area. I did this, because using the RadEditor's built-in AjaxSpellChecker doesn't provide the option of spell checking in new dialog box, but just an "inline" one, as far as I can see. All works fine unless I start using tables in RadEditor content. Some of the text is not properly recognized, this occures quite randomly.. Is there some way how to avoid this kind of situation?
Or is there a way, how to make RadEditor built in spell checker to work in "popup" not in "inline" mode?
Thank you, guys :0)

Adrian
Rumen
Telerik team
 answered on 02 Aug 2017
1 answer
310 views

I want to set the color of color picker when the Page Load. But it always cannot find the rad color picker control. It always get null.

protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack == false)
    {               
        string szJS = "OptionSettingsLoad();";
        RadScriptManager.RegisterStartupScript(this, this.GetType(), "OptionSettingsLoad", szJS, true);
    }
}

 

The javascript has add the global function for initialize the TelerikDemo object and its function for color change.

I cannot find the color picker control by

var colorPickerDischargeTitleColor = $find("RadColorPickerDischargeTitleColor");

the color Picker"colorPickerDischargeTitleColor " always be null.

 

function (global, undefined) {
 
    var TelerikDemo = global.TelerikDemo = {};
 
    function OnClientColorChangeDischargeTitleColor(sender, eventArgs) {
 
        var colorPicker = $find("RadColorPickerDischargeTitleColor");
        var strColor = sender.get_selectedColor();
    }
 
    TelerikDemo.OnClientColorChangeDischargeTitleColor = OnClientColorChangeDischargeTitleColor;
 
    function OnClientColorChangeDischargeContentColor(sender, eventArgs) {
 
        //alert("Selected color is changed from " + eventArgs.get_oldColor() + " to " + sender.get_selectedColor() + ".");
        var colorPicker = $find("RadColorPickerDischargeContentColor");
        var strColor = sender.get_selectedColor();
    }
 
    TelerikDemo.OnClientColorChangeDischargeContentColor = OnClientColorChangeDischargeContentColor;
 
 
})(window);
 
 
function OptionSettingsLoad()
{
    var LS_titleColor = localStorage.getItem(DISCHARGE_TITLE_COLOR);
    var LS_contentColor = localStorage.getItem(DISCHARGE_CONTENT_COLOR);
 
    var colorPickerDischargeTitleColor = $find("RadColorPickerDischargeTitleColor");
    var colorPickerDischageContentColor = $find("RadColorPickerDischargeConetnteColor");
 
    //alert("LS_titleColor=" + LS_titleColor);
   
    HiddenDischargeTitleColor.value = LS_titleColor;
 
    if (colorPickerDischargeTitleColor != null && LS_titleColor != null)
    {      
        colorPickerDischargeTitleColor.set_selectedColor(LS_titleColor);
    }
 
    HiddenDischargeContentColor.value = LS_contentColor;
 
    if (colorPickerDischageContentColor != null && LS_contentColor != null)
    {
        colorPickerDischageContentColor.set_selectedColor(LS_contentColor);
    }
}

 

My RadColorPciker control in aspx as below:

<telerik:RadColorPicker ID="RadColorPickerDischargeTitleColor" runat="server" PaletteModes="HSB" ShowIcon="true" OnClientColorChange="TelerikDemo.OnClientColorChangeDischargeTitleColor" ></telerik:RadColorPicker>
 
<telerik:RadColorPicker ID="RadColorPickerDischargeContentColor" runat="server" PaletteModes="HSB" ShowIcon="true" OnClientColorChange="TelerikDemo.OnClientColorChangeDischargeContentColor" ></telerik:RadColorPicker>

 

Do I lose something to define or how to solve this problem?

章民
Top achievements
Rank 1
 answered on 02 Aug 2017
6 answers
185 views

Hello,

I have the following grid on my page where the first 6 columns are set to Display="False"  As you can see in the attached screenshot, chrome renders the grid correctly.  However IE hides the first 9 columns.  Even when setting all other rows Display="True" they still do not show up.

If I move those 6 Display="False" columns to the far right of the radgrid, it does render correctly on IE.

Is this a known bug, or am I missing something?  Thanks much.  Below is the code from my aspx page.

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSourceGrid">
                <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSourceGrid">
                    <Columns>
                        <telerik:GridBoundColumn DataField="id" DataType="System.Int32" FilterControlAltText="Filter id column" HeaderText="id" ReadOnly="True" SortExpression="id" UniqueName="id" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="hdr_id" DataType="System.Int32" FilterControlAltText="Filter hdr_id column" HeaderText="hdr_id" SortExpression="hdr_id" UniqueName="hdr_id" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="fjobno" FilterControlAltText="Filter fjobno column" HeaderText="fjobno" SortExpression="fjobno" UniqueName="fjobno" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="process" FilterControlAltText="Filter process column" HeaderText="process" SortExpression="process" UniqueName="process" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="operator" DataType="System.Decimal" FilterControlAltText="Filter operator column" HeaderText="operator" SortExpression="operator" UniqueName="operator" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="tower" DataType="System.Int32" FilterControlAltText="Filter tower column" HeaderText="tower" SortExpression="tower" UniqueName="tower" Display="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="date" DataType="System.DateTime" FilterControlAltText="Filter date column" HeaderText="date" SortExpression="date" UniqueName="date" DataFormatString="{0:d}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="shift" DataType="System.Int32" FilterControlAltText="Filter shift column" HeaderText="shift" SortExpression="shift" UniqueName="shift">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="reelno" DataType="System.Decimal" FilterControlAltText="Filter reelno column" HeaderText="reelno" SortExpression="reelno" UniqueName="reelno">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FWRM" DataType="System.Decimal" FilterControlAltText="Filter FWRM column" HeaderText="FWRM" SortExpression="FWRM" UniqueName="FWRM">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="WRM" DataType="System.Decimal" FilterControlAltText="Filter WRM column" HeaderText="WRM" SortExpression="WRM" UniqueName="WRM">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="WIM" DataType="System.Decimal" FilterControlAltText="Filter WIM column" HeaderText="WIM" SortExpression="WIM" UniqueName="WIM">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FWIM" DataType="System.Decimal" FilterControlAltText="Filter FWIM column" HeaderText="FWIM" SortExpression="FWIM" UniqueName="FWIM">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CONIW" DataType="System.Decimal" FilterControlAltText="Filter CONIW column" HeaderText="CONIW" SortExpression="CONIW" UniqueName="CONIW">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Speed" DataType="System.Decimal" FilterControlAltText="Filter Speed column" HeaderText="Speed" SortExpression="Speed" UniqueName="Speed">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Settings" DataType="System.Decimal" FilterControlAltText="Filter Settings column" HeaderText="Settings" SortExpression="Settings" UniqueName="Settings">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="WT" FilterControlAltText="Filter WT column" HeaderText="WT" SortExpression="WT" UniqueName="WT">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Output" DataType="System.Decimal" FilterControlAltText="Filter Output column" HeaderText="Output" SortExpression="Output" UniqueName="Output">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LotRM" FilterControlAltText="Filter LotRM column" HeaderText="LotRM" SortExpression="LotRM" UniqueName="LotRM">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Comment" FilterControlAltText="Filter Comment column" HeaderText="Comment" SortExpression="Comment" UniqueName="Comment">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

 

Here is my versioning information.

Microsoft Visual Studio Professional 2017 
Version 15.1 (26403.7) Release
VisualStudio.15.Release/15.1.0+26403.7
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA675
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA675
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA675
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package   8.6.00209.10
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30320.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   4.1.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

Telerik ASP.NET AJAX VSExtensions   2017.2.501.0
Progress® Telerik® UI for ASP.NET AJAX Visual Studio extensions

Telerik ASP.NET Core VSExtensions   2017.2.502.0
Progress® Telerik® UI for ASP.NET Core Visual Studio extensions

Telerik ASP.NET MVC VSExtensions   2017.2.502.0
Progress® Telerik® UI for ASP.NET MVC Visual Studio extensions

Telerik WinForms VSExtensions   2017.2.501.0
Progress® Telerik® UI for WinForms Visual Studio extensions

Telerik WPF VSExtensions   2017.2.501.0
Progress® Telerik® UI for WPF Visual Studio extensions

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.1.5.0
TypeScript tools for Visual Studio

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake

 

Vessy
Telerik team
 answered on 01 Aug 2017
1 answer
143 views

We have RadGrids configured to export to CSV, Excel, or PDF. The file names are explicitly set in GridExportSettings.FileName based on grid content, such as "Patient Status Choices". In IE11, this file name is changed by replacing blanks with plus signs, e.g., "Patient+Status+Choices". This does not happen in Edge or Chrome.

Is there a way to get IE to export using the file name exactly as we specify?

Vessy
Telerik team
 answered on 01 Aug 2017
0 answers
84 views

I've next code that handle rowFormatting my cells:

private void gridViewRaces_RowFormatting(object sender, RowFormattingEventArgs e) {

    foreach (var cellColumn in e.RowElement.Data.Cells) {

    var cellInfo = cellColumn as GridViewCellInfo;

    if (cellInfo != null) {

    cellInfo.Style.DrawFill = true;

    if (cellInfo.ColumnInfo.Name == "columnContactProducerName") {

        cellInfo.Style.DrawFill = true; cellInfo.Style.BackColor = Color.Yellow; }

   else if (cellInfo.ColumnInfo.Name == "columnTransport") { cellInfo.Style.BackColor = Color.Yellow; }

   else { cellInfo.Style.BackColor = ColorTranslator.FromHtml((e.RowElement.Data.DataBoundItem as RaceForListDto).Color); } }

}

}
but my cells aren't painting. How to paint some cells in rows on dataBinding?

Nickolay
Top achievements
Rank 1
 asked on 01 Aug 2017
8 answers
333 views

Hi,

I am testing the RADSpreadsheet control and have the following error when the page loads:

Unhandled Exception - Unable to get property '_preInitialize' of undefined null reference
Telerik.Web.UI.RadListBox._preInitialize("RadSpreadsheet1_FilterMenu_ValueListBox","0")

I have the latest version of the UI for ASP.NET AJAX 2016.3.1027

Developing using VS 2015 Framework 4.5.2

Thanks.

Jon
Top achievements
Rank 1
 answered on 01 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?