Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
94 views

I have a form, on it I have two sets of Radio Button Lists, each set has AutoPostBack set to true and an event on OnSelectedIndexChanged.  The goal is to have the grid show different sets of data depending on what the user selects from the Radio Buttons.  The first RBL is either forms entered by the user or all, the second is all, complete or incomplete forms.  By default, I have set the RBL's to have "My" selected and "Incomplete".  When a user changes an RBL, the grid is refreshed with appropriate data, however if the user re-selects back to the default item, no postback happens.  If I remove the AjaxManager from the page, it works, but the whole page refreshes, not just the grid.  How can I make it work with the AjaxManager so no matter what is checked, the grid refreshes it's data.

Here is the AjaxManager code I have:

<telerik:RadAjaxManager runat="server" ID="radAjaxManager" EnableAJAX="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radSafetyForms">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblScope">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rblComplete">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="radSafetyForms" LoadingPanelID="radLpSafetyForms" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

I'm not sure if I have the AjaxManager configured correctly or not. 

 

 

Maria Ilieva
Telerik team
 answered on 25 Nov 2015
1 answer
116 views

Hi,

 I have a RadTreeList each node has a sort order that comes from the database, that is relative to the parent. (Sort order is part of the object the RadTreeList is bound to).  How can I sort the RadTreeList using this sort order? Simply using an 'ORDER BY' clause on the Database query doesn't work because the sort order isn't universal for the tree it's only relative to it's parent. I want to sort the children of each individual node. 

 I saw these help article relating to the RadTreeView:

http://www.telerik.com/forums/how-to-sort-child-nodes-of-a-node

&

