Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
101 views

Hi,

 I am new to this telerik controls. I am using Telerik scheduler to manage some events. 

We are planning to use wcf services to bind and update data since to get a better UI. 

So far i have done like this i have added a web page and added the scheduler control in it. After that created a wcf service TestService.svc and in the code we have added GetAppointments method in the operation contract. Then added a DataProvider.cs which inherits DbSchedulerProviderBase class.
Then we override the method GetAppointments() and returned a list of Appointments. 

So far its working perfectly.

Now suppose i have a table TestTable and i need to bind those data instead of list<AppointmentData>.  Is there any way to do this?
Also i want to know how to pass custom parameters. Can all these done using wcf services? 

For reference i have followed the link http://demos.telerik.com/aspnet-ajax/scheduler/examples/wcf/defaultcs.aspx ..



Thanks,
Mahesh


Peter
Telerik team
 answered on 22 Aug 2012
1 answer
65 views
I've setup a custom filter using a RadComboBox with checkboxes by inheriting from GridBoundColumn.   I have two columns out of about ten that use this custom filter column.  The RadComboBox has AutoPostBack set to true.  Strangely, the combo box triggers the SelectedIndexChanged event on initial page load, so as soon as the page loads the grid immediately reloads (it's wrapped in a RadAjaxPanel).  I've noticed though that this doesn't happen when I turn off ajax on the surrounding ajax panel.  
The bigger problem I have, which isn't fixed by turning off ajax, is that if I make a selection in the second RadComboBox, it triggers the SelectedIndexChanged event in the first one, instead of the correct one.  Just to make sure that this problem is specific to the RadComboBox, I did a test using a regular DropDownList and it worked fine.  My code is below.  Please let me know if there are any changes I can make to get this working.  The version of the RadControls I'm using is about a year old so I guess it's possible this is a bug that's been fixed in a newer version [UPDATE: I've done a test with the latest version of RadControls and the problem persists].

public class GridBoundMultiSelectFilterColumn : GridBoundColumn
{
    private readonly XrefGateway _xrefGateway = new XrefGateway();
 
    protected override void SetupFilterControls(TableCell cell)
    {
        base.SetupFilterControls(cell);
        cell.Controls.RemoveAt(0);
 
        var comboBox = new RadComboBox() { ID = this.DataField + "Filter", AutoPostBack = true, CheckBoxes = true, EnableCheckAllItemsCheckBox = true};
        IList<string> options = _xrefGateway.GetUniqueColumnValues(DataField);
        foreach (var option in options)
        {
            comboBox.Items.Add(new RadComboBoxItem(option));
        }
        cell.Controls.AddAt(0, comboBox);
        cell.Controls.RemoveAt(1);
        comboBox.SelectedIndexChanged += comboBox_SelectedIndexChanged;
 
        
        if(Filter != null)
        {
            foreach (RadComboBoxItem item in comboBox.Items)
            {
                item.Checked = Filter.Values.Contains(item.Text);
            }
        }
    }
 
 
 
    void comboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        var comboBox = (RadComboBox)sender;
        if ((Filter == null || Filter.Values.Count == 0) && comboBox.CheckedItems.Count == 0)
            return;
        Filter = new MultiSelectFilter() { ColumnName = DataField };
        foreach (RadComboBoxItem item in comboBox.CheckedItems)
        {
            Filter.Values.Add(item.Text);
        }
 
        var filterItem = comboBox.NamingContainer as GridFilteringItem;
 
 
        filterItem.FireCommandEvent("CustomFilter", Filter);
    }
 
 
    protected override string GetFilterDataField()
    {
        return this.DataField;
    }
 
    private MultiSelectFilter Filter
    {
        get { return (MultiSelectFilter) ViewState["Filter"]; }
        set { ViewState["Filter"] = value; }
    }
}
   
Pavlina
Telerik team
 answered on 22 Aug 2012
2 answers
172 views
Hello,

I have a RadNumericTextBox and I want to toggle between Number and Percent number format type when I check or uncheck a checkbox. It is possible to do that in JavaScript? I saw RadNumericTextBox has set_numberFormat function, but i don't know how to handle it.

Thanks!
Antonio
Top achievements
Rank 1
 answered on 22 Aug 2012
2 answers
188 views
Hi, i know if not posible export in a RadGrid with ajax and doesn't show loading panel. Exist Any way to simulate this, ie, show a wating image while export and hide it when the process finish
croach01
Top achievements
Rank 1
 answered on 22 Aug 2012
