Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views
Hello,

Has anyone had this issue? I haven't changed my code but I have about 3 grid combobox filters and once I use one once, then they all stop working.

Here is the code I use for one that is the same for all of them:

<telerik:GridTemplateColumn ColumnGroupName="GeneralInformation" DataField="Status" AllowFiltering="True" HeaderText="Status" UniqueName="Status" HeaderTooltip="Status">
                               <ItemStyle HorizontalAlign="Center" />
                               <HeaderStyle Width="60px" BackColor="Navy" HorizontalAlign="Center" />
                               <EditItemTemplate>
                                   <telerik:RadDropDownList runat="server" ID="Statusdrop" DataValueField="StatusID"
                                       DataTextField="Status" DataSourceID="StatusFilter">
                                   </telerik:RadDropDownList>
                               </EditItemTemplate>
                               <FilterTemplate>
                                   <telerik:RadComboBox ID="StatusCombo" Skin="Silk" Height="100px" Width="50" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'
                                       runat="server" OnClientSelectedIndexChanged="StatusIndexChanged">
                                       <Items>
                                           <telerik:RadComboBoxItem Text="All" Value="" />
                                           <telerik:RadComboBoxItem Text="G" Value="G" />
                                           <telerik:RadComboBoxItem Text="O" Value="O" />
                                           <telerik:RadComboBoxItem Text="Y" Value="Y" />
                                           <telerik:RadComboBoxItem Text="R" Value="R" />
                                           <telerik:RadComboBoxItem Text="M" Value="M" />                                       
 
                                       </Items>
                                   </telerik:RadComboBox>
                                   <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                                       <script type="text/javascript">
                                           function StatusIndexChanged(sender, args)
                                           {
                                               var tableView = window.$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                               tableView.filter("Status", args.get_item().get_value(), "EqualTo");
                                           }
                                       </script>
                                   </telerik:RadScriptBlock>
                               </FilterTemplate>
                               <ItemTemplate>
                                   <asp:Label runat="server" ID="StatusLabel" Text='<%#Eval("Status") %>'></asp:Label>
                               </ItemTemplate>
                           </telerik:GridTemplateColumn>
Kostadin
Telerik team
 answered on 11 Feb 2014
1 answer
61 views
I built data entry form where user can type a numeric value and using JavaScript, it will update the rest of the grid and user will save the modified data from user entry and JS modification. The code was working under Win 7 x32bit.

I updated my OS to win 8 x64. After installing all the tools and moving the code from Win 7 to Win 8, I notice the code stop working. The code appeared to work correct when user enters data it auto calculated the cells with the JavaScript but when user click save only modified data by user is captured but javascript modified cells will not return the new value instead it return its original value.

I update my OS to be Win8 x32bit and retest the code and I found the issue still exists. Does RadGrid has issues with Win8?

I attached very simple example for the issue. Can you please help me figuring this issue out ?
 
ASP.NET CODE
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
<html5>
<head runat="server">
<title></title>
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<script type="text/javascript">
function OnBlurTxt(grid, args) {
var adj = document.getElementById('RadGrid1_ctl00_ctl04_txtPrice')
var adj2 = document.getElementById('RadGrid1_ctl00_ctl04_txtQnty')
var adj3 = document.getElementById('RadGrid1_ctl00_ctl04_txtTotal')
adj3.value = adj.value * adj2.value

}
</script>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True" ViewStateMode="Enabled">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="Button1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>

</div>
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" AllowAutomaticUpdates="True">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Name" AllowAutomaticUpdates="true">
<Columns>
<telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Price" SortExpression="Price" UniqueName="Price" >
<ItemTemplate>
<telerik:RadNumericTextBox runat="server" NumberFormat-DecimalDigits="0" ID="txtPrice" Width="60px" DbValue='<%# Bind("Price") %>'
BackColor="Yellow" EnabledStyle-HorizontalAlign="Right" ViewStateMode="Enabled">
<ClientEvents OnBlur="OnBlurTxt" />
</telerik:RadNumericTextBox>
</ItemTemplate>
<ItemStyle Width="75px" HorizontalAlign=Right />
<HeaderStyle Width="75px" HorizontalAlign=Center />
</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Qnty" SortExpression="Qnty" UniqueName="Qnty" >
<ItemTemplate>
<telerik:RadNumericTextBox runat="server" NumberFormat-DecimalDigits="0" ID="txtQnty" Width="60px" DbValue='<%# Bind("Qnty") %>'
BackColor="Yellow" EnabledStyle-HorizontalAlign="Right" ViewStateMode="Enabled">
<ClientEvents OnBlur="OnBlurTxt" />
</telerik:RadNumericTextBox>
</ItemTemplate>
<ItemStyle Width="75px" HorizontalAlign=Right />
<HeaderStyle Width="75px" HorizontalAlign=Center />
</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Total" SortExpression="Total" UniqueName="Total">
<ItemTemplate>
<telerik:RadNumericTextBox runat="server" NumberFormat-DecimalDigits="3" ID="txtTotal" Width="60px" DbValue='<%# Bind("total") %>' BackColor="Yellow"
EnabledStyle-HorizontalAlign="Right" ViewStateMode="Enabled">
<ClientEvents OnBlur="OnBlurTxt" />
</telerik:RadNumericTextBox>
</ItemTemplate>
<ItemStyle Width="75px" HorizontalAlign=Right />
<HeaderStyle Width="75px" HorizontalAlign=Center />
</telerik:GridTemplateColumn>

