Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
340 views
Hello,
I want to create TreeNodes with images(NodeText + Image)
Here is something like...
Private void LoadNodes()
{
  RadTreeView.Nodes.Clear();
  RadTreeNode node1 = new RadTreeNode();
  node1 = new RadTreeNode("Node Text" + Image with client Click event, "Node Value")                       node1 .Attributes.Add("IsFirstLevel", "Yes");                                                                                         RadTreeView.Nodes.Add(node1 );
}

How can i do?
Ivan Danchev
Telerik team
 answered on 19 Jan 2015
2 answers
1.0K+ views
I've been troubleshooting an Asp.Net web app and I'm fairly certain my problem is that I'm losing a session variable whenever I run the app in Internet explorer 10 or 11. (Chrome and Firefox work perfectly.) I'm seeing vague hints around the web that Ajax calls could be a problem but nothing definitive. 

The app itself makes use of Telerik Ajax controls.  The session variable is set in one page (which has little more than a RadButton and a couple of RadTextBoxes)  and then a Response.Redirect call is made to a second page (which is mostly one big RadGrid), at which time the variable is null again.  The two pages have a master page in common.

Has anyone else had this problem?
Maria Ilieva
Telerik team
 answered on 19 Jan 2015
7 answers
558 views
Currently, if i enter an invalid date in raddatepicker like '019901' then it changes it to 01/01/99'
Can i give an invalid date message instead and have the user enter the date in the correct format only?
Maria Ilieva
Telerik team
 answered on 19 Jan 2015
3 answers
494 views
I am getting the error:

Script control '' is not a registered script control.
Script controls must be registered using RegisterScriptControl() before
calling RegisterScriptDescriptors().
Parameter name: scriptControl

with the following code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Test_Default2" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"></telerik:RadScriptManager>
        <telerik:RadAjaxManager runat="server" ID="ramRoot" Visible="false">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Timer1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pMessage" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="pMessage">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pMessage" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnClose">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pMessage" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <asp:HiddenField runat="server" ID="hfMessageHidden" Value="0" />
            <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick" Enabled="true"></asp:Timer>
        <asp:Panel runat="server" ID="pMessage" CssClass="pageMessagePanel">
            <asp:LinkButton runat="server" ID="btnClose" class="close" data-dismiss="alert" aria-hidden="true" Text="x" />
            <asp:Label runat="server" ID="lMessage">
            </asp:Label>
        </asp:Panel>
    <div>
    <p>Hello</p>
    </div>
    </form>

The codebehind methods have their contents commented out, so really what you see here is what you get.  When I remove the <asp:Panel tag, the error goes away.  But I want the <asp:Panel tag.  Anyone have any idea what might be going on?

Thanks!

Laurie
Maria Ilieva
Telerik team
 answered on 19 Jan 2015
5 answers
84 views
Hi,

Running into something very odd.  I have a radgrid using a custom EditForm template.  The bound recordset has a field called Status, containing zero through five.  inside the template i have the following code.  Basically I need to show this section if the Status is zero, anything else and it's not rendered.

<% If CheckStatus() Then%>
<fieldset>
  <legend class="Legend">Options</legend>
  <table style="width: 100%;">
    <tr>
      <td class="tableData">
        <asp:RadioButtonList ID="chkboxSaveOptions" runat="server" SelectedValue='<%# Bind("status") %>'>
          <asp:ListItem Value="1">SUBMIT</asp:ListItem>
          <asp:ListItem Selected="True" Value="0">Save as draft</asp:ListItem>
        </asp:RadioButtonList></td>
    </tr>
  </table>
</fieldset>
<%End If%>


The issue, sometime when I click to edit the row the If Then is never evaluated.  I set a breakpoint in CheckStatus.  Sometimes the breakpoint is hit and it work fine, sometimes it just renders the template without ever triggering the breakpoint and errors out because the status value isn't in the Buttonlist values.

I have no idea as i cant find a pattern.

Thanks.
Frank
Top achievements
Rank 1
 answered on 19 Jan 2015
14 answers
2.0K+ views
Hi Guys,

We'd been using RadGrid for awhile version Q3 2008. We've recently updated it to Q1 2009_1_527 .

