Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
170 views
Hey Guys.
I'm having a silly problem with updating the radlistbox on buttonclick.

can you give me a hint.

Thnx in advance

------.aspx------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="prova.aspx.cs" Inherits="Pages_prova" %>
<%@ 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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager runat="server" ID="scriptMgr1">
        </asp:ScriptManager>
        <table>
            <tr>
                    <td align="left">
                        <telerik:RadListBox runat="server" ID="RL_PagesSource" Height="180px" Width="200px" ></telerik:RadListBox>
                    </td>
                    <td valign="top" align="center">
                    <br />
                        <telerik:RadButton ID="RB_PLeft" runat="server" Text=" > " Width="40px"
                            onclick="RB_PLeft_Click" SplitButtonCssClass=""
                            SplitButtonPosition="Right" ></telerik:RadButton><br /><br />
                        <telerik:RadButton ID="RB_PRight" runat="server" Text=" < " Width="40px"
                            SplitButtonCssClass="" SplitButtonPosition="Right" ></telerik:RadButton><br /><br />
                        <telerik:RadButton ID="RB_PLAll" runat="server" Text=" >> " Width="40" ></telerik:RadButton><br /><br />
                        <telerik:RadButton ID="RB_PRAll" runat="server" Text=" << " Width="40" ></telerik:RadButton><br /><br />
                    </td>
                    <td style="padding-left:30px;" align="left">
                        <telerik:RadListBox runat="server" ID="RL_PageDestination" Height="180" Width="200"
                AutoPostBack="True" onselectedindexchanged="RL_PageDestination_SelectedIndexChanged"></telerik:RadListBox>
                    </td>
            </tr>
        </table>
    </div>
     
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RB_PLeft">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RL_PagesSource" />
                    <telerik:AjaxUpdatedControl ControlID="RL_PageDestination" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    </form>
</body>
</html>


-----.aspx.cs----
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 Pages_prova : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RL_PagesSource.Items.Add(new RadListBoxItem("aaaa", "asdf"));
            RL_PagesSource.Items.Add(new RadListBoxItem("aasdf", "asdf"));
            RL_PageDestination.Items.Add(new RadListBoxItem("aasasdfadf", "asdf"));
        }
    }
    protected void RB_PLeft_Click(object sender, EventArgs e)
    {
        if (RL_PagesSource.Items.Count == 0 || RL_PagesSource.SelectedItem == null)
        {
        }
        else
        {
            RadListBoxItem it = new RadListBoxItem();
            it = RL_PagesSource.SelectedItem;
            RL_PageDestination.Items.Add(new RadListBoxItem(it.Text, it.Value));
             RL_PageDestination.DataBind();
            // RL_PagesSource.SelectedItem.Remove();
            // RL_PagesSource.DataBind();
        }
    }
    protected void RL_PageDestination_SelectedIndexChanged(object sender, EventArgs e)
    {
 
    }
}
Bozhidar
Telerik team
 answered on 19 Jul 2013
1 answer
73 views
I have a collapse of 1000 set on each context menu.  The menu will not hide until I click either on a link in the context menu or somewhere else on the tree page. The collapse time doesn't make a different.  (i.e. setting it to 1)
Kate
Telerik team
 answered on 19 Jul 2013
2 answers
108 views
Hi,
Here I have 2 problems ( one relatively simple, one sticky)

1 - The small "export to Excel" button in CommandItemSettings (ShowExportToExcelButton="true") it doesn't export anything, just refreshes the grid ( not the page) and makes the command line disappear, any ideas ? I also have a button export to excel which call the radgrid.export to excel command and exports the grid to excel. So I gues sIm missing some setting.

2 ( the sticky one) now the above grid configuration has a sqldatasource assigned to it. Ideally When the page is loaded for the first time I would like to display the grid but with no data-source ( basically it wont be visible) and then after some user input and doing a post back I go:

Grid.DataSource = result;
Grid.DataBind();

And the grid is built. But then when I try to export to excel I get an empty excel sheet, and after some testing it has to do something with not having that sql outsource initially. is there a way around this ?
regards, Neil
Neil
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
170 views
Hi,

I trying to bind a dropDownColumn to a class property as Enum and the value in itemDataBound always nbsp. When i bind with BoundColumn it's ok, i see the value of the enum.

If i change the class property to integer, the dropDownColumn displayed correctly, but i want to keep the class property as enum.  

Any workaround for this?

'Do not work
Public class XYZ
    Public Property Status as StatusEnum
End Class
 
