Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
92 views
is it possible to get radgrid changes on postback? pretty much is there a radgrid equivalent of textbox.text?
Pavlina
Telerik team
 answered on 21 Nov 2014
3 answers
591 views
Hi,

May i know the code to select out all items in radgrid in all the pages? As sometimes when i do filtering, i need all the items from whole grid (grid with paging) to display in other places.

I cannot use code as below, as it just select out just one page from the grid only.

For Each griditem As Telerik.WebControls.GridItem In radgrid.Items
Next


Please advice.

Thanks,
Soo


Pavlina
Telerik team
 answered on 21 Nov 2014
1 answer
116 views
Hi,

I am using Telerik Asp.Net for Ajax version 2014.3.1024.40.

I have enabled virtual scrolling the drop down list as below. I am able to see only the Afghanistan, all the others are shown as blank value. However i disable the virtual scrolling, i am able to see all the entries. Please let me know whats the issue and how to fix it ?

<telerik:RadDropDownList ID="rdlCountry" DefaultMessage="---" EnableVirtualScrolling="true"  runat="server"  >
                                                            <Items>
                                                                <telerik:DropDownListItem Text="Afghanistan" />
                                                                <telerik:DropDownListItem Text="Albania"  />
                                                                <telerik:DropDownListItem Text="Algeria" />
                                                                <telerik:DropDownListItem Text="Andorra" />
                                                                <telerik:DropDownListItem Text="Angola" />
                                                                <telerik:DropDownListItem Text="Antigua & Deps" />
                                                                <telerik:DropDownListItem Text="Argentina" />                                                             
                                                            </Items>
                                                        </telerik:RadDropDownList>
Nencho
Telerik team
 answered on 21 Nov 2014
3 answers
452 views
In this simple example (found here in the forum) for setting the filtering in code behind I get a "Expression Expected"  error.

I have already set the EnableLinqExpression="false" in the grid.

public enum MyEnum
{
    Value1,
    Value2,
    Value3,
    Value4,
    Value5
}
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        if (RadGrid1.MasterTableView.FilterExpression == "")
        {
            RadGrid1.MasterTableView.FilterExpression = "([Value] = '" + MyEnum.Value1 + "')";
        }
        else
        {
            RadGrid1.MasterTableView.FilterExpression = "";
        }
        RadGrid1.Rebind();
    }
 
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("Key");
        table.Columns.Add("Value");
        for (int i = 1; i < 6; i++)
        {
            table.Rows.Add("Key" + i.ToString(), "Value" + i.ToString());
        }
        RadGrid1.DataSource = table;
    }
}

<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <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" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <h2>Test Grid filtering</h2>
        <telerik:RadButton ID="RadButton1" runat="server" onclick="RadButton1_Click"
            Text="RadButton">
        </telerik:RadButton>
    </div>
    <telerik:RadGrid ID="RadGrid1" runat="server" EnableLinqExpression="false" AllowFilteringByColumn="true"
        onneeddatasource="RadGrid1_NeedDataSource" Width="500px">
    </telerik:RadGrid>
    </form>
</body>
</html>

What are I doeing vrong?

Anders Pedersen
Anders
Top achievements
Rank 1
 answered on 21 Nov 2014
1 answer
132 views
Hi, 
I need to customize telerik slider to obtain something like the attached image.

Any help will be appreciated.
Thank you.
Ianko
Telerik team
 answered on 21 Nov 2014
1 answer
137 views
how do you reset a grid, in batch edit mode, to its original state after an update? ie, clear whatever tracked changes it has going on so that if i click save changes again it doesn't still think there are commands to process

when i add an item, save changes, and then edit the same item (or do nothing to it) i get an update command with an oldvalues count of 0 and a null newvalues object. which feels less like an update than a not anything at all. if i could reset the grid after each save changes it wouldn't be an issue
Viktor Tachev
Telerik team
 answered on 21 Nov 2014
4 answers
94 views
Hi All,

I have IList<Class1>. My Class1 has two property. Say Name and ID Now I want. Dynamic Order By On Both Property.
OrderBy Should Be Ascending or Descending.

How can I achieve this functionality.

I am using this as            
var data = RadGrid.GetBindingData(retval.AsQueryable(), startIndex, maximumRows, sortBy, filterExpressions);

in sort by it only take the property name. so how can specify the sort order.

Please Help

Regards
Vijay



Angel Petrov
Telerik team
 answered on 21 Nov 2014
8 answers
767 views

Is there a way to set the height of a multi-row textbox so that it automatically shows it's complete content without scrollbars, but also without unnecessary white space at the bottom?

Reason: I have a page which can be in edit or in read-only mode. In read-only mode, I'd like for all input controls to show their complete content, regardless of the amount of text (e. g. for printing). Is this possible?