</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RU_EnterpriseConnectionString %>" SelectCommand="SELECT [BrandID], [Name], [BrandOrderID] FROM [tblBrands]"></asp:SqlDataSource>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
</form>
</body>
</html5>


C# code
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;

public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("Price");
dt.Columns.Add("Qnty");
dt.Columns.Add("Total");

object[] obj = new object[4] { "Test", "10", "5", "50" };
dt.Rows.Add(obj);
RadGrid1.DataSource=dt;
RadGrid1.Rebind();

}
}

protected void Button1_Click(object sender, EventArgs e)
{
//7-8-4
int i = 0;
string str="";
if (this.RadGrid1.Items[0] != null)
{

GridDataItem item = this.RadGrid1.Items[i];
RadNumericTextBox price = (RadNumericTextBox)item.Cells[3].FindControl("txtPrice");
RadNumericTextBox qnty = (RadNumericTextBox)item.Cells[4].FindControl("txtQnty");
RadNumericTextBox ttl = (RadNumericTextBox)item.Cells[4].FindControl("txtQnty");

str="Price="+price.Value.ToString() +" qnty=" +qnty.Value.ToString() + " ttl="+ttl.Value.ToString();

}

RadAjaxManager1.Alert(str);

}
}
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Feb 2014
1 answer
65 views
I have an issue like, when I try to drag and drop an image on to the editor, image drops as expected but resize border is shown above ribbon control.
This issue happens only in Internet explorer 9.
I have attached image of the issue that happens in Telerik demo site for your reference.

Marin Bratanov
Telerik team
 answered on 11 Feb 2014
1 answer
62 views
Hi
 i have a GridDateTime column but filtering on it is not working properly. I want to filtet the date values. Any idea?
Princy
Top achievements
Rank 2
 answered on 11 Feb 2014
1 answer
72 views
Hi.

I am trying to migrate the below code from radChart into an HtmlChart, but unfortunately I am having lots of issues doing so.  Any insight/help would be greatly appreciated, as well as any hints/tips/tricks for doing so.

<
telerik:RadChart ID="chartMain" runat="server" AutoLayout="True">
    <charttitle>
        <Appearance Position-AlignedPosition="Top">
        </Appearance>
        <TextBlock Text="">
        </TextBlock>
    </charttitle>
    <series>
        <telerik:ChartSeries Name="Index" Type="Line" DataYColumn="Close" DataLabelsColumn="OADate"
            DataXColumn="OADate">
            <Appearance ShowLabels="false">
            </Appearance>
        </telerik:ChartSeries>
        <telerik:ChartSeries Name="Index" Type="Line" DataYColumn="Close" DataLabelsColumn="OADate"
            DataXColumn="OADate">
            <Appearance ShowLabels="false">
            </Appearance>
        </telerik:ChartSeries>
    </series>
    <legend visible="False">
        <appearance visible="False" position-alignedposition="TopRight">
        </appearance>
    </legend>
    <appearance textquality="AntiAlias">
    </appearance>
    <plotarea xaxis-datalabelscolumn="OADate">
        <EmptySeriesMessage TextBlock-Text="Awaiting Data">
            <TextBlock Text="Awaiting Data">
            </TextBlock>
        </EmptySeriesMessage>
        <XAxis LayoutMode="Between" AutoScale="False">
            <Appearance ValueFormat="ShortTime" MajorGridLines-Visible="false" CustomFormat="HH">
            </Appearance>
        </XAxis>
        <YAxis IsZeroBased="false" AxisMode="Extended">
        </YAxis>
    </plotarea>
</telerik:RadChart>

Kind regards.
Leon
Danail Vasilev
Telerik team
 answered on 11 Feb 2014
3 answers
83 views
OK. Here's the deal.

I have a Grid that is defined with columns like this ...
1.<telerik:GridTemplateColumn UniqueName="DateTimeAdded" SortExpression="DateTimeAdded">
2.    <ItemTemplate>
3.        <div id="lblDateTime2"/>
4.    </ItemTemplate>
  5..
</telerik:GridTemplateColumn>

