Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
771 views

I want to add custom attributes to model fields.

Think can I add data-email-msg as attribute to a field in Kendo Grid.(Please look at my example and how I add it..)

here is a example.....

$("#grid").kendoGrid({

     columns: [

              { field: "name",

                title: "Name",

               attributes: {

                        "class": "table-cell",

                         style: "text-align: right; font-size: 14px",

                         data-email-msg : "enter a valid email massage" } } ],

      dataSource: [ { name: "Jane Doe" }, { name: "John Doe" }] }); 

 

I already know that above is wrong. I am asking, is there a way to do that ??
Viktor Tachev
Telerik team
 answered on 21 Aug 2015
2 answers
139 views

I need to make my application in such a way that there would be a centralized configurable dateformat for the whole application.
I would store the applicable dateformats in an xml file or a database & the selected dateformat will also be stored.
If for example the user has selected dd/MM/yyyy as the default format, Then every page,user control would display the datepickers,grids,form fields that are datetime in dd/MM/yyyy format throughout the application.
Can you give me a possible solution or approach I should use to achieve this?
Any suggestions of doing it in a generic way so that I dont have to configure it on every page/control/usercontrol(grid, datepicker etc).

Can this be achieved through globalization feature of Telerik UI ? Some demo or documentation would be great.

 

Zepp
Top achievements
Rank 1
 answered on 21 Aug 2015
3 answers
207 views

We're using one version back from the latest telerik release and the grid setup is pretty straight-forward.

 There is one detail grid for each row and each column on both the master and detail grids are template columns who have their values displayed with calls to Eval().

If InsertItemDisplay="top" everything looks fine, however InsertItemDisplay="bottom" causes the grid to render as in the attached screenshots.

Notice in the second screenshot the insert row looks fine on the detail grid which makes me think it's an issue with the expand indicator column on the master grid.

Can anyone else reproduce this?

 

Viktor Tachev
Telerik team
 answered on 21 Aug 2015