Public Enum StatusEnum as Integer
    Enabled = 0
    Disabled = 1
End Enum
 
'Work
Public class XYZ
    Public Property Status as Integer
End Class

ty
Antonio Stoilkov
Telerik team
 answered on 19 Jul 2013
1 answer
109 views

We are using SPRadEditor with Telerik.Web.UI version 2013.1.417.35. The Rad editor is declare using the below statement

<telerik:SPRadEditor ID="rtxtDetail" runat="server" Skin="Office2007" Width="100%" ToolbarMode="Default" ContentFilters="None" StripFormattingOptions="NoneSupressCleanMessage">

 

But the Toolbar is not getting fixed to the top of the control. Could you please help to provide a fix for this issue?

Thank you

 
Slav
Telerik team
 answered on 19 Jul 2013
1 answer
273 views
My RadGrid  bonded to a list collection, but bonded no to all fields. Is there any way to get another field from DataMember bonded to exact row which user has selected.
Radoslav
Telerik team
 answered on 19 Jul 2013
3 answers
103 views
Hi

I have a radtreeview which is used for a directory structure/file list viewer, and there is a problem when folders are collapsed.

When I have folder (node) A, with subfolder B (child node), if I expand folder A node in the tree and then click on folder B child node, the files are displayed in my content pane correctly. However, once subfolder B node is selected, if I then collapse folder A (parent folder), the tree node collapses correctly, however the content view (list of files) is also refreshed to those contained in the root node. I want to prevent this redirect, and have the content view unchanged (same behaviour as in windows file explorer). I've had a look around and it seems like the OnClientNodeCollapsing is where I need to make the fix, but here I'm only using the default behaviour. And I don't want to disable the collapse itself in the tree, only the redirect in the content.

I'd appreciate any help, thanks
Bozhidar
Telerik team
 answered on 19 Jul 2013
5 answers
135 views
hello,

i have a grid using this GridDropDownColumn:

<Telerik:GridDropDownColumn HeaderText="Acceptance" UniqueName="AcceptanceStatus" DataSourceID="odsAcceptanceStatusTypes" ListValueField="ID" ListTextField="Name" ItemStyle-Wrap="false" DropDownControlType="DropDownList" />

which gets its data from a simple DataTable retrieved via a business method call in this ObjectDataSource:

<asp:ObjectDataSource ID="odsAcceptanceStatusTypes" TypeName="MyUtilities.WellTest" SelectMethod="GetAcceptanceStatusTypes" runat="server" />

...the problem -- when I handle the grid's UpdateCommand in C#, I'm not able to refer to this column-value by name. Instead, when I use the below code, the DictionaryEntry for this column is empty (see attached image).

protected void gridItems_UpdateCommand(object source, GridCommandEventArgs e)
{
    GridEditableItem editableItem = e.Item as GridEditableItem;
 
    //get our primary ID from the grid's datasource
    int resultNo = (int)(editableItem.OwnerTableView.DataKeyValues[editableItem.ItemIndex]["Result_No"]);
 
    //get the new values from this edited row
    Hashtable newValues = new Hashtable();
    e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editableItem);
 
    int acceptanceStatusTypeID = -1;
 
    foreach (DictionaryEntry entry in newValues)
    {
        switch ((string)entry.Key)
        {
            // (other items removed from code)
 
            //get the value for this
            case "":
                acceptanceStatusTypeID = Int32.Parse((string)entry.Value);
                break;
        }
    }
}

 
...is there a way for me to fix this? i tried giving the GridDropDownColumn a DataField value, but it complained since that value doesn't exist in the grid's source datatable. 

not sure if it makes a difference, but we're on an older version: 2009.2.826.35.

thanks!

Princy
Top achievements
Rank 2
 answered on 19 Jul 2013
3 answers
219 views
I am experimenting with the image editor to see if we can replace our silverlight image viewer with it. It's very promising but I am curious how you all would recommend handling multi-page tiffs? So far it looks like the only way to handle it would be to add a change page button, split the tiff on the back end, and change which image is dynamically loaded. Or am I missing a simpler way? It's a lot of processing to split the tiff each time so I'm hoping to find a way to avoid it. Thanks!
Dsffd
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
300 views
Hi guys

I have one requirement
I saw below link

http://www.telerik.com/help/reporting/buildingdatabinddatabase.html

In that all bars are in same color(Grey) can i have different colors for individual bar



above all in one group
and i know if we have different group we can get different colors
but i dont want different groups


Karthik.K
A2H
Top achievements
Rank 1
 answered on 18 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?