Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
1.0K+ views
Hey folks, this is a unpaid endorsement of the "Control Panel" by Telerik.  I am a "ultimate" collection subscriber and have been historically displeased with the apparent need to uninstall / reinstall everything every quarter.

As you might have noticed the coding wonders here released a new quarters worth of updates.  This time (unless I failed to notice it before) they also released the "Control Panel".  I would recommend using it!  It installed and with a few clicks it realized what I had, what I did not not have and what I needed.  It clicked on which products I wished and let it do its magic.  It uninstalled and re-installed as required without human intervention.

Kudo's to whomever thought of this utility.  He/they deserve a pay raise.  This is the icing on your already sweet collection of "toys".
Teodor
Top achievements
Rank 1
 answered on 06 Dec 2012
2 answers
74 views
Hi,

We want to implement custom filter "Contains" for template column (numeric). If we apply a filter on this column it is working fine. If we apply any other filter followed by custom filter then the previous filter is not getting cleared. Filter expressions are keep on appending for the same column.

Eg. Say we have column C1 which is template column and contains numeric data. We want to implement "contains" filter option on this column as custom filter.
If we apply "EqulaTo" filter first on this column C1, it works. Now if we apply "Contains" filter (custom) on this column C1, it should reset the previous filter and should apply new filter i.e. "Contains". But filter expressions keep on appending for this column and thus we don't get any result set. Following is the sample code snippet for the same implementation. We have included this in grid_ItemCommand event.

Please guide us ASAP.
Pair filterPair = (Pair)e.CommandArgument;
                if (filterPair.First.ToString() == "Custom")
                {
                    string colName = filterPair.Second.ToString();
                    TextBox tbPattern = (e.Item as GridFilteringItem)[colName].Controls[0] as TextBox;
 
                    grid1.MasterTableView.GetColumn(colName).CurrentFilterFunction = GridKnownFunction.NoFilter;
 
                    e.Canceled = true;
                                        string newFilter = @"it[" + colName + "].ToString().Contains(" + tbPattern.Text + ")";
                    
 
                    if (grid1.MasterTableView.FilterExpression == "")
                    {
                        grid1.MasterTableView.FilterExpression = newFilter;
                    }
                    else
                    {
                       grid1.MasterTableView.FilterExpression = "((" + grid1.MasterTableView.FilterExpression + ") AND (" + newFilter + "))";
                    }
                    grid1.Rebind();
 
                }
Maria Ilieva
Telerik team
 answered on 06 Dec 2012
1 answer
88 views
Hi,
I am using the "RadControls for ASP.NET AJAX Q3 2012" in Sharepoint 2010.
I have added the Rad Grid and also added the ajax. However, when i click "add new item" or edit items in the grid, the grid is doing a postback. I have added the below code:

<div>       
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
  
    <telerik:RadGrid ID="RadGrid1" runat="server" 
        ShowFooter="True" onitemcommand="RadGrid1_ItemCommand" 
        ondeletecommand="RadGrid1_DeleteCommand" 
        oninsertcommand="RadGrid1_InsertCommand" 
        onupdatecommand="RadGrid1_UpdateCommand" >
    <MasterTableView DataKeyNames="Title" AutoGenerateColumns="false" EditMode="InPlace" CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Item" >
                    <Columns>
                     <telerik:GridEditCommandColumn ButtonType="ImageButton">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                            ConfirmDialogWidth="220px">
                        </telerik:GridButtonColumn>
  
                     <telerik:GridTemplateColumn DataField="Title" HeaderText="Product Number" UniqueName="ProductNumber"
                            Visible="true">
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Bind("Title") %>' >
                                </telerik:RadTextBox>
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("Title") %>' >
                                </telerik:RadTextBox>
                            </EditItemTemplate>    
                            <ItemTemplate>
                            <telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text='<%# Eval("Title") %>' />
                            </ItemTemplate>                       
                        </telerik:GridTemplateColumn>                     
                          
    </Columns>
    </MasterTableView>
     <ClientSettings EnableRowHoverStyle="true">
        </ClientSettings>
  
    </telerik:RadGrid>
</div>


How to fix this?
Thanks
Marin
Telerik team
 answered on 06 Dec 2012
1 answer
72 views
Hi,

I've used a part of the code from the RSSFeed Live demo in my own web user control.
When the RSS source isn't available the RSS reader fails.

How can I handle errors in loading the RSS feed so it won't make the application crash, and also, how can I set the text for the prev and next buttons from code behind?

Thanks.

/Thomas

