Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
262 views
In my application, when a user clicks on an item in the RadListview, I want a clientside JavaScript function to be called (similar to onclientclick in an asp.net control).
How would I call a client side JavaScript function when "RadListView1_SelectedIndexChanged" event is triggered ?
Angel Petrov
Telerik team
 answered on 18 Mar 2013
1 answer
72 views

Hi all

I have a problem with an Telerik Grid.
Until I can editing direct in the Grid (with AJAX), i have the following problem:
If i’ll editing all data from a line, i go to a editing window with this command:

columns.Command(commands =>
        {
            commands.Custom("editDetail")
                .ButtonType(type)
                .HtmlAttributes(new { @class = "editDetail" })
                .Text("edit")
                .DataRouteValues(route => route.Add(o => o.GeschaeftID).RouteKey("GeschaeftID"))
                .Ajax(false)
                .Action("Edit", "Geschaeft");
        }).Width(38).Title("");

When i finished with the editing, i get back to the site with the Grid.
And now i‘ve lost all filters and sortings.
If i don’t need the AJAX for edting direct in the Grid i don’t loosing the filter and sortings.
I guess the problem ist by the AJAX.
Do you have an idea, what to do that i don't lose the filters and sortings when i using AJAX?

This is my Code:


@(Html.Telerik().Grid<Model>()
    .Name("Grid")
    .DataKeys(keys => keys.Add(c => c.GeschaeftID))
    .ToolBar(commands => { commands.SubmitChanges(); })
    .DataBinding(dataBinding =>
            dataBinding.Ajax()
                .Select("_Index", "Geschaeft")
                .Update("_SaveBatchEditing", "Geschaeft")
    )
    .Columns(columns =>
    {
        columns.Command(commands =>
        {
            commands.Custom("editDetail")
                .ButtonType(type)
                .HtmlAttributes(new { @class = "editDetail" })
                .Text("edit")
                .DataRouteValues(route => route.Add(o => o.GeschaeftID).RouteKey("GeschaeftID"))
                .Ajax(false)
                .Action("Edit", "Geschaeft");
        }).Width(38).Title("");
        columns.Bound(o => o.xy)
            .ClientTemplate("<#=xy? 'ja' : 'nein' #>")
            .Title("A")
            .HeaderHtmlAttributes(new { title = "xy" })
            .Width(12);
        columns.Bound(o => o.xz)
            .Width(84)
            .Title("xz")
            .ReadOnly()
            .ClientTemplate("<#=xz#>");
        columns.Bound(o => o.xf)
            .Title("xf")
            .Width(250)
            .ReadOnly();
    })
    .DetailView(details => details.ClientTemplate(
        Html.Telerik().Grid<Model>()
        .Name("V")
        .Columns(columns =>
        {
            columns.Bound(o => o.vx)
            .Width(90)
            .Title("vx")
            .ReadOnly();
            columns.Bound(o => o.vz)
            .Title("vz")
            .ReadOnly();
        })
        .DataBinding(dataBinding => dataBinding.Ajax()
                .Select("_DetailViewAjax", "Geschaeft", new { geschaeftID = "<#= GeschaeftID #>" }))
        .ToHtmlString()
    ))
    
    .ClientEvents(events => events
        .OnDataBinding("Grid_onDataBinding")
        .OnError("Grid_onError"))
        .Editable(editing => editing.Mode(GridEditMode.InCell))
     .Scrollable(scrolling => scrolling.Enabled(false).Height("auto"))           
     .TableHtmlAttributes(new { style = "table-layout = fixed" })
        .Resizable(resizing => resizing.Columns(true))
        .Sortable()
        .Filterable()
        .Groupable()          
        .Pageable(paging =>
            paging
                .PageSize(ViewBag.PageSize)
                .Style(GridPagerStyles.Status)
                .Position(GridPagerPosition.Bottom)
        )
    )

Petur Subev
Telerik team
 answered on 18 Mar 2013
16 answers
204 views
I am starting to use the rotator control. But cant seem to make it stretch horizontaly when the user resizes the browser horizontaly.

I have the rotator width="100%" but when I grab the side of the browser to make it wider or narrower, normaly all my div's resize and stretch but now with the rotator it seem that the rotator does not resize at all with them.

is there a work around?
Slav
Telerik team
 answered on 18 Mar 2013
3 answers
170 views

I want my GridCheckBoxColumn on insert is visible=false
But in EditMode i want the GridCheckBoxColumn  visible=true

How do i that?

 

 

 

Kostadin
Telerik team
 answered on 18 Mar 2013
2 answers
87 views
Hello,