2 answers
265 views
I had scenario where I need to display a progress bar or something to show the user the process is being done. this has to be done while inserting, updating or deleting a record from radgrid. any suggestions will be appreciated.

Thanks
croach01
Top achievements
Rank 1
 answered on 22 Aug 2012
15 answers
216 views
I have a splitter and I print the contents of one of the panes using the following. The pane contains a textbox which users can enter data into prior to printing. It seems that this method of printing does not include the value of the textbox when rendering the print view. Is there a way to get a rad pane to print with the text box contents?

            function PrintReport() {  
                var splitter = $find("<%= rsReport.ClientID %>");  
                var pane = splitter.getPaneById("<%= rcPane.ClientID %>");  
 
                if (!pane) return;  
 
                var cssFileAbsPaths = new Array();  
                cssFileAbsPaths[0] = '<%= Me.MyAppPath %>/global/css/global.css';  
                cssFileAbsPaths[1] = '<%= Me.MyAppPath %>/common/css/tools.css';  
                pane.Print(cssFileAbsPaths);  
 
            } 
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 22 Aug 2012
1 answer
169 views
I'm new to using the telerick radscheduler and I'm having problems with loading the scheduler with data.

This is what I have:

 

 

class AppointmentInfo

 

{

 

 

private readonly string _id;

 

 

 

private string _subject;

 

 

 

private DateTime _start;

 

 

 

private DateTime _end;

 

 

 

private string _unit;

 

 

 

private string _clr;

 

 

 

private string _img;

 

 

 

public string ID

 

{

 

 

get { return _id; }

 

}

 

 

public string Subject

 

{

 

 

get { return _subject; }

 

 

 

set { _subject = value; }

 

}

 

 

public DateTime Start

 

{

 

 

get { return _start; }

 

 

 

set { _start = value; }

 

}

 

 

public DateTime End

 

{

 

 

get { return _end; }

 

 

 

set { _end = value; }

 

}

 

 

public string Unit

 

{

 

 

get { return _unit; }

 

 

 

set { _unit = value; }

 

}

 

 

public string Clr

 

{

 

 

get { return _clr; }

 

 

 

set { _clr = value; }

 

}

 

 

public string Img

 

{

 

 

get { return _img; }

 

 

 

set { _img = value; }

 

}

 

 

private AppointmentInfo()

 

{

_id =

 

Guid.NewGuid().ToString();

 

}

 

 

 

public AppointmentInfo(string unitid, DateTime start, DateTime end, string unit, string clr, string img)

 

:

 

this()

 

{

_subject = unitid;

_start = start;

_end = end;

_unit = unit;

_clr = clr;

_img = img;

}

 

 

public AppointmentInfo(Appointment source)

 

:

 

this()

 

{

CopyInfo(source);

}

 

 

public void CopyInfo(Appointment source)

 

{

Subject = source.Subject;

Start = source.Start;

End = source.End;

 

 

 

//Resource unit = source.Resources.GetResourceByType("unit");

 

 

 

//if (user != null)

 

 

 

//{

 

 

 

// UnitID = (int?)unit.Key;

 

 

 

//}

 

 

 

//else

 

 

 

//{

 

 

 

// UnitID = null;

 

 

 

//}

 

 

}

}

 

public

 

 

partial class Calendar : Common.PortalPage

 

 

 

 

 

{

 

 

private const string AppointmentsKey = "Telerik.Web.Examples.Scheduler.BindToList.CS.Apts";

 

 

 

 

 

private List<AppointmentInfo> UnitList

 

{

 

 

get

 

 

 

 

 

{

 

 

List<AppointmentInfo > sessApts = Session[AppointmentsKey] as List<AppointmentInfo>;

 

 

 

if (sessApts == null)

 

{

sessApts =

 

new List<AppointmentInfo>();

 

Session[AppointmentsKey] = sessApts;

}

 

 

return sessApts;

 

}

}

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

if (!IsPostBack)

 

{

Session.Remove(AppointmentsKey);

 

 

ResourceType resType = new ResourceType("unit");

 

resType.ForeignKeyField =

 

"UnitID";

 

RadScheduler1.ResourceTypes.Add(resType);

RadScheduler1.Resources.Add(

 

new Resource("unit", 1, "unit1"));

 

RadScheduler1.Resources.Add(

 

new Resource("unit", 2, "unit2"));

 

RadScheduler1.Resources.Add(

 

new Resource("unit", 3, "unit3"));

 

LoadData();

}

 

RadScheduler1.DataSource = UnitList;

}

 

 

 

private void LoadData()

 

