Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
105 views
I have a page with a usercontrol. The usercontrol contains a RadPanelBar, and within this I have a ItemTemplate with a RadTreeView. I need  to do DragAndDrop a HTML element on my page. I put the user control within a radAjaxPanel to ajaxify, but it's do always full postback when using DragAndDrop.
This is the code.

<radA:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%" Skin="WebBlue">
        <CollapseAnimation Duration="100" Type="None" />
        <Items>
            <telerik:RadPanelItem Expanded="True" Text="Templates List">
                <Items>
                    <telerik:RadPanelItem >
                        <ItemTemplate>
                             
                             
                                <div class="ff" style="padding: 2px 2px 2px 2px">
                                    Show templates below:</div>
                                <div class="ff" style="padding: 2px 2px 2px 2px">
                                    <asp:DropDownList ID="ddlType" runat="server" class="ff" Width="98%" AutoPostBack="true"
                                        OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
                                        <asp:ListItem Value="0">Product</asp:ListItem>
                                        <asp:ListItem Selected="True" Value="1">Structural</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div id="divProductsToShow" runat="server" class="ff">
                                    <span>
                                        <asp:LinkButton ID="lnkShowRelated" runat="server" Enabled="true" OnClick="lnkShowRelated_Click">Show related</asp:LinkButton>
                                        /
                                        <asp:LinkButton ID="lnkShowAll" runat="server" Enabled="false" Font-Bold="true" OnClick="lnkShowAll_Click">Show all</asp:LinkButton>
                                    </span>
                                </div>
                                <div class="ff" style="padding: 2px 2px 2px 2px">
                                     <radA:RadAjaxPanel ID="RadAjaxPanel8" runat="server">
                                    <telerik:RadTreeView ID="RadTreeView1" runat="server"  EnableDragAndDrop="true" OnNodeDrop="RadTreeView1_NodeDrop" >
                                    </telerik:RadTreeView>
                                    </radA:RadAjaxPanel>
                                </div>
                                <div class="ff" style="padding: 2px 2px 2px 2px">
                                    <a href="mgrCommunicationTemplates3.aspx" class="TableLink">Add Other</a>
                                </div>
                        
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Expanded="True" Width="100%" Text="Most Used Templates">
                <Items>
                    <telerik:RadPanelItem>
                        <ItemTemplate>
                            <div class="ff" style="padding: 2px 2px 2px 2px">
                                <telerik:RadTreeView ID="RadTreeView2" runat="server" EnableDragAndDrop="true" OnNodeDrop="RadTreeView2_NodeDrop" OnClientNodeDropping="ClientNodeDropping" >
                                </telerik:RadTreeView>
                            </div>
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
        </Items>
        <ExpandAnimation Duration="100" Type="None" />
    </telerik:RadPanelBar>
    </radA:RadAjaxPanel>
Maria Ilieva
Telerik team
 answered on 28 Oct 2010
1 answer
177 views
Hi,

Im just testing rad combobox. I need a behaviour like this: http://localhost:59468/radcontrols_aspnetajax/combobox/examples/functionality/filteringcombo/defaultcs.aspx

This is, a dropdownlist with autocomplete. I tried to isolate the example in a test APP, and the combobox is rendered, and partially works. Partially because the autocomplete behaviour does not work!

I did those steps:
- Added telerik dll to a test web project in the bin folder
- Referenced this dll
- Created the controls toolbox referencing this dll
- "drag and drop" the combobox, and setting those properties:

 

 

<telerik:RadComboBox DataSourceID="dsTestData" DataTextField="Name" ID="radCentral" runat="server"

 

 

 

AllowCustomText="true" ExpandAnimation-Type="None" CollapseAnimation-Type="None">

Any idea why the autocomplete does not work?

Thanks

 

Shinu
Top achievements
Rank 2
 answered on 28 Oct 2010
1 answer
67 views
Hi,