And I have some code behind that looks like this ...
1.switch (item.UniqueName)
2.                {
3.                    case "DateTimeAdded":
4.                        item.HeaderText = GetGlobalStringResource(GTypes.Task.TASK_LIST, GKeys.Task.TaskList.GRID_COLUMN_HEADER_TEXT_DATE_TIME);

Now, I've tried invoking this code in the OnLoad event and in both the Page and the Grid's OnPreRender event. In each case I can see the value of item.headerText being correctly set. However, it is NEVER rendered.

I can't call this during the ItemDataBound event as the grid is bound on the client.

I can't call this during the OnColumnCreated/OnConlumnCreating events as they aren't invoked.

I'd welcome any suggestions.



Konstantin Dikov
Telerik team
 answered on 11 Feb 2014
5 answers
220 views
Hi,

Can we use Ribbion Asp.net Ajax control in Asp.net Mvc project?

If yes, Please provide some sample.

Thanks & Regards
Ritesh Singh
Plamen
Telerik team
 answered on 11 Feb 2014
2 answers
369 views
Hi,

I am using version Q3 1114 2013 of your controls.

I want to use the slider for a date range, where the start and end dates vary so they have to be set at runtime.

I want to show ticks of the dates between the start and end date range, so the user will be able to see the timeline.  I am currently using SmallChange="7" and LargeChange="28" so that each small change is a week and each large change is 4 weeks.

If I understand correctly, I need to set ItemType="Item" and then add RadSliderItems to create the ticks.

Of course since I don't have a fixed date range, I will have to add RadSliderItems at runtime as well.

I have the slider working correctly until I programatically add the RadSliderItems.  If I add the RadSliderItems programatically, the RadSlider's SelectionStart and SelectionEnd are no longer set correctly.  Instead of them being set to the leftmost and rightmost dates in the range, they are both set to the far right.

My first question is:  Do you have an example of doing this?  Please don't refer me to your online demo for adding RadSliderItems.  It doesn't show how to do all of this programatically using dates.

Here is my code.  Can you tell me what I might be doing wrong, that would cause my SelectionStart and SelectionEnd to be wrong when I add my RadSliderItems?
If I comment out the code that adds the RadSliderItems, the code below that (that sets the minimum / maximum / selectionstart / selectionend) works fine and the slider works fine.

Dim firstDate As Date = Today
Dim lastDate As Date = Today

If (Not Page.IsPostBack) Then
firstDate = filteredTaskList(0).apTaskPlannedStart
lastDate = filteredTaskList(filteredTaskList.Count - 1).apTaskPlannedEnd

Do Until firstDate >= lastDate
Dim rsi As New RadSliderItem(firstDate.ToShortDateString, firstDate.ToShortDateString)
RadSlider1.Items.Add(rsi)
firstDate = firstDate.AddDays(28)
Loop
End If

If (Not Page.IsPostBack) Then
RadSlider1.MinimumValue = CInt(filteredTaskList(0).apTaskPlannedStart.ToOADate)
RadSlider1.MaximumValue = CInt(filteredTaskList(filteredTaskList.Count - 1).apTaskPlannedEnd.ToOADate)

RadSlider1.SelectionStart = CInt(filteredTaskList(0).apTaskPlannedStart.ToOADate)
RadSlider1.SelectionEnd = CInt(filteredTaskList(filteredTaskList.Count - 1).apTaskPlannedEnd.ToOADate)
Else
filteredTaskList = From tasks In filteredTaskList _
 Where tasks.apTaskPlannedStart >= Date.FromOADate(RadSlider1.SelectionStart.ToString) AndAlso tasks.apTaskPlannedEnd <= Date.FromOADate(RadSlider1.SelectionEnd.ToString) _
 Select tasks
End If

Regards,
Brent
Brent Hetland
Top achievements
Rank 1
 answered on 11 Feb 2014
1 answer
602 views
hi there

we have an application where we use telerik dll 2012.3.1308.40

recerntly we have upgraded to 4.5 framework and i just want to know following

1. will this verison of dll will work for 4.5 framework?
2. do we need to do any upgrade steps?
3. do we need to purchase a new licence if 2012.3.1308.40 does not support 4.5 framework?

Please let us know

Thanks,
Roshan
Marin Bratanov
Telerik team
 answered on 11 Feb 2014
1 answer
70 views
Hi,

I'd like to display my combobox text that I change in the edit mode in the itemTemplate, in a disabled combobox or a label. Here's my aspx : 

<telerik:GridTemplateColumn HeaderText="Catégorie Profil" SortExpression="catProfil" >
                       <ItemTemplate>
                           <telerik:RadComboBox ID="cbxCatProfilDisabled" runat="server" Enabled="false">
                           </telerik:RadComboBox>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <telerik:RadComboBox ID="cbxCatProfil" runat="server">
                           </telerik:RadComboBox>
                       </EditItemTemplate>
</telerik:GridTemplateColumn>

I've tried many things, but no one work.
Thanks for your help
Hristo Valyavicharski
Telerik team
 answered on 11 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?