http://www.telerik.com/support/kb/aspnet-ajax/details/sorting-treenodes

 Does it work similarly for the RadTreeList - can I write a compare class that compares the sort order of the two given TreeListDataItems and it will work? (Hasn't so far for me, but I could be missing something). Is there any way to implement this simply by manipulating the entries for the ParentDataKeyNames/DataKeyNames or adding multiple entries? I tried making the DataKeyNames Sort Order, but that fails to bind.

I basically just want to use the Sort Order to sort all child nodes of each particular node, instead of just sorting by DataKeyName (AttributeId in this case). 

Thanks much,

Craig

 If it helps here is the RadTreeList in question.

<telerik:RadTreeList ID="rtlCopsAttributes" runat="server" OnNeedDataSource="rtlCopsAttributes_NeedDataSource" AutoGenerateColumns="false"
    ParentDataKeyNames="ParentId" DataKeyNames="AttributeId" AllowMultiItemSelection="true" AllowPaging="false" AllowSorting="false"
    OnItemDataBound="rtlCopsAttributes_ItemDataBound" Height="800px" Width="500px" AllowRecursiveSelection="true" AllowRecursiveDelete="true">
<Columns>
    <telerik:TreeListBoundColumn DataField="AttributeId" UniqueName="AttributeId" HeaderText="Id" Display="false" />
    <telerik:TreeListBoundColumn DataField="SortOrder" UniqueName="SortOrder" HeaderText="Sort Order" Display="false" />
    <telerik:TreeListBoundColumn DataField="Description" UniqueName="Description" HeaderText="Description" Display="false" />
    <telerik:TreeListBoundColumn DataField="ParentName" UniqueName="ParentName" HeaderText="Parent Name" Display="false" />
    <telerik:TreeListCheckBoxColumn DataField="HasChildren" UniqueName="HasChildren" HeaderText="Has Children" Display="false" />
    <telerik:TreeListCheckBoxColumn DataField="IsRequired" UniqueName="IsRequired" HeaderText="Is Required" Display="false"/>                                                                        
    <telerik:TreeListBoundColumn DataField="ParentId" UniqueName="ParentId" HeaderText="Parent Id" Display="false" />
    <telerik:TreeListBoundColumn DataField="Name" UniqueName="AttributeName" HeaderText="Name" />
    <telerik:TreeListCheckBoxColumn DataField="IsDefault" UniqueName="IsDefault" HeaderText="Default" HeaderStyle-Width="50px" ItemStyle-Width="50px" />
    <telerik:TreeListTemplateColumn HeaderText="Include" HeaderStyle-Width="50px" ItemStyle-Width="50px">
        <ItemTemplate>
            <asp:CheckBox ID="cboxExplicitInclude" runat="server" AutoPostBack="true" OnCheckedChanged="cboxExplicitInclude_CheckedChanged" />
         </ItemTemplate>
    </telerik:TreeListTemplateColumn>
    <telerik:TreeListTemplateColumn HeaderText="Exclude" HeaderStyle-Width="50px" ItemStyle-Width="50px">
        <ItemTemplate>
            <asp:CheckBox ID="cboxExplicitExclude" runat="server" AutoPostBack="true" OnCheckedChanged="cboxExplicitExclude_CheckedChanged" />
         </ItemTemplate>
    </telerik:TreeListTemplateColumn>
</Columns>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="520px" />
    </ClientSettings>
</telerik:RadTreeList>

 

Viktor Tachev
Telerik team
 answered on 25 Nov 2015
1 answer
615 views

I've RadGrid where I want to add a column dynamically so I've done something like this in page load

               GridTemplateColumn gtc = new GridTemplateColumn();
                gtc.DataField = "chqNumber";
                gtc.HeaderText = "Cheque Number";
                gtc.UniqueName = "chqNumber";
                RadGrid1.MasterTableView.Columns.Add(gtc);        

It work fine, now I want to add textbox in this column as the user click "+add new record" on grid here is my code of itemCreated event 

                            GridEditableItem gdit = (GridEditableItem)e.Item;
                            RadTextBox txtBox = new RadTextBox();
                            txtBox.ID = "someIDWhatEver";

                            gdit["chqNumber"].Controls.Add(txtBox);

but this textbox gets added to another new column what I mean is this textbox does not added to same chqNumber column you can view my attached image which will illustrate better

as you can see my dynamic column gets added at the last even after insert and cancel button and dynamic textbox doesn't gets in this column please avoid my english grammatical mistakes :P

 

Eyup
Telerik team
 answered on 25 Nov 2015
4 answers
221 views

As part our product development, we have created a RADCOMBO skin. When we apply this skin to the telerik combobox, it’s not showing down arrow as expected on IE. (See the picture attached) But the same works on Chrome / FireFox.

As part of troubleshooting, we isolated this skin to a clear vanilla ASP.NET web project & test page which has only telerik combobox having this skin applied and checked. It works..! But when we apply same skin inside our project, arrow is not showing on the IE . For further troubleshooting inside our project,  we copied the test page that has only Radcombo applied with this skin, but no luck. We have used the same CSS in the isolation project that is in our main project, still doesn't show in our project in IE. Any explanation or guesses at what's happening?

Here is the code

WebForm:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Telerik_Test.WebForm1" %>
 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
     
    <link rel="stylesheet" type="text/css" href="/Branding2015/CSS/Telerik_Skins/ComboBox.evalueBC.css" />
    
 
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
             
                <telerik:RadComboBox ID="rcboStatReportTypes" runat="server" Width="250" MaxHeight="300" AutoPostBack="true" Skin="evalueBC" EnableEmbeddedSkins="false" />
             
        </div>
    </form>
</body>
</html>

 

CSS:

 

.RadComboBox_evalueBC
{
    color:#000;font-size:12px;font-family:"Segoe UI",Arial,Helvetica,sans-serif
 
}
.RadComboBox_evalueBC .rcbInputCell,.RadComboBox_evalueBC .rcbArrowCell{
    height:20px;border-width:1px;border-style:solid
 
}
.RadComboBox_evalueBC table td.rcbInputCell,.RadComboBox_evalueBC table td.rcbArrowCell{border-width:1px}
.RadComboBox_evalueBC .rcbInputCell{border-color:#e5e5e5;color:#000;background-color:#fff}
.RadComboBox_evalueBC table td.rcbInputCellLeft{border-right-width:0}
.RadComboBox_evalueBC table td.rcbInputCellRight{border-left-width:0}
.RadComboBox_evalueBC .rcbInput{height:17px;color:#000;font-size:12px;font-family:"Segoe UI",Arial,Helvetica,sans-serif;line-height:16px}
.RadComboBox_evalueBC .rcbEmptyMessage{color:#bbb}.RadComboBox_evalueBC .rcbArrowCell{border-color:#e5e5e5;color:#000;background-color:#f9f9f9}                                                 
.RadComboBox_evalueBC .rcbArrowCell a{width:16px;height:20px;background-image:url('Common/radActionsSprite.png');background-position:-2px -20px;background-repeat:no-repeat}
.RadComboBox_evalueBC .rcbArrowCellHidden,.RadComboBox_evalueBC .rcbArrowCellHidden a{width:0}.RadComboBox_evalueBC .rcbArrowCellHidden.rcbArrowCellLeft{border-right-width:0}
.RadComboBox_evalueBC .rcbArrowCellHidden.rcbArrowCellRight{border-left-width:0}
                                                                                               
.RadComboBox_evalueBC .rcbReadOnly .rcbArrowCellLeft{border-right-width:0}                                                                                            
.RadComboBox_evalueBC .rcbReadOnly .rcbArrowCellRight{border-left-width:0}
.RadComboBox_evalueBC .rcbHovered .rcbInputCell{border-color:#e5e5e5;color:#000;background-color:#fff}
.RadComboBox_evalueBC .rcbHovered .rcbInput{color:#000}
.RadComboBox_evalueBC .rcbHovered .rcbArrowCell{border-color:#e5e5e5;color:#000;background-color:#e5e5e5}
.RadComboBox_evalueBC .rcbHovered .rcbArrowCell a{background-position:-2px -20px}
.RadComboBox_evalueBC .rcbFocused .rcbInputCell{border-color:#25a0da;color:#000;background-color:#fff}
.RadComboBox_evalueBC .rcbFocused .rcbInput{color:#000}
.RadComboBox_evalueBC .rcbFocused .rcbArrowCell{border-color:#25a0da;color:#fff;background-color:#25a0da}
.RadComboBox_evalueBC .rcbFocused .rcbArrowCell a{background-position:-42px -20px}
.RadComboBox_evalueBC .rcbReadOnly .rcbInputCell{border-color:#e5e5e5;background-color:#f9f9f9;color:#000}
.RadComboBox_evalueBC .rcbReadOnly .rcbInput{color:#000}
.RadComboBox_evalueBC .rcbHovered .rcbReadOnly .rcbInputCell{border-color:#e5e5e5;color:#000;background-color:#e5e5e5}
.RadComboBox_evalueBC .rcbHovered .rcbReadOnly .rcbInput{color:#000}
.RadComboBox_evalueBC .rcbFocused .rcbReadOnly .rcbInputCell{border-color:#25a0da;color:#fff;background-color:#25a0da}
.RadComboBox_evalueBC .rcbFocused .rcbReadOnly .rcbInput{color:#fff}
.RadComboBoxDropDown_evalueBC{border-color:#cdcdcd;color:#000;background-color:#fff;font-size:12px;font-family:"Segoe UI",Arial,Helvetica,sans-serif}
.RadComboBoxDropDown_evalueBC .rcbHeader,.RadComboBoxDropDown_evalueBC .rcbFooter{color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbHeader{border-bottom-color:#e5e5e5}.RadComboBoxDropDown_evalueBC .rcbFooter{border-top-color:#e5e5e5}
.RadComboBoxDropDown_evalueBC .rcbHovered{color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbSelected{color:#fff;background-color:#25a0da}
.RadComboBoxDropDown_evalueBC .rcbLoading{color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbItem em{color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbCheckAllItems{border-color:#e5e5e5;color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbMoreResults{border-color:#e5e5e5;color:#000;background-color:#e8e8e8}
.RadComboBoxDropDown_evalueBC .rcbSeparator{color:#fff;background:#e8e8e8}
 
 div.RadComboBox_evalueBC .rcbInputCell {
 
    background-color: rgb(234, 234, 234);
 
}
 
 div.RadComboBox_evalueBC .rcbArrowCell {
 
    background-image: none;
 
    background-color: rgb(237, 237, 237);
 
    background-repeat: no-repeat;
 
}
 
 div.RadComboBox_evalueBC .rcbFocused .rcbInputCell {
 
    border-color: rgb(7, 129, 154);
 
    background-color: rgb(7, 129, 154);
 
}
 
 div.RadComboBox_evalueBC .rcbFocused .rcbInput {
 
    color: rgb(255, 255, 255);
 
}
 
 div.RadComboBox_evalueBC .rcbFocused .rcbArrowCell {
 
    background-color: rgb(7, 129, 154);
 
}

Thanks much,

Craig

Nencho
Telerik team
 answered on 25 Nov 2015
1 answer
83 views

Hi,

I'd like to change the mouse cursor when doing drag and drop on the org chart - there are three states that I use with other controls on my page: hover, drag/nodrag, drop. I can't see any event to hook into though to control the cursor, is such a thing available?

 

Plamen
Telerik team
 answered on 25 Nov 2015
1 answer
130 views

Hello,

 

I am with problem to configuration of resx files to the RadNotification. In addition to creating the resx file, some other configuration is necessary?

Marin Bratanov
Telerik team
 answered on 25 Nov 2015
7 answers
270 views

I am having an issue trying to make a RadGrid responsive using CSS.  When the browser width is wide, the 6 columns are all visible.  When the user shrinks the browser width, at a certain point two of the columns disappear as they should -- but at the same time a new column shows up that doesn't even have a header visible.  It's very strange.  Any help would be most appreciated. The basic grid is defined in the .aspx as:

<telerik:RadGrid ID="RadGrid1" runat="server" Width="99.7%" AutoGenerateColumns="false" AllowPaging="false" OnItemDataBound="RadGrid1_ItemDataBound"></telerik:RadGrid>

The columns to the grid are defined in the code behind as:

 

GridHyperLinkColumn hypercolumn = null;
GridBoundColumn boundcolumn = null;
RadGrid1.EnableViewState = false;
InitGrid(ref RadGrid1);
RadGrid1.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
RadGrid1.MasterTableView.DataKeyNames = new string[] { "FAQ" };
 
string templateColumnName = "Edit";
GridTemplateColumn templateColumn = new GridTemplateColumn();
templateColumn.ItemTemplate = new MyTemplate(templateColumnName);
templateColumn.AllowFiltering = false;
templateColumn.HeaderText = "Edit";
RadGrid1.MasterTableView.Columns.Add(templateColumn);
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQPublic";
boundcolumn.DataField = "FAQPublic";
boundcolumn.HeaderText = "Public?";
boundcolumn.HeaderStyle.CssClass = "mediumgridcol";
boundcolumn.ItemStyle.CssClass = "mediumgridcol";
boundcolumn.AllowFiltering = false;
boundcolumn.Visible = true;
boundcolumn = null;
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQIntranet";
boundcolumn.DataField = "FAQIntranet";
boundcolumn.HeaderText = "Intranet?";
boundcolumn.HeaderStyle.CssClass = "mediumgridcol";
boundcolumn.ItemStyle.CssClass = "mediumgridcol";
boundcolumn.AllowFiltering = false;
boundcolumn.Visible = true;
boundcolumn = null;
 
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQTopic";
boundcolumn.DataField = "FAQTopic";
boundcolumn.FilterControlWidth = Unit.Pixel(50);
boundcolumn.HeaderText = "Topic";
boundcolumn.Visible = true;
boundcolumn = null;
 
boundcolumn = new GridBoundColumn();
this.RadGrid1.Columns.Add(boundcolumn);
boundcolumn.UniqueName = "FAQQuestion";
boundcolumn.DataField = "FAQQuestion";
boundcolumn.HeaderText = "Question";
boundcolumn.FilterControlWidth = Unit.Pixel(50);
boundcolumn.Visible = true;
boundcolumn = null;
 
templateColumnName = "Delete";
templateColumn = new GridTemplateColumn();
templateColumn.ItemTemplate = new MyTemplate2(templateColumnName);
templateColumn.AllowFiltering = false;
templateColumn.HeaderText = "Delete";
RadGrid1.MasterTableView.Columns.Add(templateColumn);

 

I have attached two (2) screen captures -- the first when it is wide, the second after the user shrinks the window.  Any assistance would be most appreciated.  I am running on Windows 10, this project is in Visual Studio 2013.

Thanks in advance.

 

Kostadin
Telerik team
 answered on 25 Nov 2015
3 answers
108 views
As the calendar to mark the necessary number as selected?
 
 
Viktor Tachev
Telerik team
 answered on 25 Nov 2015
1 answer
529 views

Hi Team,

I am having the radListView. I want to export the data to excel from the Listview.

 Please help how to do this.

 

I am having the List View in the grid format. Now I want export like how we are doing this from the RadGrid.

rgTaskHistory.ExportSettings.IgnorePaging = true;
rgTaskHistory.ExportSettings.ExportOnlyData = true;
rgTaskHistory.MasterTableView.ExportToExcel();

 http://demos.telerik.com/aspnet-ajax/listview/examples/appearancestyling/predefinedlayouts/defaultcs.aspx

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
1 answer
299 views

When the user empties a value a numeric text box, the grid doesn't save changes and the changed field stays with a red dot in the corner.

In this scenario I would like the row to be saved with a null value for the numeric field. Is that possible?

 

<telerik:RadGrid
            ID="RadGrid1"
            runat="server"
            AutoGenerateColumns="False"
            CssClass="grid"
            GroupPanelPosition="Top" Skin="Silk"
            AllowFilteringByColumn="True" AlternatingItemStyle-Wrap="False" AlternatingItemStyle-BackColor="#B8B1B4" ItemStyle-Wrap="false"
            AllowSorting="True" Height="650px" Width="100%" AllowPaging="True" PageSize="2000" AutoGenerateDeleteColumn="True" DataSourceID="LinqYonisLogs" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" OnBatchEditCommand="RadGrid1_BatchEditCommand">

<AlternatingItemStyle Wrap="False" BackColor="#B8B1B4"></AlternatingItemStyle>

        <MasterTableView DataSourceID="LinqYonisLogs" CommandItemDisplay="TopAndBottom" DataKeyNames="CustomerCode, MQS_Code" EditMode="Batch">
            <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
            <Columns>
                <telerik:GridBoundColumn DataField="CustomerCode" ReadOnly="true" FilterControlAltText="Filter CustomerCode column" HeaderText="Customer Code" SortExpression="CustomerCode" UniqueName="CustomerCode">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MQS_Code" ReadOnly="true" FilterControlWidth="55px" FilterControlAltText="Filter MQS_Code column" HeaderText="MQS Code" SortExpression="MQS_Code" UniqueName="MQS_Code">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="QuotedPrice" DataType="System.Decimal" FilterControlAltText="Filter QuotedPrice column" HeaderText="Quoted Price" SortExpression="QuotedPrice" UniqueName="QuotedPrice">
                    <EditItemTemplate>
                        <telerik:RadNumericTextBox ID="rdteQuotedPrice" runat="server" DbValue='<%# Eval("QuotedPrice") %>'>
                            <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="false" />
                        </telerik:RadNumericTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="QuotedPriceLabel" runat="server" Text='<%# Eval("QuotedPrice") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn DataField="Action" FilterControlAltText="Filter Action column" HeaderText="Action" SortExpression="Action" UniqueName="Action">
                </telerik:GridBoundColumn>

            </Columns>

<PagerStyle AlwaysVisible="True"></PagerStyle>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="True" AllowKeyboardNavigation="True">
            <KeyboardNavigationSettings AllowActiveRowCycle="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false" />
            <Resizing AllowColumnResize="True" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>

<ItemStyle Wrap="False"></ItemStyle>

        <PagerStyle AlwaysVisible="True" />
        </telerik:RadGrid>

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
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?