Our application Structure is mentioned below:
1) Master Page  header part contains the Rad Menu. On Menu Click Navigates to the respective content page.
2) All our content pages contains the RadGrid
3) We are using WebUserControl for the RadGrid EditForm.
Ref : http://test.aptisys.com/UOMSetup.aspx

I implemented the example with the Need data source, similar to the below mentioned telerik URL, (You can check our url  example in   http://test.aptisys.com/UOMSetup.aspx for reference).

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx

Pls reply back to the below Query and send us some example samples:

 In the RadGrid disabled the EnableViewState="false", when i tried to read the value from the webusercontrol edit form from the code behind content page, while implementing the InsertCommand to insert uom_code, uom_name and uom_desc values returns the empty string from the web user control.
1) How to insert the value using the InsertCommand when the viewstate is set to false?
2) What is the syntex to retrieve value from the webusercontrol edit form to assign to the respective table column in the insert command method?
3) What is the workaround to overcome this problem? 
4) Could you please send us some example how to implement the need data source  to insert, update and delete command when enable view state is set to false?
5) If i implement the heirarchy grid using the Need Data Source with Web User Control as edit form and set the Enable view state = false, does the second level of the heirarchy grid supports Grouping, Sorting, Filtering? Could you please send us some example for the scenario implemented using the need data source with Enable View State is set to false?

 protected void RadGUOM_InsertCommand(object source, GridCommandEventArgs e)
    {
        GridEditableItem editedItem = e.Item as GridEditableItem;
        UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
        //Create new row in the DataSource
        DataRow newRow = this.UOMCode.NewRow();
        //Insert new values
        Hashtable newValues = new Hashtable();
        newValues["uom_code"] = (userControl.FindControl("txtUcode") as TextBox).Text; (*Returns empty string)
        newValues["uom_name"] = (userControl.FindControl("txtUName") as TextBox).Text;(*Returns empty string)
        newValues["uom_desc"] = (userControl.FindControl("txtUdesc") as TextBox).Text;(*Returns empty string)

        //make sure that unique primary key value is generated for the inserted row
     //   newValues["EmployeeID"] = (int)this.Employees.Rows[this.Employees.Rows.Count - 1]["EmployeeID"] + 1;
        try
        {
            foreach (DictionaryEntry entry in newValues)
            {
                newRow[(string)entry.Key] = entry.Value;
            }
            this.UOMCode.Rows.Add(newRow);
            this.UOMCode.AcceptChanges();

        }
        catch (Exception ex)
        {
            Label lblError = new Label();
            lblError.Text = "Unable to insert Employees. Reason: " + ex.Message;
            lblError.ForeColor = System.Drawing.Color.Red;
            RadGUOM.Controls.Add(lblError);

            e.Canceled = true;
        }
        //RadGUOM.DataSource = null;
        //RadGUOM.Rebind();

    }

Mira
Telerik team
 answered on 28 Oct 2010
2 answers
196 views
I'm trying to disallow the up and down arrow key press on the text area of the combo (to ensure users do not accidentally select a different item) and used the following example provided in:
http://www.telerik.com/help/aspnet-ajax/combo-prevent-typing-particular-characters.html.

i am using firebug to step through the problem, the event fires however, the keypress is not disallowed.
I reverted back to example and noticed the example does not work too.

Please advise or post a working example.

<script type="text/javascript">
 function pageLoad() {
        var combo = $find("<%= RadComboBox1.ClientID %>");
        var input = combo.get_inputDomElement();
        input.onkeydown = onKeyDownHandler;
    }

    function onKeyDownHandler(e) {
        if (!e)
            e = window.event;

        var code = e.keyCode;
        //do not allow any of these chars to be entered: !@#$%^&*()
        //if (e.shiftKey && code >= 48 && code  <= 57){
        if (code >= 39 && code <= 40) {
            e.returnValue = false;
            if (e.preventDefault) {
                e.preventDefault();
            }
        }
    }
</script>  

