Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
148 views
Hi,

Is it possible to have predefined timeslots? For example that all mondays should be divided into bookable timeslots, 8:00 to 11:00, 11:00 to 14:00, 14:00 to 17:00 and so on. All tuesday´s could have a completly different setup and so on.

Possible with templates or something?

//Johnny
Johnny
Top achievements
Rank 1
 answered on 17 Sep 2010
1 answer
123 views
Hi,

I have radgrid with show and hide filter options. Initially filter is disabled. When i click show filter button it is displaying the filter but pageritem in the bottom is not displaying if i click hide button the pageritem is displaying. (Please see the Iamges) I set " PagerStyle-AlwaysVisible="true" ". But still no luck. Can anyone help me how to fix this? ( I am reposting this thread because I am unable to upload pics to my previous post)

Here is my code

<div style="width: 98%; overflow: auto; overflow-y: hidden">
        <telerik:RadGrid ID="gvPjtMnt" runat="server" Height="600px" AutoGenerateColumns="false"
            BorderWidth="2px" BorderStyle="Solid" BackColor="White" AllowPaging="True" PagerStyle-AlwaysVisible="true"
            PageSize="20" AllowSorting="True" AllowFilteringByColumn="true" OnNeedDataSource="gvPjtMnt_OnNeedDataSource"
            OnItemCommand="gvPjtMnt_ItemCommand" OnItemCreated="gvPjtMnt_ItemCreated" EnableViewState="true">
            <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White"
                HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" />
            <AlternatingItemStyle Font-Size="8pt" BackColor="#F5F5E9" HorizontalAlign="Center"
                BorderWidth="1px" BorderColor="White" />
            <ItemStyle HorizontalAlign="Center" />
            <MasterTableView GridLines="None" CommandItemDisplay="Top" DataKeyNames="ProjectId"
                HorizontalAlign="Center" AllowFilteringByColumn="true">
                <CommandItemTemplate>
                    <table style="width: 100%">
                        <tr>
                            <td align="right" style="width: 80%">
                                <asp:LinkButton ID="lnkshwFilter" Text="ShowFilter" Font-Underline="true" ForeColor="MidnightBlue"
                                    runat="server" OnClientClick="return showFilterItem()" />
                                <asp:LinkButton ID="lnkhdFilter" Text="HideFilter" Font-Underline="true" ForeColor="MidnightBlue"
                                    runat="server" OnClientClick="return hideFilterItem()" />
                            </td>
                            <td align="right" style="height: 10px;">
                                Total Records found: <asp:Label ID="lblTotRecCount" runat="server" Font-Bold="True"
                                    Font-Size="10pt" ForeColor="Black" Text="0"></asp:Label>
                            </td>
                            <td align="right" style="width: 5%">
                                    
                                <asp:ImageButton ID="ExportToExcelButton" runat="server" ImageUrl="~/images/ExportToExcel.gif"
                                    ToolTip="Export to Excel" OnClick="ExportExcel_Click" />
                            </td>
                        </tr>
                    </table>
                </CommandItemTemplate>
                <Columns>
                    ........ some columns here.......
                </Columns>
                <ItemStyle ForeColor="#3C5F22" Font-Size="8pt" BackColor="White" BorderWidth="0px"
                    BorderColor="White" />
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="true">
                <ClientEvents OnGridCreated="GridCreated" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <Resizing AllowColumnResize="true" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>


function showFilterItem() {
    $find('<%=gvPjtMnt.ClientID %>').get_masterTableView().showFilterItem();
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkhdFilter').style.display = 'block';
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkshwFilter').style.display = 'none';
    return false;
 
}
function hideFilterItem() {
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkhdFilter').style.display = 'none';
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkshwFilter').style.display = 'block';
    $find('<%=gvPjtMnt.ClientID %>').get_masterTableView().hideFilterItem();
    return false;
}
function GridCreated(sender, args) {
    sender.get_masterTableView().hideFilterItem();
}

protected void gvPjtMnt_ItemCreated(object sender, GridItemEventArgs e)
    {
        try
        {
            if (e.Item is GridCommandItem)
            {
               LinkButton st = (LinkButton)e.Item.FindControl("lnkhdFilter");
               st.Style["display"] = "none";
            }
        }
        catch (Exception ex)
        {
        }
 
    }
Dimo
Telerik team
 answered on 17 Sep 2010
1 answer
328 views
Hi,

I have radgrid with show and hide filter options. Initially filter is disabled. When i click show filter button it is displaying the filter but pageritem in the bottom is not displaying if i click hide button the pageritem is displaying. (Please see the Iamges) I set " PagerStyle-AlwaysVisible="true" ". But still no luck. Can anyone help me how to fix this? Here is my code