I am trying to place a notification control inside a content page, between two other controls.
I do not want it's position to be absolute(bottom-right, etc).

How to achive this?

Thanks,
Mike
Mihai
Top achievements
Rank 1
 answered on 18 Mar 2013
5 answers
360 views
How can I navigate to the specified page using tabs. This is my design

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="tabNavigate.aspx.cs" Inherits="tabNavigate" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <link href="StyleSheet2.css" rel="stylesheet" type="text/css" />
    <link href="TabStrip.WebBlue.css" rel="stylesheet" type="text/css" />
    <link href="Ajax.Office2010Silver.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="Rd" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadTabStrip ID="rdtabPersonalDetails" runat="server" UnSelectChildren="True"
            AutoPostBack="true" OnTabClick="rdtabPersonalDetails_Click" Skin="WebBlue" EnableEmbeddedSkins="False"
            ClickSelectedTab="True" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab runat="server" Text="Overview">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Personal">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Contact">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Salary">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Bank">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Taxes">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
    </div>
    </form>
</body>
</html>

My code to navigate is as follows
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;
 
public partial class tabNavigate : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void rdtabPersonalDetails_Click(object sender, RadTabStripEventArgs e)
    {
        RadTab tab1 = new RadTab();
        switch (e.Tab.Text)
        {
            case "Overview":
                tab1.NavigateUrl = "Default1.aspx";
                break;
            case "Personal":
                tab1.NavigateUrl = "Default2.aspx";
                break;
            case "Contact":
                tab1.NavigateUrl = "Default3.aspx";
                break;
            case "Salary":
                tab1.NavigateUrl = "Default4.aspx";
                break;
            case "Bank":
                tab1.NavigateUrl = "Default5.aspx";
                break;
            case "Taxes":
                tab1.NavigateUrl = "Default6.aspx";
                break;
 
        }
    }
}

But unable to achieve the required

Nencho
Telerik team
 answered on 18 Mar 2013
1 answer
78 views

Need some direction on how to implement this. Any and all assistance is greatly appreciated!
Have a rather abstract business problem, but is huge in my company, so I’m translating it into something simpler to understand.
We’ve collected data on how much coffee people drink, on a daily basis, and need to chart it, showing how much they actually consumed compared to what they should have consumed.

The Data looks like this:

Person                  DateExamined  Budgeted Cups                 Actual Cups Consumed
Fred                       3/1/13                   2                                              1
Fred                       3/2/13                   2                                              4
Fred                       3/3/13                   2                                              2
Bob                        3/1/13                   3                                              5
Bob                        3/2/13                   3                                              4
Bob                        3/3/13                   3                                              5
Steve                    3/1/13                   1                                              1
Steve                    3/2/13                   1                                              0
Steve                    3/3/13                   1                                              0

So by looking at the data we can see how much coffee people actually drank, compared to what they were supposed (budgeted) to drink, on a daily basis.

In the RadChart, I need this charted with a Horizontal Line, with the dates being the x-axis labels.  The line series is the part I’m stumped on.  For the data above, the chart should show a total of 6 lines… more precisely, 3 “groups” of 2 lines… each of the 3 groups being 1 of the persons… the 2 lines being the budget and actual, so one can clearly see when people went over or under.

Thanks for all feedback on this.
Missing User
 answered on 18 Mar 2013
4 answers
140 views
I have a TabStrip with multiple page views inside. When I remove the height property from the markup, I expect the PageView to grow to the height of the content inside. Instead, the height of the tab looks to be set near 150px (a guesstimate) and is cutting off most of the content within the page, as shown in the attached picture. When I explicitly set the height of the PageView everything works correctly, however, if the content overflows I get scroll bars within the tab strip and I'm trying to prevent that. Any help would be greatly appreciated.
 
Boyan Dimitrov
Telerik team
 answered on 18 Mar 2013
1 answer
76 views
Can I animate moveTo?  I have a window I want to keep it in the page when a person is scrolling.  It works but I would like to have a slight lag and use jquery to animate.

Thanks,

Marty
Marin Bratanov
Telerik team
 answered on 18 Mar 2013
3 answers
131 views
Hi!

See attached images...

We have two areas that we cannot seem to be able to style.

1. This is a resizable grid and we would like change the white to something more neutral. Is this area available via a CSS style.

2. This is a heirarchy grid. We are able to get at the expand/collapse cell (see code below), but how do we get at the cell below it?

protected void radGridCaseNumbers_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                (e.Item as GridDataItem)["ExpandColumn"].BackColor = Color.FromArgb(50, 193, 224, 255);
            
        }


Thanks for your help!
Michael
Kostadin
Telerik team
 answered on 18 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?