We've noticed some changes and one of it is the "page size" control(dropdownlist) appears in the footer of the RadGrid if the pagerstyle mode is set to "NextPrevAndNumeric". Is there any way to remove this "page size" control as we don't actually need it as most of our RadGrid already has its own "page size" control.

I try to read the documentation but there don't seem to be an explanation how this could be done.
WEBSRFR
Top achievements
Rank 1
 answered on 19 Jan 2015
15 answers
877 views
I am using the export to excel function for my grid, it works fine.
But there is always an extra row of empty cells between my row header and the data in the excel spreadsheet.

Does anybody know how to get rid of it ?

 

 


Cheers
Alan
Warrick
Top achievements
Rank 1
 answered on 18 Jan 2015
2 answers
114 views
Hi,

I'm just starting to play with the ribbonbar - it looks very promising.
One of the first things I wanted to try was the color picker.
There does not appear to be a Preset property like there is for the RadColorPicker.

The default palette is somewhat limited.
Is there any way to specify a preset or add my own colors?

Thanks in advance.

Jim
jlj30
Top achievements
Rank 2
 answered on 17 Jan 2015
2 answers
228 views
Hi, I use the RadDataform to manage some company news within my application. (NewsData object - )

I was able to manage the addition of a RadAsyncUpload in the ItemInsertTemplate mixed with a RadBinaryImage.
When the user upload an image, a preview of the image is shown by the BinaryImage (using this example http://demos.telerik.com/aspnet-ajax/imageeditor/examples/imageupload/defaultcs.aspx?product=asyncupload)

Using the RadDataForm, I went with the manual CRUD approch. I read your article about the manual CRUD using the _ItemInserting method.
So my code is

protected void RadDataForm1_ItemInserting(object sender, RadDataFormCommandEventArgs e)
    {
        RadDataFormInsertItem insertedItem = e.DataFormItem as RadDataFormInsertItem;
        Hashtable newValues = new Hashtable();
        insertedItem.ExtractValues(newValues);
 
        RPKNewsData test = new RPKNewsData(newValues);
        test.Save();
    }

This is my code when the ImageUploadEvent is raised on the server side when the user upload an image.
protected void Test2_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        RadDataFormEditableItem editItem = ((Telerik.Web.UI.RadWebControl)(sender)).NamingContainer as RadDataFormEditableItem;
        RadBinaryImage bImg = editItem.FindControl("RadBinaryImage1") as RadBinaryImage;
        byte[] image;
        long fileLength = e.File.InputStream.Length;
        image = new byte[fileLength];
        e.File.InputStream.Read(image, 0, image.Length);
        bImg.DataValue = image;
    }

My problem is: the Image key in my hashtable is null. But all the other properties are filled correctly according to my Business object. 
I even tried to browse RadDataForm1.FindControl("RadBinaryImage1") and the binaryimage is set to an URL.

Is there a way to get the binary data of the image so i can save it in my database manually.







Riad
Top achievements
Rank 1
 answered on 16 Jan 2015
2 answers
83 views
Hi Telerik Admin, I want to develop Drag & Drop of Rows in Telerik Grid. But I need to achieve that @ the row level now what do I mean @ the row level means.
User being able to select a nested/merge row and drop it. 

Example 1: check this image : http://s17.postimg.org/osoays467/Pic_1.png

If a user wants to add Row “Doc Type 2” which is currently associated with “Property Two”. User can drag row “Doc Type 2” and drop that row under “Doc Type 3”. This will essentially present the view below to the user

Example 2: check this image : http://s24.postimg.org/qubp19apx/Pic_2.png

Here is the view that the user currently has. User now drags Doc Type 2 (selected section) and tries to paste it under Utilities. This functionality will not be allowed since there is no category and sub category selected (highlighted)

Example 3: check this image : http://s17.postimg.org/ds3ruwhzz/Pic_3.png

Current view for the user is : 

Example 4: check this image : http://s23.postimg.org/73ospdfaz/Pic_4.png 

User now has the ability to sort Doc Type 1 and Doc Type 2 for Property Two i.e. User will drag “Doc Type 2” row and drop it over “Doc Type 1” to get the view as shown above : Example 4: check this image : http://s30.postimg.org/aljpjmojl/Pic_5.png

















Pavlina
Telerik team
 answered on 16 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?