function showFilterItem() {
    $find('<%=gvPjtMnt.ClientID %>').get_masterTableView().showFilterItem();
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkhdFilter').style.display = 'block';
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkshwFilter').style.display = 'none';
    return false;
 
}
function hideFilterItem() {
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkhdFilter').style.display = 'none';
    document.getElementById('ctl00_PagePlaceholder_gvPjtMnt_ctl00_ctl02_ctl00_lnkshwFilter').style.display = 'block';
    $find('<%=gvPjtMnt.ClientID %>').get_masterTableView().hideFilterItem();
    return false;
}
function GridCreated(sender, args) {
    sender.get_masterTableView().hideFilterItem();
}

<div style="width: 98%; overflow: auto; overflow-y: hidden">
                                            <telerik:RadGrid ID="gvPjtMnt" runat="server" Height="600px" AutoGenerateColumns="false"
                                                BorderWidth="2px" BorderStyle="Solid" BackColor="White" AllowPaging="True" PagerStyle-AlwaysVisible="true"
                                                PageSize="20" AllowSorting="True" AllowFilteringByColumn="true" OnNeedDataSource="gvPjtMnt_OnNeedDataSource"
                                                OnItemCommand="gvPjtMnt_ItemCommand" OnItemCreated="gvPjtMnt_ItemCreated" EnableViewState="true">
                                                <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White"
                                                    HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" />
                                                <AlternatingItemStyle Font-Size="8pt" BackColor="#F5F5E9" HorizontalAlign="Center"
                                                    BorderWidth="1px" BorderColor="White" />
                                                <ItemStyle HorizontalAlign="Center" />
                                                <MasterTableView GridLines="None" CommandItemDisplay="Top" DataKeyNames="ProjectId"
                                                    HorizontalAlign="Center" AllowFilteringByColumn="true">
                                                    <CommandItemTemplate>
                                                        <table style="width: 100%">
                                                            <tr>
                                                                <td align="right" style="width: 80%">
                                                                    <asp:LinkButton ID="lnkshwFilter" Text="ShowFilter" Font-Underline="true" ForeColor="MidnightBlue"
                                                                        runat="server" OnClientClick="return showFilterItem()" />
                                                                    <asp:LinkButton ID="lnkhdFilter" Text="HideFilter" Font-Underline="true" ForeColor="MidnightBlue"
                                                                        runat="server" OnClientClick="return hideFilterItem()" />
                                                                </td>
                                                                <td align="right" style="height: 10px;">
                                                                    Total Records found: <asp:Label ID="lblTotRecCount" runat="server" Font-Bold="True"
                                                                        Font-Size="10pt" ForeColor="Black" Text="0"></asp:Label>
                                                                </td>
                                                                <td align="right" style="width: 5%">
                                                                        
                                                                    <asp:ImageButton ID="ExportToExcelButton" runat="server" ImageUrl="~/images/ExportToExcel.gif"
                                                                        ToolTip="Export to Excel" OnClick="ExportExcel_Click" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </CommandItemTemplate>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="ProjectId" UniqueName="ProjectId" Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="LOB" DataField="LOB" UniqueName="LOB">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Division Name" DataField="Division" UniqueName="Division">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Region Name" DataField="MarketName" UniqueName="MarketName">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Project Name" DataField="ProjectName" UniqueName="ProjectName">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Project Manager Name" DataField="ProjectMgrName"
                                                            UniqueName="ProjectMgrName">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Number Of Sites Received" DataField="NumSitesReceived"
                                                            UniqueName="NumSitesReceived">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Accept Service Order Date" DataField="AcceptServiceOrderTaskCompleteDate"
                                                            UniqueName="AcceptServiceOrderTaskCompleteDate" DataFormatString="{0:MM/dd/yyyy}">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="PTD" DataField="PTD" UniqueName="PTD" DataFormatString="{0:MM/dd/yyyy}">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Health Reason" DataField="HealthReason" UniqueName="HealthReason">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Project Health" DataField="ProjectHealth" UniqueName="ProjectHealth">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Customer Signed Date" DataField="CustomerSignedDate"
                                                            UniqueName="CustomerSignedDate" DataFormatString="{0:MM/dd/yyyy}">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="OA Complete Date" DataField="OACompleteDate"
                                                            UniqueName="OACompleteDate" DataFormatString="{0:MM/dd/yyyy}">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Customer Requested Due Date" DataField="CustomerRequestedDueDate"
                                                            UniqueName="CustomerRequestedDueDate" DataFormatString="{0:MM/dd/yyyy}">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Last Note Added" DataField="LastNoteAdded" UniqueName="LastNoteAdded">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn UniqueName="EditRows" HeaderStyle-Width="3%" ItemStyle-Width="3%"
                                                            AllowFiltering="false">
                                                            <ItemTemplate>
                                                                <asp:ImageButton runat="server" ID="EditPMTsk" CommandName="EditRow" ImageUrl="Images/edit-icon.png"
                                                                    ImageAlign="Middle" ToolTip="Edit Task" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                    <ItemStyle ForeColor="#3C5F22" Font-Size="8pt" BackColor="White" BorderWidth="0px"
                                                        BorderColor="White" />
                                                    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
                                                </MasterTableView>
                                                <ClientSettings AllowColumnsReorder="true">
                                                    <ClientEvents OnGridCreated="GridCreated" />
                                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                    <Resizing AllowColumnResize="true" />
                                                </ClientSettings>
                                            </telerik:RadGrid>
                                        </div>

