Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views

I am getting small arrows in  the radtreeview . Every Node has a small arrow like ">" before it  . I am not sure its a bug in the control or whether its a setting . Please help to get rid of this arrow.

+ > Mainnode .

     > Subnode one .

     > Subnode two.

I have tried to recreate the  issue.

Bala
Top achievements
Rank 1
 answered on 17 Feb 2015
6 answers
186 views
Hi

How to Implemented Filter and Sorting Radgrid using Datatable in C# Code for example my field this

ex:Name,Empno,Amout,Dob Fields

any one guide me how will do this?

Thanks
for supports to all
Pavlina
Telerik team
 answered on 16 Feb 2015
2 answers
110 views
I'm trying to resize a splitter using the HeightOffset="60" property. It works perfect until I add a RadAjaxManager to the page. After that the splitter no longer takes up the full screen like i want it too. This is a simple example just to demo my issue. Obviously i need to keep the radajaxmanager otherwise i would just remove it. Thanks. Any help would be great!!!

Notice in the code below it does not size correctly, but if i remove  the radajaxmanager block it works perfect.
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LatePanel"  LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
 
<!DOCTYPE html>
 
<script runat="server">
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("EmployeeID");
        dt.Columns.Add("LastName");
        dt.Columns.Add("FirstName");
        dt.Columns.Add("Title");
        dt.Columns.Add("ReportsTo");
        dt.Rows.Add(new object[] { 1, "Davalio", "Nancy", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 2, "Fuller", "Andrew", "Vice President, Sales", null });
        dt.Rows.Add(new object[] { 3, "Leverling", "Janet", "Sales Representative", 2 });
        dt.Rows.Add(new object[] { 4, "Peacock", "Margaret", "Sales Representative", 2 });
        (sender as RadGrid).DataSource = dt;
    }
</script>
 
<head runat="server">
    <title></title>
    <style>
        html,
        body,
        form {
            height: 100%;
            width: 100%;
            margin: 0px;
            padding: 0px;
        }
 
        .header {
            width: 100%;
            height: 20px;
            background: blue;
            color: white;
        }
 
        .menu {
            width: 100%;
            height: 20px;
            background: black;
            color: white;
        }
 
        .footer {
            height: 20px;
            width: 100%;
            background: blue;
            color: white;
            position: absolute;
            bottom: 0;
        }
    </style>
 
 
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">
        </telerik:RadScriptManager>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="LatePanel"  LoadingPanelID="RadAjaxLoadingPanel1"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <div class="header">Header</div>
 
        <div class="menu">Menu</div>
 
      <asp:Panel ID="LatePanel" runat="server" Height="100%" Width="100%" >
      <telerik:RadSplitter runat="server" id="InnerSplitter" Orientation="Vertical" VisibleDuringInit="false" Width="100%" Height="100%" HeightOffset="60">
 
              <telerik:RadPane ID="LeftMenuPane" runat="server" Scrolling="None" BackColor="SteelBlue" Width="27%"  >
                    right           
              </telerik:RadPane>
 
              <telerik:RadSplitBar runat="server" id="RadSplitBar4" />
         
              <telerik:RadPane ID="RightMenuPane" runat="server" Scrolling="None" BackColor="Tomato" >      
                           <%-- >>RADGRID--%>
                        <telerik:RadGrid ID="RadGrid1" Height="100%" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
                            AllowSorting="true">
                        <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                        </ClientSettings>
                            <MasterTableView Width="100%" TableLayout="Fixed" AutoGenerateColumns="false">
                                <Columns>
                                    <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ReportsTo" HeaderText="ReportsTo"></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                        <%-- <<RADGRID--%>
              </telerik:RadPane>
 
      </telerik:RadSplitter>
    </asp:Panel>
 
        <div class="footer">Footer</div>
 
    </form>
</body>
</html>

Vessy
Telerik team
 answered on 16 Feb 2015
1 answer
74 views
I know that the Express editions of the Visual IDEs don't support third-party extensions (but the controls can be manually added using the zip distribution) and I'm guessing this includes registering the "Creation and Configuration Wizard" but is there any documentation on how to replicate the wizard features manually?  I've found the "web.config Settings Overview", which seems to cover some of it but the wizard seems to provide a lot more functionality.

Cheers
Marin Bratanov
Telerik team
 answered on 16 Feb 2015
2 answers
477 views
Hi,

We have a RadGrid with the following configuration:

<telerik:RadGrid ID="Grid" runat="server"
       AutoGenerateColumns="false"
       Skin="Simple"
       AllowSorting="true"
       AllowFilteringByColumn="true"
       EnableHeaderContextMenu="true"
       EnableHeaderContextFilterMenu="true"
       OnNeedDataSource="Grid_NeedDataSource"
       OnItemDataBound="Grid_ItemDataBound"
       ViewStateMode="Disabled"
       AllowPaging="true" PageSize="500" AllowCustomPaging="true">

