Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views
Hi,

I'm getting a JScript error when trying to add an .html template to the RadEditor content area using the Template Manager. I am implementing the Azure Custom Content Provider from CodePlex. The Image Manager works fine, but the Template Manager throws a JScript error. It happens inside the httpHandler - Telerik.Web.UI.DialogHandler.aspx file. It appears the script is trying to access html elements which not have been created yet, perhaps the .html template itself. Any help would be greatly appreciated! [Screenshot attached].

Thank you!

Randy Sullivan
Ianko
Telerik team
 answered on 17 Jul 2013
4 answers
149 views
Hi,
I have a grid that is using the batch edit mode and for all of the other non rating columns everything works correctly. Clicking the cell puts it into edit mode, and the changes are saved. I have one column that is a GridRatingColumn. I have it set to allow rating in view mode but this does not seem to make a difference to the outcome, which is that clicking the rating cell or the rating control does not put that cell into edit mode.

I have tried fumbling around with some client side code, but there are no sensible examples on your site just part of a single page. I can;pt get this to work.

Do you have a way around this please?

Thanks

Chris


Chris
Top achievements
Rank 2
 answered on 17 Jul 2013
1 answer
73 views
Hi,

I have a scheduler bound to a sql server database. When double-clicking an appointment, and selecting edit only this occurrence, the description field is available and we enter text there. Server side we are trying both of these approaches but no values are present. Please let us know what we are doing wrong here.

 Protected Sub RadScheduler1_AppointmentUpdate(ByVal sender As Object, ByVal e As AppointmentUpdateEventArgs) Handles RadScheduler1.AppointmentUpdate

       
Dim ret As String = e.ModifiedAppointment.Description

    

            ret = e.Appointment.Attributes.Item("Description")

     

    End Sub

Kate
Telerik team
 answered on 17 Jul 2013
1 answer
373 views

I have used the follwing code for my sorting in load data on demand in telerik grid.I have used SortBy as Name,Orderby as Descending by default.While pageload,it loads the descending order with name correctly.If i click on the Name header,it will sort ascending correctly.If again i click on the header text it doesnt set the Orderby value as ascending (as previous value).What I have to do for that?

protected void RadGrid1_SortCommand(object sender, GridSortCommandEventArgs e)
    {
        GridSortExpression sortExpr = new GridSortExpression();
        e.Canceled = true;
        string defaultSortorder = e.OldSortOrder.ToString();
        sortBy = ViewState["SortBy"].ToString();
        orderBy = ViewState["OrderBy"].ToString();

        switch (e.OldSortOrder)
        {
            case GridSortOrder.Ascending:
                sortExpr.FieldName = e.SortExpression;
                sortExpr.SortOrder = GridSortOrder.Descending;
                e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                ViewState["sortBy"] = sortExpr.FieldName;
                ViewState["orderBy"] = sortExpr.SortOrder;

                break;
            case GridSortOrder.Descending:
                sortExpr.FieldName = e.SortExpression;
                sortExpr.SortOrder = GridSortOrder.Ascending;
                e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                ViewState["sortBy"] = sortExpr.FieldName;
                ViewState["orderBy"] = sortExpr.SortOrder;
                break;

        }

        if (!e.Item.OwnerTableView.SortExpressions.ContainsExpression(e.SortExpression))
        {
            GridSortExpression sortExpr1 = new GridSortExpression();
            sortExpr1.FieldName = e.SortExpression;
            sortExpr1.SortOrder = GridSortOrder.Ascending;
            e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr1);
            ViewState["sortBy"] = sortExpr1.FieldName;
            ViewState["orderBy"] = sortExpr1.SortOrder;
        }

        
       
    }

Margret
Top achievements
Rank 1
 answered on 17 Jul 2013
1 answer
57 views
Hi,

I want to get value of each row in the RadGrid_ItemCreated Event. How to get Values of each row in this event?

Note: I don't want to use RadGrid_ItemDataBound event.
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Jul 2013
1 answer
123 views
So i'm having a problem with displaying a raddock. This does not happen every time but it happens enough to warrant some looking into. The pictures below explain it all, somehow the css just gets messed up.  I have to force a refresh from the server to get the controls to re-render properly. I also have validated the page with W3C and there are no outstanding issues.

Here is the code i use to display the docks:
			