protected void gvPjtMnt_ItemCreated(object sender, GridItemEventArgs e)
{
    try
    {
        if (e.Item is GridCommandItem)
        {
           LinkButton st = (LinkButton)e.Item.FindControl("lnkhdFilter");
           st.Style["display"] = "none";
        }
    }
    catch (Exception ex)
    {
    }
 
}


Thanks.
Dimo
Telerik team
 answered on 17 Sep 2010
1 answer
113 views
Our company filters out Facebook and I don't want to get an exception log for each message I visit on Telerik post!

Atanas
Telerik team
 answered on 17 Sep 2010
2 answers
118 views
Hello

I want to add different icons to the events and categorize them. I want to display the icons in the scheduler. Is there a way to do that?

Thank you

NLV
NLV
Top achievements
Rank 1
 answered on 17 Sep 2010
1 answer
128 views
I have placed a radScheduler on a web page and hooked it up to linq-to-entities that is interfacing to a table called Appointments.  I have all the fields I need to do CRUD operations but when I try to add an appointment by double-clicking on a day and then simply entering a value and clicking Save, I get this error:

"Error: Sys.WebForms.PageRequestManagerServerErrorException: A property named 'RecurrenceParentId' was not found on the entity during an insert, update, or delete operation. Check to ensure that properties specified as binding expressions are available to the data source."

My entity includes the field, "RecurrenceParentId", so I am not quite sure what this error is or how to solve it.  My mark-up code is shown below.  there is no code in the code-behind as I am interacing to the entity.

<telerik:RadScheduler runat="server" ID="radSchAppointments" Width="1100px" Height="700px"
    DayStartTime="08:00:00" DayEndTime="20:00:00" TimeZoneOffset="03:00:00" 
    DataKeyField="ID" DataSubjectField="Subject"
    DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"
    DataRecurrenceParentKeyField="RecurrenceParentId" 
    DataSourceID="edsAppointments" SelectedView="MonthView">
    <AdvancedForm Modal="true" />
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>
<asp:EntityDataSource ID="edsAppointments" runat="server" ConnectionString="name=StoneFalconEntities"
    DefaultContainerName="StoneFalconEntities" EnableDelete="True" EnableInsert="True"
    EnableUpdate="True" EntitySetName="Appointments">
</asp:EntityDataSource>

and here is my table called Appointments:

CREATE TABLE [dbo].[Appointments](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [Subject] [nvarchar](200) NULL,
    [Start] [datetime] NULL,
    [End] [datetime] NULL,
    [RoomID] [int] NULL,
    [UserID] [int] NULL,
    [RecurrenceRule] [nvarchar](50) NULL,
    [RecurrenceParentID] [int] NULL,
 CONSTRAINT [PK_Appointments] PRIMARY KEY CLUSTERED


Iker Llanos
Top achievements
Rank 1
 answered on 17 Sep 2010
2 answers
196 views
Hi,

I'm having a lot of trouble getting the vanilla RangeValidator and RequireFieldValidator to work with the RadDatePicker from the classic suite of controls.

And the ValidationSummary as well.

Are there any tutorials on this?
David
Top achievements
Rank 1
 answered on 17 Sep 2010
1 answer
70 views
Hi,

We wish to use the ImageManager to let users upload images to the /PublishingImages library and at the same time let the user enter relevant image data (i.e. title, keywords, author, description, etc.). How can we implement this?

Another question is regarding the image upload scope. Is it possible to upload images to a different sitecollection? If this is not possible out of the box, how can we go about implementing this?

Last question is regarding image search. Is it possible to search for images based on their content type fields (or taxonomy/metadata)?

With regards,
Ishfaq Khan
Stanimir
Telerik team
 answered on 17 Sep 2010
4 answers
139 views
Can anybody help please....

I'm using two Listviews one inside other (hierarchically). Outside one has no problems. It can be edited normally. However when outside Listview is in edit mode, if i click "add new" button for the inside ListView, it disappears (ListView which is the item of outside ListView disappears). I fought with the code about 3 hours but couln't find a solution :((

Can anybody help please....

Rosen
Telerik team
 answered on 17 Sep 2010
1 answer
100 views
Team,

I've generated an HTML table as shown in the attached.

What my need is I want to populate it in Radgrid.

Is it possible? or give me your suggestion.

Thanks.
Iana Tsolova
Telerik team
 answered on 17 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?