It has batch editing enabled, too.

It has about 30 columns, 20 of them are GridTemplateColumn with RadComboBox. When we have more than 100 rows, page load is very slow, and customer doesn't want us to have pagination.

Is there any way so we can speed up page load? It's a mandatory requirement for us.

Thanks in advance,

Alfonso
Pavlina
Telerik team
 answered on 16 Feb 2015
1 answer
137 views
We have been using the ReorderList for several years without any issue. No we are having clients say that it is not working in "OX Yosemite with Safari 8.0.3". They can drag the fields fine but when it is saved they revert to the initial order. Firefox on the OX Yosemite seems to work just fine. How do we get this fixed?
Dimitar
Telerik team
 answered on 16 Feb 2015
6 answers
135 views
Hi Team,

Please advise me how to use more than one (User) dictionary?

Thanks
Marin Bratanov
Telerik team
 answered on 16 Feb 2015
3 answers
197 views
I am wondering how I can color code individual cells based on data from a table in a RadPivotControl.  I do not want to color code the Totals rows or columns.  My row has the values Neonate, Infant, Child, and Adult.  My Columns are 2012, 2013, 2014.  The color code is based on a national average of mortality rates and can change from one year to the next.  So an expected value for a neonate in 2012 is between 1 and 2% while 2013 is 0.5-1.5%.  If my neonate mortality rate in 2012 is 2% then I am GREEN.  However if my mortality rate is 2% for 2013 then I am RED.  Please let me know the best method to accomplish this.

Owen
Eyup
Telerik team
 answered on 16 Feb 2015
3 answers
226 views
Hi Dears ,
im facing problem in RadNumericTextBox 
  problem is : RadNumericTextBox.Value or DbValue or Text is always null
  problems occours when i set the empty message in java script then try to get value of RadNumericTextBox  in Server side

Java Script Code :
rntbAutoBidValue.set_emptyMessage(Some Value );

then user insert values in  RadNumericTextBox
and what ever what user insert i always get null value
Server side Code :
rntbAutoBidValue.DbValue

i fix the probem in this Code 
on RadNumericTextBox  Control :
ClientEvents-OnValueChanged="Save"

Java Script Code
    // Solve problem in RadNumericTextBox
function Save(sender) {
var rntbAutoBidValue = $find("<%= rntbAutoBidValue.ClientID%>");
var Value = rntbAutoBidValue.get_value();
rntbAutoBidValue.set_emptyMessage(null);
}

if there flexible solution for this problem Kindly let me know
Regards ,,






Eyup
Telerik team
 answered on 16 Feb 2015
1 answer
147 views
I have had to make changes to my FormTemplate fields to keep it from getting an error.
I believe it is because I have changed the fields from using selectedvalue and checked
set to a BIND to using Eval expressions. After making these changes when in edit mode
any changes put into the template fields don't seem to be populating the GridEditableItem
which I believe is the reason for the saves not going to the database now. If I remove
everything under the EditSettings then the grid goes back to successfully saving the 
changes to the database. Below is both my markup and code behind. I can't hitting roadblock 
after roadblock. Any help would be much appreciated?

