Hi,
I am new to Telerik. Not sure whether the below code is accurate since Edit link or Edit button is not appearing on the screen. The grid records gets populated but on the edit column ,the word edit is not appearing . Please find the below code
<telerik:RadGrid RenderMode="Lightweight" ID="RadGVCurrent" runat="server"
AllowAutomaticUpdates="True"
OnUpdateCommand="RadGVCurrent_UpdateCommand"
GridLines="Both" GroupPanelPosition="Top" IsExporting="False" >
<GroupingSettings CollapseAllTooltip="Collapse all groups" />
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" >
<Columns>
<telerik:GridEditCommandColumn >
</telerik:GridEditCommandColumn>
<telerik:GridTemplateColumn UniqueName="Post"
FilterControlAltText="Filter Post column">
<ItemTemplate>
<asp:Button ID="btnGrdPost" runat="server" CommandName="Post" Text="Post"
OnClick="Post_Click" Font-Names="Calibri" Font-Size="X-Small"
Height="20px" Width="50px" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Void" FilterControlAltText="Filter Void column" >
<ItemTemplate>
<asp:Button ID="btnGrdVoid" runat="server" CommandName="Void" Text="Void"
Height="20px" Width="50px"
OnClick="Void_Click" Font-Names="Calibri" Font-Size="X-Small" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID"
FilterControlAltText="Filter ID column" ></telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="EditStartDt"
FilterControlAltText="Filter TemplateColumn2 column" >
<EditItemTemplate>
<table><tr><td><asp:TextBox ID="txtGrdStartDT" runat="server" Font-Names="Calibri" Font-Size="X-Small" Height="22px" ReadOnly="true" style="margin-left: 0px"
Width="74px"></asp:TextBox>
<asp:Calendar ID="calGrdCalendar" runat="server" BackColor="#F7F6F3"
BorderColor="#003399" BorderWidth="1px" DayNameFormat="Shortest"
Font-Names="Calibri" Font-Size="XX-Small" ForeColor="#284775" Height="88px"
OnDayRender="calGrdCalendar_DayRender"
OnSelectionChanged="calGrdCalendar_OnSelectionChanged" ShowGridLines="True"
style="margin-right: 0px; margin-top: 1px; margin-bottom: 0px; margin-left: 0px;"
Width="74px" SelectedDate='<%# Bind("Startdt") %>'><SelectedDayStyle BackColor="#999999" Font-Bold="True" /><SelectorStyle
BackColor="#CC3399" /><OtherMonthDayStyle ForeColor="#284775" /><NextPrevStyle
Font-Size="9pt" ForeColor="Silver" /><DayHeaderStyle BackColor="#CCCCCC"
Font-Bold="True" Height="1px" /><TitleStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="9pt"
ForeColor="White" /></asp:Calendar></td></tr></table></EditItemTemplate><ItemTemplate><table><tr><td>
<asp:Label ID="lblStartDT" runat="server" Text='<%# Bind("StartDT") %>'
Width="80px"></asp:Label></td></tr><tr><td><asp:Label ID="lblchk" runat="server" Text="Lv Extn"></asp:Label>
</td><td><asp:CheckBox ID="chk1" runat="server" AutoPostBack="true"
oncheckedchanged="chk1_CheckedChanged"
ToolTip="Allow start leave on weekends or holidays for those extended their leave" /></td></tr></table>
</ItemTemplate><ItemStyle HorizontalAlign="Right" Width="15%" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="EditEndDt"
FilterControlAltText="Filter TemplateColumn2 column" >
<EditItemTemplate><table><tr><td><asp:TextBox ID="txtGrdEndDT" runat="server" style="margin-left: 0px" Width="65px"
ReadOnly="true" Height="22px" Font-Names="Calibri" Font-Size="X-Small" ></asp:TextBox>
<asp:Calendar ID="calGrdCalendar2" OnDayRender="calGrdCalendar2_DayRender"
runat="server" OnSelectionChanged="calGrdCalendar2_OnSelectionChanged"
Height="88px" Width="66px"
style="margin-right: 0px; margin-top: 1px; margin-bottom: 0px; margin-left: 0px;" BackColor="#F7F6F3"
BorderColor="#003399" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Calibri"
Font-Size="XX-Small" ForeColor="#284775" ShowGridLines="True" ><SelectedDayStyle BackColor="#999999" Font-Bold="True" /><SelectorStyle BackColor="#CC3399" /><OtherMonthDayStyle ForeColor="#284775" /><NextPrevStyle
Font-Size="9pt" ForeColor="Silver" /><DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Height="1px" /><TitleStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="9pt" ForeColor="White" /></asp:Calendar></td></tr></table>
</EditItemTemplate>
<ItemTemplate><asp:Label ID="lblEndDT" runat="server" Width="80px" Text='<%#Eval("EndDT") %>'/></ItemTemplate><ItemStyle HorizontalAlign="Right" Width="15%" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Type"
FilterControlAltText="Filter TemplateColumn2 column" >
<EditItemTemplate><asp:DropDownList AutoPostBack="true" ID="ddlGrdAtnType" runat="server" Width="80px"
Font-Names="Calibri" Font-Size="X-Small"
onselectedindexchanged="ddlGrdAtnType_SelectedIndexChanged" ></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate><asp:Label ID="lblGrdAtendnce" runat="server" Text='<%# Bind("Type") %>' ></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Days"
FilterControlAltText="Filter Days column" >
<ItemTemplate><asp:Label ID="lblDays" runat="server" Font-Names="Calibri" Font-Size="X-Small"
Text='<%# String.Format("{0:f2}",DataBinder.Eval(Container.DataItem, "Days")) %>' /></ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Days"
FilterControlAltText="Filter Days column" >
<ItemTemplate><asp:Label ID="lblDays" runat="server" Font-Names="Calibri" Font-Size="X-Small"
Text='<%# String.Format("{0:f2}",DataBinder.Eval(Container.DataItem, "Days")) %>' /></ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Holi"
FilterControlAltText="Filter Holi column" >
<ItemTemplate><asp:Label ID="lblHols" runat="server"
Text='<%# String.Format("{0:f2}",DataBinder.Eval(Container.DataItem, "Holidays")) %>'
/></ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="20px" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Status" HeaderText="Status"
FilterControlAltText="Filter Status column" UniqueName="Status" ></telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Annu"
FilterControlAltText="Filter Annu column" >
<ItemTemplate><asp:Label ID="lblDaysAnnual" runat="server"
Text='<%# String.Format("{0:f2}",DataBinder.Eval(Container.DataItem, "Annual")) %>'
/></ItemTemplate><HeaderStyle HorizontalAlign="Left" Width="25px" /><ItemStyle HorizontalAlign="Right"
Font-Names="Calibri" Font-Size="X-Small" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Notes" HeaderText="Remarks"
FilterControlAltText="Filter Notes column" UniqueName="Notes" >
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn1 column"
UniqueName="EditCommandColumn1" >
</EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu RenderMode="Lightweight">
</FilterMenu>
<HeaderContextMenu RenderMode="Lightweight">
</HeaderContextMenu>
</telerik:RadGrid>
Thanks
Hi!
I wanted to modify style of RadCombo on server side, something like this:
01.
protected
void
SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
02.
{
03.
var radCombo = sender
as
RadComboBox;
04.
var parent = radCombo.Parent;
05.
06.
// cuted...
07.
08.
int
constLeft = 130;
09.
int
avgTokenWidth = 73;
10.
int
computed = constLeft + (avgTokenWidth * autocomplete.Entries.Count);
11.
radCombo.Style[
"Left"
] = computed.ToString() +
" px ! important"
;
12.
}
But it doesn't do anything. How to push these change to the client?
I am trying to get inline popup working but for some resson its displaying nothing no editable fields for the user the insert and cancel are showing fine. I have made sure to have ajax manager and a ajax loader as per demo
01.
<telerik:RadAjaxManager ID=
"RadAjaxManager2"
runat=
"server"
>
02.
<AjaxSettings>
03.
<telerik:AjaxSetting AjaxControlID=
"rpNotes"
>
04.
<UpdatedControls>
05.
<telerik:AjaxUpdatedControl ControlID=
"rpNotes"
LoadingPanelID=
"RadAjaxLoadingPanel1"
/>
06.
</UpdatedControls>
07.
</telerik:AjaxSetting>
08.
</AjaxSettings>
09.
</telerik:RadAjaxManager>
10.
<telerik:RadAjaxPanel ID=
"rpNotes"
runat=
"server"
>
11.
<telerik:RadAjaxLoadingPanel ID=
"RadAjaxLoadingPanel1"
runat=
"server"
/>
12.
<telerik:RadGrid ID=
"rgNotes"
runat=
"server"
GroupPanelPosition=
"Top"
Skin=
"Bootstrap"
>
13.
<GroupingSettings CollapseAllTooltip=
"Collapse all groups"
></GroupingSettings>
14.
<MasterTableView NoDetailRecordsText=
"No notes for this Appointment"
AutoGenerateColumns=
"False"
CommandItemDisplay=
"Top"
CommandItemSettings-AddNewRecordText=
"Add Notes"
AllowAutomaticInserts=
"true"
EditMode=
"InPlace"
>
15.
<Columns>
16.
<telerik:GridEditCommandColumn UniqueName=
"EditCommandColumn"
>
17.
</telerik:GridEditCommandColumn>
18.
<telerik:GridBoundColumn DataField=
"Subject"
FilterControlAltText=
"Filter Subject column"
HeaderText=
"subject"
ReadOnly=
"True"
SortExpression=
"Subject"
UniqueName=
"Subject"
>
19.
</telerik:GridBoundColumn>
20.
</Columns>
21.
</MasterTableView>
22.
</telerik:RadGrid>
23.
</telerik:RadAjaxPanel>
24.
<div></div>
25.
</div>
26.
<br />
I am filling my rad grid using dal access which is the following routine.
01.
/// <summary>
02.
/// Gets the allnotes by appointment.
03.
/// </summary>
04.
/// <param name="id">The identifier.</param>
05.
/// <returns></returns>
06.
public
List<tblApertureNetNote> getNotesByAppointment(
int
id)
07.
{
08.
try
09.
{
10.
var _notes = apertureNetEntities.tblApertureNetNotes.Where(f => f.isDeleted ==
false
&& f.appointment_id == id).OrderByDescending(o => o.authCreatedDate).ToList();
11.
return
_notes.AsQueryable().ToList();
12.
}
13.
catch
(Exception ex)
14.
15.
{
16.
string
inner =
string
.Empty;
17.
if
(ex.InnerException !=
null
)
18.
{
19.
inner = ex.InnerException.ToString();
20.
}
21.
logger.Error(
"Error in IQueryable function getNotesByAppointment "
+ ex.ToString() +
" "
+ inner);
22.
return
null
;
23.
}
24.
}
Hi,
I am trying to use the Rad Searchbox as in example: http://demos.telerik.com/aspnet-ajax/searchbox/examples/overview/defaultcs.aspx
I have added the similar code, but the rad search box is throwing error as "Unknown element".
How to use the Rad Searchbox?
Thanks
Hi,
I am using the scheduler control for a project, and I am quite new to it, your guidance on below 3 problems would be very helpful.
I have a list of free time, and time booked for appointment etc. Now based on this the remaining timeslots should be disabled.
i.e. for example if for today I have my time available from say 9:00 AM to 10:00AM then an appointment from 10:00AM to 12:AM and then a available time from 12:PM to 3:00PM . except for these time the remaining timeslots should be disabled. How can I achieve this.
I am loading the appointment from the server side, hence using the TimeSlotCreated event I was not able to change the timeslots.
Also if you can help me on how to add a tooltip to the available timeslots(in the above example 9:00AM to 10:00AM, I have to show a tool tip as say "available from 9:00AM - 10:00AM".
Third how can I clear a scheduler, say today I have data in scheduler horizontally 3 users in header and each having some appointment, when I move to next day if there are no users and no appointment, I want to clear the scheduler so that the old data is removed. I Tried to clear using below code, but still the see that the header and appointment persist.
DiarySchedule.ResourceTypes.Clear();
Appointments.Clear();
DiarySchedule.DataKeyField = "ID";
DiarySchedule.DataStartField = "Start";
DiarySchedule.DataEndField = "End";
DiarySchedule.DataSubjectField = "Subject";
DiarySchedule.DataDescriptionField = "Description";
DiarySchedule.DataRecurrenceField = "RecurrenceRule";
DiarySchedule.DataRecurrenceParentKeyField = "RecurrenceParentID";
DiarySchedule.DataSource = Appointments;
Thank you
Arvind
Hi
I am new to Telerik I am looking for working independent sample project or web site of Scheduler - Resource Grouping (http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourcegrouping/defaultcs.aspx?skin=Silk). Where can I download such a sample?
Thanks
abahrami
Hi,
We are using Telerik Web UI for AJAX (version 2015.2.729.45). In grid we have data with double quotes (") and filter control is TextBox. Searching text with double quotes fails the search.
please see the attachment.
Code being used - Using the aspx standard script.
<telerik:GridBoundColumn DataField="Name" HeaderText="Header" UniqueName="Name" FilterControlWidth="260px" AllowFiltering="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" />
Kindly let us know for the solution.
Thanks.
Neelesh