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

I am Using RadTree.

My requirement is like I want only select one child node in tree in backend side.

Please Give me proper solution.

Thanks.

Kishor Dalwadi
Inception
Top achievements
Rank 1
Veteran
 answered on 26 Jan 2011
1 answer
129 views

 

I have some ajax stuff on the page- fill one dropdown based on another dropdown's selection.
I also used Radcaptcha, when submit the page, the page alway  not valid, unless putting the radcaptcha inside the UpdatePanel .

 

<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
<telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ValidationGroup="Group"
ErrorMessage="Page not valid. The code you entered is not valid.Page not valid. The code you entered is not valid"
ImageStorageLocation="Session">
</telerik:RadCaptcha>
</ContentTemplate>
</asp:UpdatePanel>

This will solve page not valid problem, but everytime when the ajax fired (first dropdown is selected), the Radcaptcha's text got changed.  Is there anyway that can prevent the Radcaptcha text changing everytime when the ajax fired?

Thanks

 

Pero
Telerik team
 answered on 26 Jan 2011
3 answers
81 views
Hi,

I have a RadGrid with a template column that uses a user control in the Edit Template. The user control tries to Register a script to run that has a function in it that will be called when the user clicks on the user control. However the function is not properly registered and cannot be called by the user control.

If I remove the RadGrid from the RadAjaxManager everything works fine.

Here is a link to a sample project (zipped) that demonstrates my problem: sample project.

I have looked around on the forums and tried some of the other suggestions to no avail.

Can you please suggest a workaround for this?

Thanks,
Oran
Maria Ilieva
Telerik team
 answered on 26 Jan 2011
1 answer
69 views

Hi,
I have created a RadGrid with self-referencing hierarchy without a problem. But as we are having some performance issues I don't have the luxure to send/receive big page sizes each time. So I send the grid empty without binding the data on needDataSource event. Then I get the data with ajax in json format which is quite small. The problem is I cannot find a client side event, which formats the data with the given hierarchical structure. Is there a way for that or do I need to write a custom javascript function to create that structure?

Where should I assign the filter expression on client side, which I do on server side like t.MasterTableView.FilterExpression = @"it[""PARENT""] = Convert.DBNull";

Given code creates the grid and binds the data but without a structure.

Thanks in advance,

Cem

<telerik:RadGrid ID="t" runat="server" AutoGenerateColumns="false" AllowPaging="True"
            HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" AllowSorting="True"
            PageSize="10"
            <mastertableview datakeynames="CHILD,PARENT"
                <SelfHierarchySettings ParentKeyName="PARENT" KeyName="CHILD" /> 
                <Columns
                    <telerik:GridBoundColumn DataField="CHILD" HeaderText="CHILD"
                    </telerik:GridBoundColumn
                    <telerik:GridBoundColumn DataField="PARENT" HeaderText="PARENT"
                    </telerik:GridBoundColumn
                    <telerik:GridBoundColumn DataField="AMOUNT" HeaderText="AMOUNT" >                
                    </telerik:GridBoundColumn
                </Columns
            </mastertableview
            <clientsettings allowexpandcollapse="true" selecting-allowrowselect="true" enablerowhoverstyle="false"
                <Scrolling AllowScroll="True" ScrollHeight="400px" UseStaticHeaders="True" />                 
            </clientsettings
        </telerik:RadGrid>