Markup code: 
<div class="WebpageManagementBox">
       
        <br /><br />
        <asp:Label ID="lblRolePrompt" Text="Select Role to associate web pages:" CssClass="box_Labels" runat="server"></asp:Label>
        <br />
        <telerik:RadDropDownList ID="ddlRoles" runat="server" CssClass="wepageManagementDropDown" Width="200px" DataTextField="role" DataValueField="ID" AutoPostBack="true" OnItemSelected="ddlRoles_ItemSelected"></telerik:RadDropDownList>
        <br />
        <br />
        <telerik:RadGrid ID="RadGridwebpagemanagement" CssClass="webpageManagementGrid" MasterTableView-DataKeyNames="ID" runat="server"
            AllowFilteringByColumn="True" AllowSorting="True"
            GroupPanelPosition="Top" 
            OnNeedDataSource="RadGridwebpagemanagement_NeedDataSource"
            OnUpdateCommand="RadGridwebpagemanagement_UpdateCommand" OnItemDataBound="RadGridwebpagemanagement_ItemDataBound" OnDeleteCommand="RadGridwebpagemanagement_DeleteCommand" OnInsertCommand="RadGridwebpagemanagement_InsertCommand">
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Webpage" 
                 InsertItemPageIndexAction="ShowItemOnCurrentPage">
 
                <columns>
                     
                    <telerik:GridBoundColumn DataField="webpage_name" HeaderText="Web Page" UniqueName="webpage_name" ItemStyle-Font-Names="Arial" ItemStyle-Font-Bold="true"
                                FilterControlWidth="200px">
                                <HeaderStyle Width="230px" Font-Names="Arial" />
                                <ItemStyle Width="230px" />
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridCheckBoxColumn DataField="add_privledge" HeaderText="Allow Adds" UniqueName="add_privledge"
                                FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                    </telerik:GridCheckBoxColumn>
                     
                    <telerik:GridCheckBoxColumn DataField="edit_privledge" HeaderText="Allow Edits" UniqueName="edit_privledge"
                                FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                   </telerik:GridCheckBoxColumn>
 
                     <telerik:GridCheckBoxColumn DataField="delete_privledge" HeaderText="Allow Deletes" UniqueName="delete_privledge"
                              FilterControlWidth="120px">               
                                <HeaderStyle Width="120px" Font-Names="Arial" />
                                <ItemStyle Width="120px" />
                    </telerik:GridCheckBoxColumn>                  
 
                   <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" CancelText="Cancel" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                   <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="LinkButton" Text="Delete" CommandName="Delete" ItemStyle-Width="50px" HeaderStyle-Width="50px" FilterControlWidth="50px" />
                     
                </columns>
                
                <EditFormSettings EditFormType="Template">
                <FormTemplate>   
                    
                   
                    <div id="divGridEdit" class="divGrid">
                            <b>Add New Role to Webpage Association</b>
                            <br /><br />
                            <table>
 
                                <tr>
                                    <td><asp:Label Text="Web Page:" runat="server"></asp:Label></td>
                                    <td>
                                         <asp:DropDownList ID="ddlWebPages" DataSourceID="sqlDataSourceWebpages" AppendDataBoundItems="True" DataTextField="webpage_name" DataValueField="ID"
                                               SelectedValue='<%# DataBinder.Eval(Container.DataItem,"security_webpage_id") == DBNull.Value ? "" : DataBinder.Eval(Container.DataItem,"security_webpage_id") %>'
                                                runat="server"> 
                                                <asp:ListItem Value=""></asp:ListItem>
                                         </asp:DropDownList>
 
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td><br /></td>
                                    <td></td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Add:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxAllowAdd" Checked='<%# DataBinder.Eval(Container.DataItem,"add_privledge") == DBNull.Value ? false : DataBinder.Eval(Container.DataItem,"add_privledge") %>' runat="server" /></td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Edit:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxAllowEdit" Checked='<%# DataBinder.Eval(Container.DataItem,"edit_privledge") == DBNull.Value ? false : DataBinder.Eval(Container.DataItem,"edit_privledge") %>' runat="server" /></td>
                                </tr>
                                <tr>
                                     <td><asp:Label Text="Allow Delete:" runat="server"></asp:Label></td>
                                     <td><asp:CheckBox ID="chkboxDelete" Checked='<%# DataBinder.Eval(Container.DataItem,"delete_privledge") == DBNull.Value ? false : DataBinder.Eval(Container.DataItem,"delete_privledge") %>' runat="server" /></td>
                                </tr>
 
                                <tr>
                                    <td><asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'  runat="server" /></td>
                                    <td><asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /></td>
                                </tr>
                            </table>
                        </div>            
 
                </FormTemplate>
            </EditFormSettings>
 
 
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
                
        </telerik:RadGrid>
 
 
    </div>
 
    <asp:SqlDataSource ID="sqlDataSourceWebpages" runat="server" SelectCommand="SELECT * FROM dbo.security_webpage" ConnectionString="<%$ ConnectionStrings:GATEConnectionString %>"></asp:SqlDataSource>
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />

Code Behind:

using GATE_Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Collections;
 
 
namespace FRC
{
    public partial class WebPageManagemet : System.Web.UI.Page
    {
 
        
        protected void Page_Load(object sender, EventArgs e)
        {
             
            
 
            if (!IsPostBack)
            {
                 
                GATEEntities dbContext = new GATEEntities();
             
                // Load Role Drop-down List
                var rolequery = from r in dbContext.Security_Role
                                select r;
 
                IEnumerable<Security_Role> roles = rolequery.ToList();
                ddlRoles.DataSource = roles;
                ddlRoles.DataBind();              
 
            }
            
        }
 
        protected void RadGridwebpagemanagement_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
           
 
            int? selectedroleid = Convert.ToInt32(ddlRoles.SelectedValue);
 
            // Use LINQ query to populate radGrid
            GATEEntities dbContext = new GATEEntities();
 
            var query = from srw in dbContext.Security_Role_To_Webpage
                        join sw in dbContext.Security_Webpage on srw.security_webpage_id equals sw.ID
                        where srw.security_role_id == selectedroleid
                        select new
                        {
                            srw.ID,
                            srw.security_webpage_id,
                            sw.webpage_name,
                            srw.add_privledge,
                            srw.edit_privledge,
                            srw.delete_privledge,
                            srw.view_privledge
                         
                        };
 
