Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
118 views
Hello All,
I am using 2011.2.712.40 Telerik Product Version. The Code snippet for the Amount Field in Telerik Grid is as:

<telerik:GridBoundColumn FilterControlWidth="80%" DataField="requested_amount" HeaderText="Requested Amount"
                            SortExpression="requested_amount" UniqueName="requested_amount" ShowFilterIcon="true" DataFormatString="{0:c2}">
 </telerik:GridBoundColumn>
 <telerik:GridBoundColumn FilterControlWidth="80%" DataField="approved_amount" HeaderText="Approved Amount"
                            SortExpression="approved_amount" UniqueName="approved_amount" ShowFilterIcon="true" DataFormatString="{0:c2}">
</telerik:GridBoundColumn>

I am facing some issue when I try to enter some filter value for amount like '.05'. It is working fine if filter value starts with some numeric value.
So, it would be better if I make the Filter value form .05 to 0.05 before the Focus is lost and filter criteria is selected.
Please provide me a solution for the Issue which can be compatible with all browsers.
Also, please refer the Telerik Grid UI attached.

http://screencast.com/t/bvHEUFgJ

Thanks,
Saurabh
Saurabh
Top achievements
Rank 1
 answered on 22 Aug 2013
4 answers
268 views
Out of all the columns present in my grid, I have four columns which hold date values. I want to filter the grid according to the date, so I have wriiten the following code

                    <telerik:GridBoundColumn UniqueName="OrderDate" DataField="OrderDate" HeaderText="Ordered on"
                        CurrentFilterFunction="EqualTo" DataType="System.DateTime" ShowFilterIcon="False"
                        AutoPostBackOnFilter="True" DataFormatString="{0:MM/dd/yy}">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="ScheduledShipDate" DataField="ScheduledShipDate"
                        HeaderText="Ship By" CurrentFilterFunction="EqualTo" DataType="System.DateTime"
                        ShowFilterIcon="False" AutoPostBackOnFilter="True" DataFormatString="{0:MM/dd/yy}">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="Deliveron" DataField="ScheduledDeliveryDate"
                        HeaderText="Deliver on" CurrentFilterFunction="EqualTo" DataType="System.DateTime"
                        ShowFilterIcon="False" AutoPostBackOnFilter="True" DataFormatString="{0:MM/dd/yy}">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="ActualShip" DataField="ActualShipDate" DataFormatString="{0:MM/dd/yy}"
                        HeaderText="Actual Ship" CurrentFilterFunction="EqualTo" DataType="System.DateTime"
                        ShowFilterIcon="False" AutoPostBackOnFilter="True">
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Right" Width="65px" />
                    </telerik:GridBoundColumn>

Out of the four columns the last three are working perfectly but the first one is not filtering, but it has the same set of attributes written as that of the other columns.

Please help me out.
B
Top achievements
Rank 1
 answered on 22 Aug 2013