<div id="f_body_box">
<input type="hidden" name="dirtyRows" value="~" />
<telerik:RadDockLayout ID="FormBodyDockZone" runat="server" StoreLayoutInViewState="True">
<telerik:RadDockZone ID="FormDockZoneRight" runat="server" Width="45%" Style="float: right" Height="100%" BorderStyle="None">
</telerik:RadDockZone>
<telerik:RadDockZone ID="FormDockZoneLeft" runat="server" Width="45%" Height="100%">
</telerik:RadDockZone>
</telerik:RadDockLayout>
</div>

Here is the code i use to create the dock:

// Create the dock control and add it to the layout
RadDock dock = new RadDock()
{
    DockMode = DockMode.Docked,
    ID = groupID.ToString(),
    Title = (from row in data.Tables[0].AsEnumerable() where row.Field<int>("group_id") == groupID select row.Field<string>("group_nm")).FirstOrDefault(),
    EnableAnimation = true,
    DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.ExpandCollapse,
    Skin = "Windows7",
};
dock.ContentContainer.Controls.Add(group);
 
// Add the dock to the alternating controls
if (i % 2 == 0)
{
    FormDockZoneLeft.Controls.Add(dock);
}
else
{
    FormDockZoneRight.Controls.Add(dock);
}

Dobromir
Telerik team
 answered on 17 Jul 2013
1 answer
292 views
Hi

I came across the RadConfirm and now I want to change the asp confirm box shown on my radbutton click to radconfirm. I added args.set_cancel(!radconfirm("Confirm Delete?") but ended in some sort of error. Didnt get what the issue. So please point me in the right direction to get it done.

Thanks
Katya.
Shinu
Top achievements
Rank 2
 answered on 17 Jul 2013
3 answers
117 views
Hi

I want to add arrows to the end of lines connecting the nodes and make it more thick. How can I do the same using CSS?

Thanks
Lovella.
Princy
Top achievements
Rank 2
 answered on 17 Jul 2013
6 answers
261 views
Hi,

I am having an issue with a RadGrid which appears to only occur in IE9. The issue only occurs if I enable AllowScroll in the client settings. When I mouse over the column headers or click on the horizontal scrollbar what I believe is the outer RadGrid div is growing in size leaving a blank space between the grid contents (and horizontal scroll) and the surrounding border. The grid itself has a two level hierarchy and expanding/collapsing any of the items causes the outer div to resize itself back.

Running IE9 in IE7/IE8 or IE9 compatibility mode does not show the problem. It appears to only occur in IE9 itself. 

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="ObjectDataSource1" OnColumnCreated="RadGrid1_ColumnCreated"
    OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound" OnExportCellFormatting="RadGrid1_ExportCellFormatting" Width="100%">
    <MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" AllowSorting="false"
        DataKeyNames="EventGroupTypeId, ParentEventGroupTypeId" TableLayout="Fixed">
        <SelfHierarchySettings ParentKeyName="ParentEventGroupTypeId" KeyName="EventGroupTypeId" />
    </MasterTableView>
    <ClientSettings AllowExpandCollapse="true">
        <Scrolling AllowScroll="true" />
        <ClientEvents OnGridCreated="GridCreated" />
    </ClientSettings>
</telerik:RadGrid>

I also have some css to force the height to auto: 


.rgDataDiv { height: auto !important }

I have found that the problem appears to only occur if I set the Grid width in JS. This is done in the OnGridCreated client event using the following code:

function GridCreated(sender, args) {
    ResizeGrid();
}
 
function ResizeGrid() {
    var grid = $find("<%= RadGrid1.ClientID %>");
     
    grid.get_element().style.width = ($(window).width() - 140) + "px";  // <-- with this line included, the problem shows. Without it, the problem doesn't show but the grid also goes off the screen (large number of columns)
}

The 140px offset is simply to allow for a page border. The ResizeGrid function is only ever called the once (through the GridCreated function). 

Is there another way to set the Grid width that would be better suited? This appears to be the recommended way to do this as per Telerik support (http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-width-and-height-in-javascript-dom.aspx)

I have some screen captures showing the issue if that helps? Just let me know how you would like me to get them to you.

Cheers,

Andrew

Ketan
Top achievements
Rank 1
 answered on 17 Jul 2013
3 answers
102 views
Hy,

I have a radcombobox in my page.I am calling its OnClientSelectedIndexChanged.I am trying to format the combobx text here.After setting the text my value field becomes empty.Also the event fires again on clicking anywhere outside the control.I am using loadondemand and autopostback is false.

Help me.
Nencho
Telerik team
 answered on 17 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?