            //IEnumerable<Security_Role_To_Webpage> securitypages = query.ToList();
 
            RadGridwebpagemanagement.DataSource = query.ToList();
                      
 
        }
 
        protected void ddlRoles_ItemSelected(object sender, Telerik.Web.UI.DropDownListEventArgs e)
        {
            RadGridwebpagemanagement.Rebind();
        }
 
        
 
        protected void RadGridwebpagemanagement_ItemDataBound(object sender, GridItemEventArgs e)
        {
             
            if (e.Item.FindControl("ddlWebPages") != null )
            {
                GridEditableItem editedItem = e.Item as GridEditableItem;
                DropDownList _ddl = (DropDownList)e.Item.FindControl("ddlWebPages");
                if (_ddl != null)
                {
                    _ddl.DataSourceID = "";
                    _ddl.Items.Clear();
                    ListItem newitem = new ListItem("","");
                    _ddl.Items.Add(newitem);
                    _ddl.DataSource = this.sqlDataSourceWebpages;
                    _ddl.DataTextField = "webpage_name";
                    _ddl.DataValueField = "ID";
                    _ddl.DataBind();
                     
                }
            }
            
 
        }
 
        protected void RadGridwebpagemanagement_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            GATE_Entity.GATEEntities dbContext = new GATEEntities();
 
            var editableItem = ((GridEditableItem)e.Item);
            var lookupID = (int)editableItem.GetDataKeyValue("ID");
 
            // Retrieve Entity
            var webpagerecord = dbContext.Security_Role_To_Webpage.Where(n => n.ID == lookupID).FirstOrDefault();
 
            if (webpagerecord != null)
            {
                // set for deletion
                dbContext.Security_Role_To_Webpage.Remove(webpagerecord);
                 
                try
                {
 
                    // Save changes to db
                    dbContext.SaveChanges();
 
                }
                catch (System.Exception)
                {
 
                }
 
            }
 
        }
        private void DisplayMessage(string text)
        {
            RadGridwebpagemanagement.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
        }
        protected void RadGridwebpagemanagement_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
 
            GATEEntities dbContext = new GATEEntities();
 
            var editableItem = ((GridEditableItem)e.Item);
            var lookupID = (int)editableItem.GetDataKeyValue("ID");
 
             
            DropDownList ddlwebpage = (DropDownList)editableItem.FindControl("ddlWebPages");
            var selectedval = Convert.ToInt32(ddlwebpage.SelectedValue);
 
            // Check to make sure user didn't select webpage for this role that is already within the role
 
            var roleid = Convert.ToInt32(ddlRoles.SelectedValue);
            var webpagerecexist = (from srw in dbContext.Security_Role_To_Webpage
                                  where srw.security_role_id == roleid &&
                                  srw.security_webpage_id == selectedval &&
                                  srw.ID != lookupID
                                  select srw).ToList();
 
 
            // If Count > 0 then user chose drop down webpage that is already associated with role
            if (webpagerecexist.Count == 0)
            {
             
                // create sql criteria with which the changes will be applied to
                var webpagerecord = dbContext.Security_Role_To_Webpage.Where(n => n.ID == lookupID).FirstOrDefault();
 
                if (webpagerecord != null)
                {
                    // update entity's state
                    editableItem.UpdateValues(webpagerecord);
 
                    try
                    {
 
                        // Save changes to db
                        dbContext.SaveChanges();
 
                    }
                    catch (System.Exception)
                    {
 
                    }
 
                }
            }          
            else
            {
 
                DisplayMessage("The webpage you selected already exists for this role!");
                // keep in update mode
                e.Canceled = true;
 
 
 
            }
        
 
        }
 
        protected void RadGridwebpagemanagement_InsertCommand(object sender, GridCommandEventArgs e)
        {
 
            GATEEntities dbContext = new GATEEntities();
 
            var editableItem = ((GridEditableItem)e.Item);
 
            Hashtable values = new Hashtable();
 
            editableItem.ExtractValues(values);
 
            var newrec = dbContext.Security_Role_To_Webpage.Create();
 
 
            newrec.security_webpage_id = (int?)values["security_webpage_id"];
            newrec.security_role_id = (int?)values["security_role_id"];
            newrec.add_privledge = (bool?)values["add_privledge"];
            newrec.edit_privledge = (bool?)values["edit_privledge"];
            newrec.delete_privledge = (bool?)values["delete_privledge"];
 
            dbContext.SaveChanges();
             
 
        }
 
 
 
 
    }
}

Viktor Tachev
Telerik team
 answered on 16 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?