Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
151 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
104 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
817 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
1.0K+ 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
68 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
1 answer
272 views
New to JSON and struggling to convert a SQL table whereby Latitude and Longitude are stored in separate float fields.  The requirement of RadMap to receive a single field (say Location as per examples) seems to be an Array.  Any examples whereby these two distinct fields can be converted on the fly and JSON'd to the RadMap control as a single field ?  (Note: I am choosing not to bind to the Latitude/Longitude via server binding method, I wish to use the RadClientDataSource consuming JSON)
Glen
Top achievements
Rank 1
 answered on 21 Nov 2014
1 answer
499 views
I have a radgrid with Add, delete and refresh buttons in the CommandItemTemplate. On click of Add, I want to hide the template. How can I achieve this?
Kostadin
Telerik team
 answered on 21 Nov 2014
1 answer
153 views
Team,

we are using Telerik rich text editor (RadEditor, version 2014.2.724.40), character count and word counts are displaying wrongly.

upon prefilling the data to the editor is adding few more character (Space/carriage return) at the end.

can we know how to address this?
Ianko
Telerik team
 answered on 21 Nov 2014
1 answer
99 views
Hi,
I’m using a raddock window to display some news.  Having trouble setting the height.I can set it ok on the page load event, however if I then collapse / expand it resets.  Any ideas what I’m doing wrong?
Slav
Telerik team
 answered on 21 Nov 2014
12 answers
850 views
I have a grid that binds a number of child data objects to columns with no issue, using the syntax defined at http://www.telerik.com/help/aspnet-ajax/grdbindingtosubobjects.html.

What I cannot figure out, however, is how to aggregate a child object that is a list or collection. For example, if I have a Customer object and I want to get the customer's first street address, I would use DataField="Customer.Addresses[0].Street" on a standard GridBoundColumn.

How can I get the count of the addresses? I have tried all sorts of GridCalculatedColumn DataFields and Expressions, to no avail. I am looking for something along the lines of this:
<telerik:GridCalculatedColumn DataFields="Customer.Addresses" 
Expression="Count( Child )" >

That doesn't work, of course. In fact, if I try to do a Count on any dotted data field, I get an exception of "System.Data.SyntaxErrorException: Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier." For example, just trying to use an expression of "Count({0})" with DataFields set to "Customer.FirstName" (of which there is only one), causes that exception to be thrown at runtime. Doing the same thing with a non-dotted data field, such as SendDate, does not cause the same exception.
Radoslav
Telerik team
 answered on 21 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?