1 answer
77 views
Utilizing the Mega Menu demo (http://demos.telerik.com/aspnet-ajax/menu/examples/megadropdown/defaultcs.aspx) I get the display showing as shown in the attached. I have the DefaultCS.aspx and the styles.css copied exactly from the site and have copied the images into the Img directory.

I have the latest version of the RadMenu and this is an ASP.Net 4.5 site. I have tested under IE, Chrome and Firefox with each producing the exact same results.

I am certain I am missing something simple.


Kate
Telerik team
 answered on 22 Aug 2013
13 answers
421 views
I downloaded the beta version of the new Telerik Web Parts, hoping to experiment with using the RadGrid part in our SharePoint Foundation 2010-based portal.

Unfortunately, the install failed because SharePoint Server 2010 (MOSS) was not present.  Apparently, the Telerik web parts only work with MOSS, not Foundation.

Why the restriction?  I'd love to be able to use the RadGrid web part for the bulk of our list-based work, leaving more development time available for integrating other Telerik controls into custom web parts that we develop.  As a company providing tools for developers hoping to extend the Microsoft base portal environment, why would Telerik make it harder for developers to easily instrument applications with Telerik UI components?
Tsvetoslav
Telerik team
 answered on 22 Aug 2013
1 answer
116 views
Hi Telerik

I am dynamically displaying a radwindow using javascript. In the JS I am only setting the position to center but on rendering I am getting a JS error Style is null.

var winemp  =$find("<%= RadWindowEmp.ClientID%>");
function showemp(sender, args)
{
     winemp.center();
     winemp.show();
}

showemp() is invoked on a radbutton clients click.

Thanks
Damian.
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2013
8 answers
776 views
Hi,

When using the RadListbox with SelectionMode set to Multiple, is it possible to allow users to select multiple items just by clicking (without having to hold Ctrl).  This used to be an option with listboxes (options were Simple or Extended) in MS Access but I can't find an ASP.NET listbox with allows this?

Genady Sergeev
Telerik team
 answered on 22 Aug 2013
1 answer
193 views
Hi Telerik,

How can I add a button to the RadWindow  to print the content items? (The Button should not appear in print)

Thanks
Damian
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2013
1 answer
77 views
Hi all,
I want To persist the state of checked record on clientside(for single/multiple/header check)during paging,pagesize change and get the USERID associated with such records on button click?
i did it for server side please check it
<%@ Page Title="" Language="C#" MasterPageFile="~/ReportAdmin.Master" AutoEventWireup="true"
    CodeFile="GroupUserCreation.aspx.cs" Inherits="GroupUserCreation" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <center>
        <telerik:RadComboBox ID="cmbgroupname" runat="server" Width="250px" EmptyMessage="             Select Group"
            ExpandAnimation-Type="OutBounce" Skin="Default">
        </telerik:RadComboBox>
        <asp:RequiredFieldValidator ID="rfv1" runat="server" ErrorMessage="*" Font-Size="Larger"
            SetFocusOnError="true" ValidationGroup="val" ControlToValidate="cmbgroupname"
            Font-Bold="true" ForeColor="Red"></asp:RequiredFieldValidator>
        <br />
        <br />
        <div>
        </div>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True" AllowPaging="True"
            PageSize="5" AllowSorting="True" OnNeedDataSource="RadGrid1_NeedDataSource" CellSpacing="0"
            GridLines="None" ShowGroupPanel="True" Skin="Default" OnItemCommand="RadGrid1_ItemCommand"
            OnPreRender="RadGrid1_PreRender">
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
            <ClientSettings Selecting-AllowRowSelect="true" AllowDragToGroup="True" EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>
            </ClientSettings>
            <MasterTableView DataKeyNames="UserId">
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
                </Columns>
                <PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
        </telerik:RadGrid>
        <br />
        <asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" Width="130px"
            Height="25px" ValidationGroup="val" />
        <br />
    </center>
</asp:Content>
and
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Telerik.Web.UI;
using System.Collections;
 
 
public partial class GroupUserCreation : System.Web.UI.Page
{
    Globas obj = new Globas();
    CheckBox chkbox = new CheckBox();
    string GroupId="";
 
     
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
            Session.Clear();
            DataTable dt1 = obj.GroupDetails();
            cmbgroupname.DataSource = dt1;
            cmbgroupname.DataTextField = "GroupName";
            cmbgroupname.DataValueField = "GroupId";
            cmbgroupname.DataBind();
        }
 
        foreach (GridHeaderItem headerItem in RadGrid1.MasterTableView.GetItems(GridItemType.Header))
        {
            CheckBox chk = (CheckBox)headerItem.FindControl("ClientSelectColumn");
        }
 
        
    }
 
    protected void Button1_Click(object sender, EventArgs e)
    {
 
        if (Session["selectedItems"] != null)
    {
        ArrayList selectedItems = (ArrayList)Session["selectedItems"];
        Int16 stackIndex;
        for (stackIndex = 0; stackIndex <= selectedItems.Count - 1; stackIndex++)
        {
            RadGrid1.AllowPaging = false;
            RadGrid1.Rebind();
            string curItem = selectedItems[stackIndex].ToString();
            foreach (GridItem item in RadGrid1.MasterTableView.Items)
            {
                if (item is GridDataItem)
                {
                    GridDataItem dataItem = (GridDataItem)item;
                    if (curItem.Equals(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["UserId"].ToString()))
                    {                         
                        dataItem.Selected = true;
                        Response.Write(curItem);//Datakey value of the selcted items
                        Response.Write("<br/>");
                        //Code To Insert
                        break;
                    }
                }
            }
        }        
    }
    RadGrid1.AllowPaging = true;
    RadGrid1.Rebind();
 
            }
 
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = obj.UserDetails();
        RadGrid1.DataSource = dt;
      
    }
 
 
 
    protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        ArrayList selectedItems;
        if (Session["selectedItems"] == null)
        {
            selectedItems = new ArrayList();
        }
        else
        {
            selectedItems = (ArrayList)Session["selectedItems"];
        }
        if (e.CommandName == "RowClick")
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
            string customerID = dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["UserId"].ToString();
            if (dataItem.Selected)
            {
                selectedItems.Add(customerID);
                Session["selectedItems"] = selectedItems;
            }
            else
            {
                selectedItems.Remove(customerID);
                Session["selectedItems"] = selectedItems;
            }
        }
    }
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        if (Session["selectedItems"] != null)
        {
            ArrayList selectedItems = (ArrayList)Session["selectedItems"];
            Int16 stackIndex;
            for (stackIndex = 0; stackIndex <= selectedItems.Count - 1; stackIndex++)
            {
                string curItem = selectedItems[stackIndex].ToString();
                foreach (GridItem item in RadGrid1.MasterTableView.Items)
                {
                    if (item is GridDataItem)
                    {
                        GridDataItem dataItem = (GridDataItem)item;
                        if (curItem.Equals(dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["UserId"].ToString()))
                        {
                            dataItem.Selected = true;
                            break;
                        }
                    }
                }
            }
        }
    }
}
Plz give response quickly,
Thanks
Marin
Telerik team
 answered on 22 Aug 2013
1 answer
106 views
Hello,

I need to use RadScheduler in a similar use case to this demo where you can drag unresourced tasks to the scheduler.

http://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx?product=scheduler

However, I need to drop the tasks directly to resources. Basically, I want to combine that demo with the customized header menu (http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceheadertemplates/defaultcs.aspx).

How could this be achieved?
I already have implemented the header menu and some of the drag and drop capabilities (only determining the resource is missing).
Nencho
Telerik team
 answered on 22 Aug 2013
4 answers
724 views
When using  RadDropDownList control I get the following error:

Error 1 The type or namespace name 'RadDropDownList' does not exist in the namespace 'Telerik.Web.UI' (are you missing an assembly reference?)

This is a piece of the code:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
    <telerik:RadDropDownList runat="server" ID="DropDownListCuadroMandos" TabIndex="1" Width="200" DropDownWidth="200" DefaultMessage="Select one ..."
    DataSourceID="SqlDataSource1" DataTextField="Descripcion" DataValueField="IdIndicador">
 
                        </telerik:RadDropDownList>

The reference to the assembly is located at:
C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2012\Bin40\Telerik.Web.UI.dll

Any suggestion? Thank you.






Princy
Top achievements
Rank 2
 answered on 22 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?