Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
76 views
i have a RadGrid that works when in IE9 document mode, but in IE7 document mode the headers' length are shorter than the corresponding columns' length (see attached).  is there something that can make their lengths the same?  thanks. 

<telerik:RadGrid runat="server" ID="rgdDataPreview" Skin="Office2007" AutoGenerateColumns="true" AllowPaging="true" PageSize="5" OnNeedDataSource="rgdDataPreview_NeedDataSource" OnPageIndexChanged="rgdDataPreview_PageIndexChanged"
                                                OnPageSizeChanged="rgdDataPreview_PageSizeChanged"   
                                                AllowSorting="false" Width="1200px" >
                                                <ClientSettings>
                                                    <Scrolling AllowScroll="true" />
                                                    <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
                                                        ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" />
                                                </ClientSettings>
                                            </telerik:RadGrid>
Pavlina
Telerik team
 answered on 22 Aug 2012
3 answers
339 views
Hello,
I've got an imageeditor with a mix of standard and custom toolbar buttons, and I want to disable them (or hide them) after the user saves the image. Any tips? Here's my code for the ToolGroup:
<telerik:RadImageEditor ID="annotationImageEditor" runat="server"
                    OnImageLoading="annotationImageEditor_ImageLoading"                
                    OnDialogLoading="annotationImageEditor_DialogLoading"
                    Width="500px" Height="500px">
        <Tools>
            <telerik:ImageEditorToolGroup>
                <telerik:ImageEditorTool CommandName="Reset" ToolTip="Clear" />
                <telerik:ImageEditorToolSeparator />
                <telerik:ImageEditorTool CommandName="AddText" ToolTip="Add text"/>                        
                <telerik:ImageEditorTool CommandName="StampArrowDialog" ImageUrl="~/img/rightArrowIcon.png"/>
                <telerik:ImageEditorTool CommandName="StampStatusDialog" mageUrl="~/img/stampicon.png" />
                <telerik:ImageEditorTool CommandName="StampPatient" ImageUrl="~/img/patient.png" />
            </telerik:ImageEditorToolGroup>
        </Tools>
</telerik:RadImageEditor>


Thanks,
Adrian

Vessy
Telerik team
 answered on 22 Aug 2012
4 answers
89 views
Is it possible to use the RadFilter with calculated expressions other than the basic
[field] [compare-op] [value]
?

I'm looking for things such as you'd see in other database expression builders, such as 
[Signature Date] > Today()-60
to see signatures done in the last sixty days, or
[BoltThread] = [NutThread]
to compare two fields.

Those are just two very simple cases, but there's certainly thousands more possibilities.
Tom Rasmussen
Top achievements
Rank 1
 answered on 22 Aug 2012
3 answers
103 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
67 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
178 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
197 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
270 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
218 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
172 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
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?