Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
262 views
Hello,

I'm trying to refresh a radgrid which is placed in a RadPageVieuw from javascript.
I use this code.
$find("<%= RadGrid1.ClientID %>").get_masterTableView().rebind();

When i try this i get an error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).





How do i refresh the gridview from JavaScript then?

Thanks
Jelte
Muralidharan Ramakrishnan
Top achievements
Rank 1
 answered on 23 Mar 2009
1 answer
151 views
Hello.

I'm evaluating this product. I have a very, very simple scenario. I have a resource that I've defined in a resource table. When I hook things up and use the resource, I can see the 2 available resources at the top of the scheduler. I can insert, update, and delete data just fine. However, I cannot get the appointments to show in the scheduler. But when I remove the GroupBy attribute, my appointments show up just fine. I'm wondering what obvious setting I'm missing. Here is my ASPX. I am just using ASPX, no code behind yet:

        <telerik:RadScheduler runat="server" ID="RadScheduler1"
            Width="900px" Skin="Hay" EnableEmbeddedSkins="True" SelectedView="DayView" GroupBy="res" GroupingDirection="Horizontal"
            DayStartTime="08:00:00" DayEndTime="19:00:00" TimeZoneOffset="00:00:00"
            DataSourceID="AppointmentDataSource" DataKeyField="id" DataSubjectField="description"
            DataStartField="start_time" DataEndField="end_time" DataRecurrenceField="recurrence_rule"
            DataRecurrenceParentKeyField="Recurrence_Parent_ID">
            <ResourceTypes>
                <telerik:ResourceType KeyField="id" Name="res" TextField="description" ForeignKeyField="resource_id"
                    DataSourceID="ResourceDataSource" />
            </ResourceTypes>
        </telerik:RadScheduler>

        <asp:SqlDataSource ID="AppointmentDataSource" runat="server"
            ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
            ProviderName="System.Data.SqlClient"
            SelectCommand="SELECT [id], [description], [start_time], [end_time], [resource_id], [recurrence_rule], [recurrence_parent_id] FROM [appointment]"
            InsertCommand="INSERT INTO [appointment] ([description], [start_time], [end_time], [resource_id], [recurrence_rule], [recurrence_parent_id]) VALUES (@Description, @start_time, @end_time, @resource_id, @recurrence_rule, @recurrence_parent_id)"
            UpdateCommand="UPDATE [appointment] SET [description] = @description, [start_time] = @start_time, [end_time] = @end_time, [resource_id] = @resource_id, [recurrence_rule] = @recurrence_rule, [recurrence_parent_id] = @recurrence_parent_id WHERE (id = @ID)"
            DeleteCommand="DELETE FROM [appointment] WHERE [id] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="id" Type="Int32" />
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="start_time" Type="DateTime" />
                <asp:Parameter Name="end_time" Type="DateTime" />
                <asp:Parameter Name="resource_id" Type="Int32" />
                <asp:Parameter Name="recurrence_rule" Type="String" />
                <asp:Parameter Name="recurrence_parent_id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="description" Type="String" />
                <asp:Parameter Name="start_time" Type="DateTime" />
                <asp:Parameter Name="end_time" Type="DateTime" />
                <asp:Parameter Name="resource_id" Type="Int32" />
                <asp:Parameter Name="recurrence_rule" Type="String" />
                <asp:Parameter Name="recurrence_parent_id" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>

        <asp:SqlDataSource ID="ResourceDataSource" runat="server"
            ProviderName="System.Data.SqlClient"
            ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
            SelectCommand="SELECT [id], [description], [create_date], [update_date] FROM [resource]"></asp:SqlDataSource>
Brian
Top achievements
Rank 1
 answered on 22 Mar 2009
14 answers
453 views

pat
Top achievements
Rank 1
 answered on 22 Mar 2009