13 answers
657 views
Version: 2011.1.519.35
Screenshot: IE9 (repro'd in FF6 and Chrome)
I've customized the AJAX Radscheduler to display MonthView only, limiting the number of visible appointments to one per day.  Here is my scheduler markup:
<telerik:RadScheduler runat="server" CssClass="DPScheduler" OverflowBehavior="Scroll" ID="rsCalendarEventScheduler" Skin="Windows7"
DataKeyField="dp_calendar_event_id"
DataStartField="start"
DataEndField="end"
DataSubjectField="subject"
Height="335px"
MonthView-AdaptiveRowHeight="false"
ShowFooter="false"
ReadOnly="true" ShowViewTabs="false"
TimeSlotContextMenuSettings-EnableDefault="false"
FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" OnNavigationComplete="rsCalendarEventScheduler_NavigationComplete"
EnableDescriptionField="true"
MonthView-VisibleAppointmentsPerDay="1"
SelectedView="MonthView"
OnTimeSlotCreated="rsCalendarEventScheduler_TimeSlotCreated"
AppointmentStyleMode="Default"
MonthView-HeaderDateFormat="MMMM yyyy">
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
    <AppointmentTemplate/>                                                                         
</telerik:RadScheduler>

I've attached a screenshot of what happens.  Notice how when the week "wraps", more than the required number of multi-day appointments start appearing per day.

Thanks,
Eric
Nencho
Telerik team
 answered on 21 Aug 2015
1 answer
106 views

I want to manipulate edittemplate controls from a radgrid from a textchanged event 

I cannot figure out how to define the textbox and labels outside of a gridevent.  

Does anyone have an example?  

Viktor Tachev
Telerik team
 answered on 21 Aug 2015
11 answers
414 views
How do you clear the image from the Image Edit? For example, I have the ImageEdit on a RadWindow to allow uploading/cropping an image. If I click 'select' choose an image and click 'upload' and then close the rad window that image is still there. How do I make that a 'new' ImageEditor when the button is clicked again to open the RadWindow?
Vessy
Telerik team
 answered on 21 Aug 2015
1 answer
75 views

 

Hi,

    Create RadDockZone,RadDock dynamically .And in this RadDock inside we can show the rad chart  dynamically please help me 

Vessy
Telerik team
 answered on 21 Aug 2015
3 answers
149 views

I try to use Telerik.Web.UI -> RadHtmlChart and RangeBarSeries to implement chart as in attachment.

I have problem with FromField and ToField. This fields have DECIMAL type but i need DATETIME type.
Also i need to create "stacked" chart: all series located in the same column for specific category

If i used kendo i gain what i want (found in Your example) as below.
Can You help me achieve this in HtmlChart?

<script>

var data = [{

id: 1,

line: "Line1",

from: new Date("2014/01/01 11:30").getTime(),

to: new Date("2014/01/01 14:45").getTime(),

valueColor: "red"

}, {

id: 2,

line: "Line2",

from: new Date("2014/01/01 09:30").getTime(),

to: new Date("2014/01/01 09:45").getTime(),

valueColor: "green"

}, {

id: 3,

line: "Line2",

from: new Date("2014/01/01 09:45").getTime(),

to: new Date("2014/01/01 10:00").getTime(),

valueColor: "blue"

}, {

id: 4,

line: "Line2",

from: new Date("2014/01/01 10:00").getTime(),

to: new Date("2014/01/01 10:15").getTime(),

valueColor: "red"

}, {

id: 5,

line: "Line2",

from: new Date("2014/01/01 10:15").getTime(),

to: new Date("2014/01/01 14:00").getTime(),

valueColor: "green"

}, {

id: 6,

line: "Line2",

from: new Date("2014/01/01 15:15").getTime(),

to: new Date("2014/01/01 15:30").getTime(),

valueColor: "red"

}, {

id: 7,

line: "Line2",

from: new Date("2014/01/01 15:45").getTime(),

to: new Date("2014/01/01 16:00").getTime(),

valueColor: "red"

}];

$("#chart").kendoChart(

{

dataSource:

{

data: SqlDataSource1,

group: {

field: "id",

dir: "desc"

}

},

series:

[{

type: "rangeBar",

gap: 0.1,

fromField: "from",

toField: "to",

categoryField: "line",

spacing: -1,

colorField: "valueColor",

name: "Category: #: group.items[0].field #"

}],

valueAxis:

{

min: new Date("2014/01/01 08:00").getTime(),

max: new Date("2014/01/01 17:00").getTime(),

majorUnit: 60 * 60 * 1000, // 60 minutes in milliseconds

labels: {

template: "#= kendo.toString(new Date(value), 'HH:mm') #"

}

},

legend:

{

visible: true

}

});

</script>

I try to use Telerik.Web.UI -> RadHtmlChart and RangeBarSeries to implement chart as in attachment.
 
I have problem with FromField and ToField. This fields have DECIMAL type but i need DATETIME type.
Also i need to create "stacked" chart: all series located in the same column for specific category
 
If i used kendo i gain what i want (found in Your example) as below.
Can You help me achieve this in HtmlChart?
 

<script>

var data = [{

id: 1,

line: "Line1",

from: new Date("2014/01/01 11:30").getTime(),

to: new Date("2014/01/01 14:45").getTime(),

valueColor: "red"

}, {

id: 2,

line: "Line2",

from: new Date("2014/01/01 09:30").getTime(),

to: new Date("2014/01/01 09:45").getTime(),

valueColor: "green"

}, {

id: 3,

line: "Line2",

from: new Date("2014/01/01 09:45").getTime(),

to: new Date("2014/01/01 10:00").getTime(),

valueColor: "blue"

}, {

id: 4,

line: "Line2",

from: new Date("2014/01/01 10:00").getTime(),

to: new Date("2014/01/01 10:15").getTime(),

valueColor: "red"

}, {

id: 5,

line: "Line2",

from: new Date("2014/01/01 10:15").getTime(),

to: new Date("2014/01/01 14:00").getTime(),

valueColor: "green"

}, {

id: 6,

line: "Line2",

from: new Date("2014/01/01 15:15").getTime(),

to: new Date("2014/01/01 15:30").getTime(),

valueColor: "red"

}, {

id: 7,

line: "Line2",

from: new Date("2014/01/01 15:45").getTime(),

to: new Date("2014/01/01 16:00").getTime(),

valueColor: "red"

}];

$("#chart").kendoChart(

{

dataSource:

{

data: SqlDataSource1,

group: {

field: "id",

dir: "desc"

}

},

series:

[{

type: "rangeBar",

gap: 0.1,

fromField: "from",

toField: "to",

categoryField: "line",

spacing: -1,

colorField: "valueColor",

name: "Category: #: group.items[0].field #"

}],

valueAxis:

{

min: new Date("2014/01/01 08:00").getTime(),

max: new Date("2014/01/01 17:00").getTime(),

majorUnit: 60 * 60 * 1000, // 60 minutes in milliseconds

labels: {

template: "#= kendo.toString(new Date(value), 'HH:mm') #"

}

},

legend:

{

visible: true

}

});

</script>

I try to use Telerik.Web.UI -> RadHtmlChart and RangeBarSeries to implement chart as in attachment.
 
I have problem with FromField and ToField. This fields have DECIMAL type but i need DATETIME type.
Also i need to create "stacked" chart: all series located in the same column for specific category
 
If i used kendo i gain what i want (found in Your example) as below.
Can You help me achieve this in HtmlChart?
 

<script>

var data = [{

id: 1,

line: "Line1",

from: new Date("2014/01/01 11:30").getTime(),

to: new Date("2014/01/01 14:45").getTime(),

valueColor: "red"

}, {

id: 2,

line: "Line2",

from: new Date("2014/01/01 09:30").getTime(),

to: new Date("2014/01/01 09:45").getTime(),

valueColor: "green"

}, {

id: 3,

line: "Line2",

from: new Date("2014/01/01 09:45").getTime(),

to: new Date("2014/01/01 10:00").getTime(),

valueColor: "blue"

}, {

id: 4,

line: "Line2",

from: new Date("2014/01/01 10:00").getTime(),

to: new Date("2014/01/01 10:15").getTime(),

valueColor: "red"

}, {

id: 5,

line: "Line2",

from: new Date("2014/01/01 10:15").getTime(),

to: new Date("2014/01/01 14:00").getTime(),

valueColor: "green"

}, {

id: 6,

line: "Line2",

from: new Date("2014/01/01 15:15").getTime(),

to: new Date("2014/01/01 15:30").getTime(),

valueColor: "red"

}, {

id: 7,

line: "Line2",

from: new Date("2014/01/01 15:45").getTime(),

to: new Date("2014/01/01 16:00").getTime(),

valueColor: "red"

}];

$("#chart").kendoChart(

{

dataSource:

{

data: SqlDataSource1,

group: {

field: "id",

dir: "desc"

}

},

series:

[{

type: "rangeBar",

gap: 0.1,

fromField: "from",

toField: "to",

categoryField: "line",

spacing: -1,

colorField: "valueColor",

name: "Category: #: group.items[0].field #"

}],

valueAxis:

{

min: new Date("2014/01/01 08:00").getTime(),

max: new Date("2014/01/01 17:00").getTime(),

majorUnit: 60 * 60 * 1000, // 60 minutes in milliseconds

labels: {

template: "#= kendo.toString(new Date(value), 'HH:mm') #"

}

},

legend:

{

visible: true

}

});

</script>

Danail Vasilev
Telerik team
 answered on 21 Aug 2015
18 answers
1.0K+ views
Okay, I've read and tried every approach on the forums about this (I think), so I PROMISE you this is my exhausted efforts causing me to post a probably pretty tired topic.

Pretty simple: I have a page that is in a masterpage (not sure if thats important) with a link on it that opens a radwindow (I will put the code out below). That opens just fine. The page in the radwindow is a simple data-entry page, upon where I hit the "Save" button, it saves to the database, then closes the radwindow on postback. In the same radwindow, theres a cancel button that only calls the javascript to close the radwindow, and that works just fine. The code-behind that is supposed to close the window on postback just calls the same function that WORKS for the cancel button; the page posts back and the window re-opens, except its NOT modal (the initial window is modal) so the background is not greyed out, and its also twice the width it once was. Once the window has wrongfully reopened, the cancel button no longer works, and the save button just keeps posting back without closing.

I've already tried double-checking that the javascript is firing on postback by putting in alerts.

The link that opens the radwindow:
<asp:LinkButton ID="lbAddPhone" runat="server" onclientclick="javascript:InsertPhone(); return false;">+ Phone/Email</asp:LinkButton> 


InsertPhone()
function InsertPhone() { 
        var hid = document.getElementById("<%= hidContactId.ClientID %>"); 
        var oWnd = $find("<%= wndAddPhone.ClientID %>"); 
        oWnd.setUrl("popup_addcontact.aspx?which=3&id=" + hid.value); 
        oWnd.show(); 
    } 

Now for the popup_addcontact.aspx page:
protected void btnPhoneSave_Click(object sender, EventArgs e) 
    { 
        string closingscript = "closeWin();"
        ScriptManager.RegisterStartupScript(thisthis.GetType(), "closeWin", closingscript, true); 
    } 

closeWin()
function closeWin() { 
            var wind = GetRadWindow(); 
            wind.close(); 
        } 
 
function GetRadWindow() { 
            var oWindow = null
             
            if (window.radWindow) { 
                oWindow = window.radWindow; 
            } 
            else if (window.frameElement.radWindow) { 
                oWindow = window.frameElement.radWindow; 
            } 
             
            return oWindow; 
        } 

If anyone has any insight, I'd greatly appreciate it. Like I said, I have confirmed that the javascript IS firing, and I have tried several different methods of code-behind injection, including putting a literal control on the host page.

Thanks!
Stamo Gochev
Telerik team
 answered on 21 Aug 2015
2 answers
116 views
Hi there , I read many articles on ticker , some of them are http://demos.telerik.com/aspnet-ajax/rotator/examples/multiplescroller/defaultcs.aspx and http://demos.telerik.com/aspnet-ajax/ticker/examples/functionality/radticker/defaultcs.aspx , code is shown in aspx format how to get the same code in cshtml format .
Helen
Telerik team
 answered on 21 Aug 2015
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?