<telerik:RadComboBox runat="server" ID="RadComboBox1" Height="400px"
            Width="100%" AllowCustomText="True"
            ShowMoreResultsBox="True"
            EnableVirtualScrolling="True"
            EnableLoadOnDemand="True"
            HighlightTemplatedItems="true"
            EnableItemCaching ="true"
            onitemsrequested="RadComboBox1_ItemsRequested"  
            onclientselectedindexchanged= "AllowSelectionChanged"
            onclientselectedindexchanging = "AllowSelectionChange"
            OnClientItemsRequesting="OnClientItemsRequesting"
            OnClientTextChange = "ValidateChange" Font-Size="X-Small"
  ShowDropDownOnTextboxClick="False">







Roman
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
87 views
Hi,
In my ListView control I have created a couple of buttons to edit/insert items. To go into edit mode or insert mode I have to click the button twice. The events are fired correctly however only with the second click resp the EditItemTemplate or the InsertItemTemplate is loaded.

What could be reason for this behavior?

Found a similar post: click control twice. This is similar to my issue. I do not use a datasource on the page however I set the datasource at page load.

Thanks,
Marc.
Maria Ilieva
Telerik team
 answered on 28 Oct 2010
2 answers
121 views
Hi,

We are using the RAD Editor (5.7.1) integrated in our Sharepoint (2007) portal and it appears that by default the image manager displays image libraries from the current site and the current site collection. But the users are asking fo the same behavior as the OOTB image upload dialog which let the users to browse to any site from the current site collection.

I've been reading the help about the Image manager here: http://www.telerik.com/help/aspnet-ajax/image_manager.html

So I tried to add the following in my ConfigFile.xml: 
<property name="ImagesPaths">
  <item>/</item>
</property>

But when the Image Manager shows up it displays an error message "Not Found" instead of the tree view.

Am I missing something ? How can I make the Image Manager work like the OOTB one ?

Kind regards,
Sébastien Nunes
Top achievements
Rank 1
 answered on 28 Oct 2010
6 answers
327 views
Hello,

I noticed, due to the following error, that RadGrid attempts to automatically restore the columns of a grid from viewstate(?) on postback.

  Sys.WebForms.PageRequestManagerServerErrorException: Cannot create column with the specified type name: GridDateTimeRangeFilterColumn

I'd like to disable this functionality if possible, and continue to add the columns manually in OnInit. EnableViewState is set to false on the grid; I presumed that would be sufficient, but it appears to make no difference to this issue.

Telerik version is 2009.3.1314.35.

Thanks in advance.
dmw
Top achievements
Rank 1
 answered on 28 Oct 2010
1 answer
113 views
I am using a RadNumericTextBox within a grid and within a radwindow. When entering non-numeric values within a radNumeric Textbox created through a TemplateColumn, a warning symbol is displayed within the textbox, but this is not displayed when entering non-numeric values in a Radnumeric textbox created on a page. What is the reason and how to get it working uniformly in both cases?

 
Dimo
Telerik team
 answered on 28 Oct 2010
1 answer
125 views
I have a unique situation where a grid is inside of a div that is hidden by default and can be shown when something else is clicked on the page (All done thru javascript). The grid is inside this toggle div. I want to the ScrollHeight to be 250px but if the contents of the grid is less than 250px i want to size the grid to fit the contents. I have tried using examples like this one: http://www.telerik.com/help/aspnet-ajax/grdresizegridwithscrollingwhenlessdata.html but if the div is not already expanded/showing the size of the grid sets to 0px [the masterTable clientHeight] thus no content being shown. Any ideas on how to get this to work even if the grid is not "visible" on the screen at the time the data is bound?

<div style="display:none">
RAD GRID HERE
</div>
Dimo
Telerik team
 answered on 28 Oct 2010
1 answer
61 views
        I am developing a program  that save different  worker  in each day  to database. Finally, I need to show all workers  in each day grid of calendar.  please give me an example ,  
        I am worring now! Please help me ! Thank you very much !
Dimo
Telerik team
 answered on 28 Oct 2010
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
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
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?