2 answers
97 views
There seems to be a problem with request encoding.
when sending back a textbox value containing a "<" followed by a caracter via ajax, a 500
server erros is returned.
the issue can be reproduced with your Ajax/Form Values demo:
just enter someting like "<abcd" into the name box and try to save.

regards,
peter
Peter
Top achievements
Rank 1
 answered on 22 Mar 2009
3 answers
245 views
Is there a way to to show a LoadingPanel while an iframe is being loaded?

If so, is there an example of how to accomplish this?


Thanks,
Stephen
Stephen
Top achievements
Rank 1
 answered on 22 Mar 2009
1 answer
133 views
I have a RadGrid on a page that contains a custom ImageButton control in the first column of each row. When I press the button I call the following javascript function:

    function AddDetailRowButtonClicked(id) 
    { 
        var ajaxManager = $find("<%= RadAjaxDetailManager.ClientID %>"); 
        ajaxManager.ajaxRequest(id); 
    } 

What I want to do when this button is pressed is a) save any data that may have already been entered into the grid and b) add a row based on the saved data to the RadGrid's DataSource and rebind it.

So if the table has two rows and they click the button I want to add a third row on the server and have that be added to the grid after the partial page postback.

I'm having two problems. The first is that the data entered client-side is not accessible from the server-side instance of the grid so I cannot save that data. The data does appear if I put a simple button on the page that forces the whole page to postback. Why does it not work here?

The second problem is that when I rebind the grid server-side with a new row those changes are not reflected on the client. Is there something special I have to do to update the grid when using the Ajax Manager?

Thank you.

SamJ
Top achievements
Rank 1
 answered on 22 Mar 2009
1 answer
91 views
I converted a project that was previously using old RadAjax Manager to Q1 2009 RadAjax for ASP .NET.
The old style of letting all the controls within pnl1 regular ASP Panel to modify txtException worked fine.
With Q1 2009, I have to specify each individual control within pnl1 in order to update txtException.
Is this expected behavior?

<asp:Panel ID="pnl1">
   radio buttons
</asp:Panel>

Previous Code:
                <telerik:AjaxSetting AjaxControlID="pnl1">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="txtException" />
                    </updatedcontrols>                
                </telerik:AjaxSetting>

Q1 2009:
                <telerik:AjaxSetting AjaxControlID="rdoCntrl1">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="txtException" />
                    </updatedcontrols>                
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rdoCntrl2">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="txtException" />
                    </updatedcontrols>                
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rdoCntrl3">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="txtException" />
                    </updatedcontrols>                
                </telerik:AjaxSetting>

                <telerik:AjaxSetting AjaxControlID="pnl1">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="txtException" />
                    </updatedcontrols>                
                </telerik:AjaxSetting>
SamJ
Top achievements
Rank 1
 answered on 22 Mar 2009
1 answer
85 views
Is it possible to set the ValidationGroup of TabStrip programmatically through javascript? I need this to validate on a per-tab basis.
chris_cf
Top achievements
Rank 2
 answered on 21 Mar 2009
1 answer
107 views
My page has an xml component inside a RadAjaxPanel, as below:

 

<telerik:RadAjaxPanel ID="XmlViewPanel" runat="server" Height="200px" Width="300px">

 

 

<asp:Xml ID="xmlView" runat="server"></asp:Xml>

 

 

</telerik:RadAjaxPanel>

I also have a RadTreeView that uses LoadOnDemand (TreeNodeExpandMode.ServerSideCallBack) and when the clicks a treeview node that has no children, some xml is loaded into the component, as below:

 

 

xmlView.DocumentContent = "<?xml version=\"1.0\" encoding=\"utf-8\"?><root>" + node.InnerXml + "</root>";

How do I get the RadAjaxPanel to update its client Xml component, and cause the xml text to appear?

An example would be great. Thanks

Chris

 

 

 

SamJ
Top achievements
Rank 1
 answered on 21 Mar 2009
1 answer
96 views
ff
SamJ
Top achievements
Rank 1
 answered on 21 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?