<telerik:RadListView ID="RadListView1" runat="server" OnNeedDataSource="RadListView1_NeedDataSource"
    AllowPaging="true" ItemPlaceholderID="Panel1" PageSize="3">
    <LayoutTemplate>
        <div class="layoutWrapper">
            <div class="rssHeaderWrapper" title="Copyright, 2011 Honda Motor Co., Ltd. and its subsidiaries and affiliates. All Rights Reserved.">
                <div class="rssSubHeader">
                    honda world news
                </div>
                <div class="rssHeader">
                    rss <span class="rssHeadingDate">
                        <%# DateTime.Now.ToLongDateString().ToLower() %></span>
                </div>
            </div>
            <br />
            <asp:Panel ID="Panel1" runat="server">
            </asp:Panel>
            <div style="width: 100%; text-align: center;">
                <asp:ImageButton ID="PrevBtn" runat="server" CommandName="Page" CommandArgument="Prev"
                    AlternateText="<" CssClass="rssButtons" ImageUrl="images/iconPrev.png" />
                <asp:ImageButton ID="RefreshBtn" runat="server" CommandName="Rebind" AlternateText="Refresh"
                    CssClass="rssButtons" ImageUrl="images/iconRefresh.png" />
                <asp:ImageButton ID="NextBtn" runat="server" CommandName="Page" CommandArgument="Next"
                    AlternateText=">" CssClass="rssButtons" ImageUrl="images/iconNext.png" />
            </div>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <table class="rssTable" title='Item <%# (Container as RadListViewDataItem).DataItemIndex %>, Page <%# RadListView1.CurrentPageIndex + 1 %>'
            style="vertical-align: top;">
            <tr>
                <td>
                      
                </td>
                <td colspan="2">
                    <div class="rssTitle">
                        <img src="images/iconRSS.png" alt="rss" />
                        <a href='<%# (Container.DataItem as XmlNode)["link"].InnerText %>' class="qsfSubtitle">
                            <%# (Container.DataItem as XmlNode)["title"].InnerText %>
                        </a>
                    </div>
                    <div class="rssDate">
                        <%# (Container.DataItem as XmlNode)["pubDate"].InnerText %>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                      
                </td>
                <td>
                    <img style="border: solid 1px #999" src='<%# (Container.DataItem as XmlNode)["hww:photo"].InnerText %>'
                        alt='<%# (Container.DataItem as XmlNode)["title"].InnerText %>' />
                </td>
                <td>
                    <img src='<%# (Container.DataItem as XmlNode)["hww:flag"].InnerText %>' alt='<%# (Container.DataItem as XmlNode)["hww:flag"].InnerText %>' />
                    <span class="rssDescription">
                        <%# (Container.DataItem as XmlNode)["description"].InnerText %></span>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadListView>
Vasil
Telerik team
 answered on 06 Dec 2012
1 answer
108 views
Hi,

I got a hierachy nested grid with a parent row, which have two nested expaned rows. During testing, I loaded 50 records to be binded to the parent row. I see that it binded all 50 parent records first. Afterwards, it starts calling the selecting method to get each of the 50 child records to bind the nested row. I have a following code and checekd the ObjectDataSourceSelectingEventArgs parameter but could not find a record index field on which parent record it is seeking to retrieve the record for binding to the grid. I noticed that for the nested row or the inner record, it calls the selecting and then it call the GetData(string sortColumns, int startRecord, int maxRecords) method for each of the 50 parent record.

Also, how can I pass around in the markup page, the UID that is the primary - foreign table key as the datakeynames. When the child record is called on the selecting method, maybe I can get the datakeyname value to do the fetch.

 

 

protected void Response_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)

 

{

 

 

int test = 0;

 

}

Why am I asking this question> ? The grid is loading for the first time, I need to know which child record is being requested for binding under the parent row. When I get the index, I will do another fetch from the IQueryable object to return a list object.

Any help is appreciated...

Antonio Stoilkov
Telerik team
 answered on 06 Dec 2012
3 answers
140 views
Where have the skin demos gone?  Using your online Quick Start demos, I don't see any skins under Appearance any more and some don't even have the Appearance section.  I used this almost daily to help choose a skin.  Any idea when it'll be back or can I find this resource somewhere else?
Ivan Zhekov
Telerik team
 answered on 06 Dec 2012
1 answer
43 views
How to make the last item in combobox selected which is binded with sqldatasource?
Shinu
Top achievements
Rank 2
 answered on 06 Dec 2012
3 answers
87 views
I have a problem when trying to localize some elements of editor in its webpart version. For some reason in the editor which replaces content editor, localization behaves as expected, but in the editor which is in the webpart (default telerik rad editor for sharepoint webpart), there are still english labels in the table wizard dropdown and Strip Css Formatting dropdown, while other things in the same editor are translated correctly. Please see attached images.

Regards

 Adam

Edit :

In addition I would like to mention that I have followed the telerik's official localization procedure via resource files, described in the help file.
Rumen
Telerik team
 answered on 06 Dec 2012
3 answers
121 views
I have a RadGrid with a popup editor to add new records and edit existing ones using the default settings.  This has 2 links, "Insert" and "Cancel"  (or "Update" and "Cancel").

I have been told that non-technical users may find the term "Insert" confusing and I would like to change the word "Insert" to a different word such as "Create".  Can this be done?

Also, can the position of the links be changed so they are aligned to the right of the popup instead of the left?

Thanks, Richard Jonas
Richard
Top achievements
Rank 1
 answered on 06 Dec 2012
1 answer
138 views
Hi 

I am trying to using the telerik library to do a http request to my web api which return a JSON.

I am not having any result neither and error.

This my code could somebody help me to see what I am missing.

Thank you in advance

    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
           <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
         </Scripts>
        </telerik:RadScriptManager>

   function GetApiRequest() {
                    alert(' Beging GetApiRequest');//TEST
                    var jsonResponse = null;
                    $telerik.$.ajax({
                        type: "GET", // HTTP method
                        url: 'http://localhost:3537/api/ipfiltervalues/1?displayFieldID=2', // URL
                        contentType: "application/json; charset=utf-8", //request the result to be in JSON
                        dataType: "json",
                        success: function (result) { //callback method to invoke when the request is complete
                            alert(result);
                            jsonResponse = result;
                        },
                        Error: function (x, y, z) {
                            alert(x + '\n' + u + '\n' + z);
                        }
                    });

                    alert('End GetApiRequest' + jsonResponse);//TEST
                }
Maria Ilieva
Telerik team
 answered on 06 Dec 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?