{

 ...get data from sql db

  units = SIMS.BL.Presentation.Contracts.

 

Extensions.GetPortalCalendarUnits(this.UserCredential, request);

 

 

UnitList.Clear();

 

 

foreach (InspectionUnit Unit in units)

 

{

 

    UnitList.Add (

 

new AppointmentInfo(Convert.ToString(Unit.UnitID), (DateTime)(Unit.InsTimeBlockStart),

 

    (

 

DateTime)(Unit.InsTimeBlockEnd), Unit.Unit, Unit.Clr, Unit.Img));

 

}

}

ASPX code:

 

<

 

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

 

 

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

 

 

 

 

 

 

<td valign="top" >

 

 

 

 

 

 

 

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="WeekView"

 

 

 

Width ="884px" Skin="Web20"

 

 

 

DayStartTime="07:00:00" DayEndTime="20:00:00"

 

 

 

 

 

 

 

 

DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject"

 

 

 

 

 

 

 

 

OnAppointmentCreated="RadScheduler1_AppointmentCreated"

 

 

 

onappointmentclick="RadScheduler1_AppointmentClick"

 

 

 

OnNavigationComplete="RadScheduler1_NavigationComplete"

 

 

 

onappointmentinsert="RadScheduler1_AppointmentInsert"

 

 

 

>

 

 

 

 

 

 

 

 

<AdvancedForm Modal = "false" />

 

 

 

 

 

 

 

 

<TimelineView UserSelectable="false" />

 

 

 

 

 

 

 

 

<TimeSlotContextMenuSettings EnableDefault ="true" />

 

 

 

 

 

 

 

 

<AppointmentContextMenuSettings EnableDefault ="true" />

 

 

 

 

 

 

 

 

<Reminders Enabled="false" />

 

 

 

 

 

 

 

 

</telerik:RadScheduler>

 



There are at least three records from the database, I can't figure why the scheduler is not displaying the data?

Thanks in advance for your help
Dan Pocica
Boyan Dimitrov
Telerik team
 answered on 22 Aug 2012
3 answers
129 views
I am trying to use a RadAjaxLoadingPanel to show a loading indicator when my RadGrid is loading additional data in the OnDetailTableBind event.  When the grid is loading additional data, it disappears and no loading indicator appears.  If I don't associate the RadAjaxLoadingPanel with the RadGrid, then the grid just sits there until the load finishes.

Here is the code for my page, with columns and detail tables removed for brevity:

<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgvCorporateSummary">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgvCorporateSummary" LoadingPanelID="rgvCorporateSummaryLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="rgvCorporateSummaryLoadingPanel" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="rgvCorporateSummary" runat="server" AutoGenerateColumns="false" ShowStatusBar="true" ShowFooter="true" Skin="WebBlue"
        OnCustomAggregate="rgvCorporateSummary_CustomAggregate" OnNeedDataSource="rgvCorporateSummary_NeedDataSource"
        OnDetailTableDataBind="rgvCorporateSummary_DetailTableDataBind" OnItemCreated="rgvCorporateSummary_ItemCreated">
        <FooterStyle BackColor="#718CA1" ForeColor="White" />
        <MasterTableView DataKeyNames="LocationID" AllowMultiColumnSorting="True" HorizontalAlign="Right" Width="100%">
</MasterTableView>
    </telerik:RadGrid>
</asp:Content>

The master page for this page includes these lines which are relevant:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
...
<telerik:RadScriptManager ID="rdScriptManager" runat="server" EnablePartialRendering="true" AsyncPostBackTimeout="3600">
                <Scripts>
                    ...
                </Scripts>
            </telerik:RadScriptManager>

The loading effect seems to work in this demo: http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/autogeneratedhierarchy/defaultcs.aspx  but I don't see what I am doing differently that should cause this problem.

Thanks in advance for any help.
     -Brian
Pavlina
Telerik team
 answered on 22 Aug 2012
1 answer
47 views
Hi,

I installed the acceleration kit. In SPD 2010 it shows the editor with the remark that it needs a script manager. The script manager however is in the master page...

Any idea?

frank
Dobromir
Telerik team
 answered on 22 Aug 2012
1 answer
90 views
Using a standard asp.net Linkbutton, the Alt + Access Key focuses on the button, but required the Enter key to be pressed in order to execute the command.  
Our keyboard users really like this feature because it allows users to hear the tooltip for the button before executing, and also allows for looping through a series of buttons that share the same Access Key.

When I converted the application to use Radbuttons, the Alt+Access Key now automatically executes the command.

What do you recommend for requiring the Enter key before execution? 


Slav
Telerik team
 answered on 22 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?