Viktor Tachev
Telerik team
 answered on 21 Nov 2014
4 answers
975 views
I am using a radcombobox that I have populated with data from my database. I initially set it up to just display a static title. Now the users want to see the items that have been selected. For the life of me I cannot figure out how to accomplish this.

Can someone please help me?  I need it to work EXACTLY like this....MultiSelect CheckBox display . I just can't figure out how to do it.

Thanks,
Ninel

Here is my code:
<script type="text/javascript">
        function stopPropagation(e) {
            e.cancelBubble = true;
            if (e.stopPropagation) {
                e.stopPropagation();
            }
         }
  
         function RadComboBox_OnClientLoad(sender) {
             sender.get_inputDomElement().readOnly = "readonly";
         }
  </script>
  
  
<div>
 <telerik:RadComboBox runat="server" ID="rdProjectDeliverables"  Width="215px" CheckBoxes="true"
Text="Project Deliverables"  AllowCustomText="false" EnableLoadOnDemand="false"
EmptyMessage="Project Deliverables" OnClientLoad="RadComboBox_OnClientLoad"
OnClientItemChecked="OnClientItemChecked" AutoPostBack="true"    >
     <Items>
           <telerik:RadComboBoxItem Text="" Value="" />
            <telerik:RadComboBoxItem Text="" Value=""/>
     </Items>
     <ItemTemplate>
        <asp:CheckBox runat="server" ID="CheckBox" onclick="stopPropagation(event);" oncheckedchanged="rdProjectDeliverables_CheckedChanged"   AutoPostBack= "true" Text=""/> <%# DataBinder.Eval(Container, "Text") %>
     </ItemTemplate>
   </telerik:RadComboBox>
</div>


protected void rdProjectDeliverables_CheckedChanged(object sender, EventArgs e)
    {
        GetMultiSelectDropDownSelections(rdProjectDeliverables);
    }

private void GetMultiSelectDropDownSelections(RadComboBox ddl)
{
    ArrayList checkedItems = GetCheckedItems(ddl);
    foreach (RadComboBoxItem item in checkedItems)
    {
        //lblMessage.Text = lblMessage.Text + item.Value + "<br>";
        if (item.Value == "9") //Value of 9 is the value of "Other" which requires a textbox to appear
        {
            pnlProjectDeliverablesOther.Visible = true;
            requestitem.ProjectDeliverablesOther = fldProjectDeliverablesOther.Text;
        }
        requestitem.RequestId = _requestid;
        requestitem.Value = DataHelper.ToInt32(item.Value);
         if (_requestorid > 0)
        {
            requestitem.MultiSelectionSave();
        }
    }
}
private ArrayList GetCheckedItems(RadComboBox ddl)
{
    ArrayList checkedItems = new ArrayList();
    foreach (RadComboBoxItem item in ddl.Items)
    {
        CheckBox checkBox = (CheckBox)item.FindControl("CheckBox");
        if (checkBox.Checked)
        {
            checkedItems.Add(item);
        }
    }
    return checkedItems;
}
Fawad
Top achievements
Rank 1
 answered on 21 Nov 2014
0 answers
58 views
Hi All,

In rad telerik controls text styles are not getting applied in IE browser(7,8) where as in chorme browser its working fine. Please let me know if their any solution?
PFA..Sample Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication5.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.cancel-button {
background: #fff;
background-image: -moz-linear-gradient(#1ba6ad, #0f6c7d 60%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1ba6ad), color-stop(60%,#0f6c7d));
box-shadow: 2px 2px 3px rgba(50, 50, 50, 0.5),2px 2px 3px rgba(50, 50, 50, 0.5) inset;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#1ba6ad', endColorstr='#0f6c7d');
appearance: none;
border: none;
border-radius: 18px;
-webkit-border-radius: 18px;
color: #fff;
display: inline-block;
font-size: 1.273em;
font-weight: bold;
line-height: 36px;
padding: 0px 23px;
text-decoration: none;
white-space: nowrap;
width: auto;
}
.aspNetDisabled {
opacity: 0.5 !important;
cursor: default;
color: white !important;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="rmScriptManagerWebLayout" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="ramWebLayout" runat="server">
</telerik:RadAjaxManager>
<div>
<telerik:RadButton ID="buttonCancel" runat="server"
CssClass="cancel-button" Enabled="false" ButtonType="LinkButton" DisabledButtonCssClass="aspNetDisabled"
EnableEmbeddedBaseStylesheet="false" EnableBrowserButtonStyle="false" Skin="" Text="cancel">
</telerik:RadButton>
</div>
</form>
</body>
</html>

Thanks,
Chaya
chaya
Top achievements
Rank 1
 asked on 21 Nov 2014
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?