Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
hello to all,

                i would like to ask about this method delete in rad scheduler coz i'm having a validation once there are sub appointment connected on the main appointment he cannot delete unless there are no sub appointment connected to it..my problem is when i click the delete button on confirm dialog box on scheduler the item that supposed to be not to be deleted because of the validation the main appointment disappear what i wanted is when my validation check for this method the item should not be deleted on radscheduler it should still appear ..how can i achieve this.? please guys i need your help..


thanks in advance
Peter
Telerik team
 answered on 22 Aug 2012
2 answers
214 views
I am using Telerik ASP.NET AJAX Version 2012.1.411.40.  I have a page  where the user enters some search criteria and the search results are returned and displayed in a radGrid on the page.  If the entry in the grid is editable, an edit pencil is displayed. When the user clicks the edit pencil, a custom edit form is displayed in a radWindow. This window is opened from the codebehind (I need to pass several values to the edit form so that I know which record I need to edit) in the OnClick event handler using the following code:

rwinEditCustomer.Modal =

 

true;

 

rwinEditCustomer.NavigateUrl =

 

String.Format("CustomerAddEdit.aspx?source={0}&addrid={1}&cntctid={2}", lblSource.Text, hdnAddressId.Value, hdnContactId.Value);

 

 

 

string script = "function f(){$find(\"" + rwinEditCustomer.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";

 

 

 

ScriptManager.RegisterStartupScript(Page, Page.GetType(), "winEditCust", script, true);

 


Buttons are available on the edit form for the user to delete the entry, save the information, or cancel.  If the user clicks delete, I use radconfirm to display a confirmation message. If the user choses to continue with the delete, the record is deleted, the radwindow is closed and the radgrid is rebound. If the user clicks save, the information is saved, the radwindow is closed and the radgrid is rebound.  If the user clicks cancel, the radwindow is closed. That all seems to be working. Now  I need to detect if the user changed any information. If data has been changed, I need to use radconfirm to warn the user about unsaved changes if they click cancel or try to close the edit window. I don't want to warn the user if they click save or if they close the edit window without changing any information.  I've searched through the forums for guidance but haven't been able to connect the dots to get this to work the way I need it to.  At one point, I had it working where I got a valid unsaved changes warning (not using radconfirm though) when the cancel was clicked. But when I tried to close the edit window, the radwindow closed and then displayed the warning which is not the order I'm looking for. 

Any suggestions on how I can do this?

Thanks
Michele
Top achievements
Rank 1
 answered on 22 Aug 2012
3 answers
77 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
341 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
90 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
70 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
184 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
200 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
273 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?