Sys.Application.add_init(function() { 
        var grid = $find("<%=t.ClientID%>"); 
        var tableView = grid.get_masterTableView(); 
        var id = grid.get_element().id; 
        var objData = { 
            id: id, 
            startIndex: tableView.get_currentPageIndex(), 
            pageSize: tableView.get_pageSize(),             
        }; 
    
        $.ajax({ 
            type: "POST"
            url: url, 
            data: Sys.Serialization.JavaScriptSerializer.serialize({ data: objData }), 
            contentType: "application/json; charset=utf-8"
            success: function(arg) { 
                //create an array with coming data and assign it         
                tableView.set_dataSource(arr); 
                tableView.dataBind(); 
                }, 
                before: function() { 
                }, 
                error: function() { 
                
            });
Tsvetina
Telerik team
 answered on 26 Jan 2011
1 answer
59 views
I have a grid with a column for country and type along with many others.

By default the grid is ordered by country. When I click the letters in the pager at the bottom of the grid, it filters the country correctly.

Then I add a filter to the grid for type. Then I hide the filter and click the letters in the pager at the bottom of the grid. At sporadic times, it will still be filtered by type. Other times it will be filtered by country. What is happening here?
Maria Ilieva
Telerik team
 answered on 26 Jan 2011
1 answer
194 views
Hello! I has faced such problem. I try to get access to control being inside RadDock using JavaScript. I do it as follows...

<script type="text/javascript">

var test = $find("<%=RadDock1.ContentContainer.FindControl("val1").ClientID %>");

</script>

 <telerik:RadDock ID="RadDock1" runat="server" Width="300px">
        <ContentTemplate>

        <telerik:RadTextBox ID="val1" runat="server">
        </telerik:RadTextBox>

</ContentTemplate>
</telerik:RadDock>

When page generated, i cannot get access to control, and its "null" because if look html code i see the following...

<span id="RadDock1_C_val1_wrapper" class="RadInput RadInput_Default" style="white-space:nowrap;">
<input type="text" size="20" id="RadDock1_C_val1_text" name="RadDock1_C_val1_text" class="riTextBox riEnabled" style="width:125px;" />
<input id="RadDock1_C_val1" name="RadDock1$C$val1" class="rdfd_" style="visibility:hidden;margin:-18px 0 0 -1px;width:1px;height:1px;overflow:hidden;border:0;padding:0;" type="text" value="" />
<input id="RadDock1_C_val1_ClientState" name="RadDock1_C_val1_ClientState" type="hidden" /></span>
And my javascript code - var test = $find("<%=RadDock1.ContentContainer.FindControl("val1").ClientID %>");
find this control - RadDock1_C_val1 but it is null. How can i get access to this control - RadDock1_C_val1_text ??? what i do not so??

Thanks!
Pero
Telerik team
 answered on 26 Jan 2011
3 answers
47 views
Hi,

I have a Web Service that will provide an image. How can I call the web service using ajax to get the image for this one column. Are there any examples for this.

Thanks
Maria Ilieva
Telerik team
 answered on 26 Jan 2011
1 answer
111 views
I am having the hardest time accomplishing what should be a simple task.

I have a series of contracts with start and end dates, a contract number and a customer's name. I would like to Group By the contract number and display the contract number, end date and customer's name. I would like each field to be displayed in the same column as the sub table. How do I do this?

I would also like sorting to be applied to the Group By items. Any ideas?
Marin
Telerik team
 answered on 26 Jan 2011
3 answers
168 views

Hi,
I found a problem on the radcombobox on my radgrid. If I selected couple of values from the combobox by using autocomplete separator & click update, it didn't work at all. If I selected only one value from the combobox, it could be updated properly on the table on my sql database.
Can any of you tell me what is wrong ?

<%@ Page Language="VB" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       
       
   
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                 <telerik:AjaxSetting AjaxControlID="RadCombobox1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
            Transparency="50">
            <div style="background-color: #FFFFFF; height: 100%;">
            <asp:Image ID="Image1" runat="server" ImageUrl="loading1.gif"
                    AlternateText="loading" ImageAlign="AbsMiddle" />
        </div>

         </telerik:RadAjaxLoadingPanel>
        
       
        <br />
        <br />
        <telerik:RadComboBox ID="RadComboBox1" Runat="server"
            DataSourceID="SqlDataSource3" DataTextField="F5" DataValueField="F5"
            Height="20px" MaxHeight="500px" Width="412px" AutoPostBack="True"
            Skin="WebBlue" AppendDataBoundItems="True">
            <Items>
            <telerik:RadComboBoxItem value="0", Text="Please select your name..." />
            </Items>
        </telerik:RadComboBox>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"
            ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
            SelectCommand="SELECT DISTINCT F5 FROM OriginalReport"></asp:SqlDataSource>
        <br />
        <br />
       
              
       
       
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                    GridLines="None" Skin="WebBlue" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" >
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_WebBlue"></HeaderContextMenu>

                    <MasterTableView  DataKeyNames="F1"
                        DataSourceID="SqlDataSource1" CommandItemDisplay="TopAndBottom">

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                        <Columns>
                         <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" >
                              <HeaderStyle Width="10px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="F1" DataType="System.Int32" HeaderText="ID#"
                                ReadOnly="True" SortExpression="F1" UniqueName="F1"
                                FilterControlAltText="Filter F1 column">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="F2"
                                FilterControlAltText="Filter F2 column" HeaderText="Publication Date"
                                UniqueName="F2">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridBoundColumn DataField="F3" HeaderText="DocID" SortExpression="F3"
                                UniqueName="F3" FilterControlAltText="Filter F3 column">
                            </telerik:GridBoundColumn>
                            <telerik:GridHTMLEditorColumn DataField="F4"
                                FilterControlAltText="Filter F4 column" HeaderText="Report Title"
                                UniqueName="F4">
                            </telerik:GridHTMLEditorColumn>
                            <telerik:GridBoundColumn DataField="F5" FilterControlAltText="Filter F5 column"
                                HeaderText="Written by..." SortExpression="F5" UniqueName="F5">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="F6" FilterControlAltText="Filter F6 column"
                                HeaderText="Written by..." SortExpression="F6" UniqueName="F6">
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn DataField="F7" DataSourceID="SqlDataSource5"
                                FilterControlAltText="Filter F7 column" HeaderText="Content Type"
                                ListTextField="F1" ListValueField="F1" UniqueName="F7">
                            </telerik:GridDropDownColumn>
                            <telerik:GridDropDownColumn DataField="F8" DataSourceID="SqlDataSource4"
                                FilterControlAltText="Filter F8 column" HeaderText="Industry"
                                ListTextField="F1" ListValueField="F1" UniqueName="F8">
                            </telerik:GridDropDownColumn>
                            <telerik:GridTemplateColumn DataField="F9"
                                FilterControlAltText="Filter F9 column" HeaderText="Global Vendor"
                                UniqueName="F9">
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="F9RadComboBox" runat="server" AllowCustomText="True"
                                        AutoCompleteSeparator=";" DataSourceID="SqlDataSource2" DataTextField="F1"
                                        DataValueField="F1" Height="19px" MarkFirstMatch="True"
                                        SelectedValue='<%# Bind("F9") %>' Width="504px"  MaxHeight="500px" >
                                    </telerik:RadComboBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="F9Label" runat="server" Text='<%# Eval("F9") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="F10" FilterControlAltText="Filter F10 column"
                                HeaderText="Vendor manual input" SortExpression="F10" UniqueName="F10">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn UniqueName="EditCommandColumn1" >
                            </EditColumn>
                        </EditFormSettings>
                        <CommandItemSettings ShowExportToCsvButton="True" ShowExportToExcelButton="True"
                            ShowExportToPdfButton="True" ShowExportToWordButton="True" />
                    </MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>
                </telerik:RadGrid>
               
               
               
                
                <br />
                <br />
       

       
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
                    DeleteCommand="DELETE FROM [OriginalReport] WHERE [F1] = @F1"
                    InsertCommand="INSERT INTO [OriginalReport] ([F2], [F3], [F4], [F5], [F6], [F7], [F8], [F9], [F10]) VALUES (@F2, @F3, @F4, @F5, @F6, @F7, @F8, @F9, @F10)"
                    SelectCommand="SELECT [F1], [F2], [F3], [F4], [F5], [F6], [F7], [F8], [F9], [F10] FROM [OriginalReport] WHERE ([F5] = @F5)"
                   
           
            UpdateCommand="UPDATE [OriginalReport] SET [F2] = @F2, [F3] = @F3, [F4] = @F4, [F5] = @F5, [F6] = @F6, [F7] = @F7, [F8] = @F8, [F9] = @F9, [F10] = @F10 WHERE [F1] = @F1">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="RadComboBox1" Name="F5"
                            PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="F1" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="F2" Type="DateTime" />
                        <asp:Parameter Name="F3" Type="String" />
                        <asp:Parameter Name="F4" Type="String" />
                        <asp:Parameter Name="F5" Type="String" />
                        <asp:Parameter Name="F6" Type="String" />
                        <asp:Parameter Name="F7" Type="String" />
                        <asp:Parameter Name="F8" Type="String" />
                        <asp:Parameter Name="F9" Type="String" />
                        <asp:Parameter Name="F10" Type="String" />
                        <asp:Parameter Name="F1" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="F2" Type="DateTime" />
                        <asp:Parameter Name="F3" Type="String" />
                        <asp:Parameter Name="F4" Type="String" />
                        <asp:Parameter Name="F5" Type="String" />
                        <asp:Parameter Name="F6" Type="String" />
                        <asp:Parameter Name="F7" Type="String" />
                        <asp:Parameter Name="F8" Type="String" />
                        <asp:Parameter Name="F9" Type="String" />
                        <asp:Parameter Name="F10" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
              
    </div>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [Vendors] ORDER BY [F1]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [Industry] ORDER BY [F1]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [contenttype] ORDER BY [F1]">
    </asp:SqlDataSource>
    </form>
</body>
</html>

Marin
Telerik team
 answered on 26 Jan 2011
1 answer
218 views

Posted on Jan 20, 2011 (permalink)

Hi Peter,

Version am using is: <image:telerikversion.jpg>
Based on this version, Please help me to solve and achieve the following:
1. My maste page holds the asp.menu bound to sitemap. After creating the page holding the radscheduler which will the first page which some users see, I found that the menu items are not shown to top of the radscheduler. <Attached the image file: OnTopOfAspMenu.jpg>
2. Related to resources in timeline view - will be showing only that view:
2.1. any way to align the resources to left which is vertically shown. <image file:ResourceAndRowAlignment.jpg>
2.2. want to highlight first one or two resources (based on a business logic). how to achieve it?
2.3. is there a way to show day commonly as a row on top of am and pm row or any work around to achieve it (may group by resources horizontally or something like that?), this will be needed if i need to show user 2 weeks slots. then while my current setting to show the date and weekday looks a bit difficult for the eyes. <image file:2WeeksSlotsView.jpg>
2.4. currently timeline view is showing an appt as one line for the resource and row is having some space after that which looks quite odd. Is there any way to achieve auto adjustment of row height 
 - first will be based on resource lenght and wrapping if no appts
 - if any appts then just resource and then appt
<image:AutoRowHeight.jpg>

Thanks in advance
Suja
Peter
Telerik team
 answered on 26 Jan 2011
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?