Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
186 views
Hello,

I'm working on a scenario similar to this demo, where a click on an item in a RadGrid updates other RadGrids through AJAX. That part works fine. Now, I would like the header above the automatically updated RadGrids to be updated too, based on the clicked item. The code below allows me to get the ID which was clicked in the main RadGrid.

    Private Sub RadGridResellers_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGridResellers.ItemCommand
        If (e.CommandName = "RowClick") Then
            Dim GridItem As Telerik.Web.UI.GridDataItem = e.CommandSource
            Dim ResellerID As Short = GridItem.GetDataKeyValue("id")
wState)
            ... more code ...
        End If
    End Sub

However, this event seems to be too late in the page life cycle to make changes to the header or any other control. I can store the ID into the viewstate and make my changes on a second postback, but that's not very elegant. Is there another way?
Arno
Top achievements
Rank 2
 answered on 29 Oct 2010
2 answers
112 views
Why does the advanced form have to work the way that it does? What I mean is, if I've understood correctly, the advanced form is actually just another part of the scheduler itself and so updating the advanced form, is, in fact, an update of the scheduler itself.

I wonder if it is not possible to completely divorce the advanced form from the scheduler completely. that is, have a completely independent page that queries and updates the data store directly, taking only an indication of the mode and maybe the ID of the appointment to be edited from the scheduler when it is called, maybe via the query string. 

OK, it would, I suppose, mean that the code currently in the scheduler for handling the data store operations for an update would have to be moved but updates to the scheduler itself, if needed could be stimulated using the OnClientClose callback function of the window holding the new advanced form.

I wonder if there is the ability already to do it this way as I note that the SchedulerFormMode enumeration has a "Hidden" value. I'd like to know what that's for.

I guess I'd have to catch a number of the client-side events to stop the built-in functionality from kicking in, but I'd imagine that that is quite doable.

I'd like to hear from someone at telerik towers on the above, especially on the idea of suppressing the built in forms.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 29 Oct 2010
1 answer
94 views
Hi,

I was hoping to easily trap errors such as access denied and handle those gracefully. What would be the best way to handle this as it happens alot. Thanks.
Fiko
Telerik team
 answered on 29 Oct 2010
1 answer
173 views
Hi,
I've read the previous threads on this topic but I still cannot seem to get it working consistently.
I have a radgrid that contains an Image button column. I am registering the button in this column as a post back control in the ItemCreated event of the grid. When the page first loads and I click on this button it works as expected, by doing a full postback. The problem only occurs if any other ajax update is applied to the grid, such as selecting a different page off the grid. The next time i click on the 'post back' button in the column, it will postback via ajax.

Here is my code:

void SearchResults_ItemCreated(object sender, GridItemEventArgs e)
    {
        if(e.Item is GridDataItem)
        {
            GridDataItem item = e.Item as GridDataItem;
            ImageButton publishedImgButton = item["PublishButton"].Controls[0] as ImageButton;
            if (publishedImgButton != null)
            {
                RadScriptManager.GetCurrent(this.Page).RegisterPostBackControl(publishedImgButton);
            }
        }
    }

This is the column definition in the rad grid:
<telerik:GridButtonColumn ItemStyle-HorizontalAlign="Center" HeaderText="Download PDF file" UniqueName="PublishButton" CommandName="GetPublished" ButtonType="ImageButton" ImageUrl="../../Images/Buttons/Small/document_down.png">
      <ItemStyle HorizontalAlign="Center"></ItemStyle>
</telerik:GridButtonColumn>

Thanks for your help
Pavlina
Telerik team
 answered on 29 Oct 2010
1 answer
194 views

Hello,

My project use a form decorator in a user control to skin a checkboxlist. Here is the code of the .ascx page :

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BOSSearch.ascx.cs" Inherits="UmbracoBOSControls.Controls.BOSSearch" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="BOSButton.ascx" TagName="BOSButton" TagPrefix="uc1" %>
  
  
     <telerik:RadFormDecorator runat="server" ID="rfdTopSearch" EnableEmbeddedSkins="false" Skin="TopSearch" />
  
          
        <div id="TopSearchDetail">
                <asp:CheckBoxList runat="server" ID="cbxListModules" RepeatColumns="1" RepeatDirection="Vertical"></asp:CheckBoxList>
                    </div>

Here is my css file used with the formdecorator :

/* Decorate <input type="checkbox" /> */
.RadForm_TopSearch .rfdCheckboxUnchecked,
.RadForm_TopSearch .rfdInputDisabled.rfdCheckboxUnchecked:hover
{
    background: transparent url('FormDecorator/CheckBoxSprites.png') no-repeat 0 0;
}
  
.RadForm_TopSearch .rfdCheckboxUnchecked:hover
{
    background: transparent url('FormDecorator/CheckBoxSprites.png') no-repeat 0 -200px;
}
  
.RadForm_TopSearch .rfdCheckboxChecked,
.RadForm_TopSearch .rfdInputDisabled.rfdCheckboxChecked:hover
{
    background: transparent url('FormDecorator/CheckBoxSprites.png') no-repeat 0 -420px;
}
  
.RadForm_TopSearch .rfdCheckboxChecked:hover
{
    background: transparent url('FormDecorator/CheckBoxSprites.png') no-repeat 0 -640px;
}
  
.RadForm_TopSearch label
{
    color:#FFFFFF;
    font-family:Arial;
    font-size:11px;
    text-indent:6px;
}


The display of my checkbox list is OK in IE8 and Firefox 3.6. In Safari and Chrome I just see the label of my list of checkbox. Every images are not displayed... Could you help me to find what's wrong in my code ?

Georgi Tunev
Telerik team
 answered on 29 Oct 2010
2 answers
132 views
Hello!

I use FileExplorer with custom content provider to display some documents in the virtual folder of the application, and to hide some files (config files, etc.), and to add some custom columns to the grid (date created, modified). I have a scenario where I need to display content of a sub directory of the InitialPath directory and I am using client methods to achieve it. I tried using both loadFolder and set_currentDirectory followed by fileExplorer.refresh() but the result is the same, explorer's Grid shows requested directory but the TreeView still display root directory selected (InitialPath directory), and I need it to display the requested directory expanded and selected in TreeView.
Is this a know issue and is there a workaround to achieve wanted functionality?

With regards,
Vladimir
Vladimir Gosic
Top achievements
Rank 1
 answered on 29 Oct 2010
1 answer
105 views
hi All ,
in my Application i am using Radsplitter control in that i am using tree-view, radPanel and multiview,iframe, on tree-view node click i am showing different views in that views i am using IFrame to show my Pages. here is the problem whatever i am showing in the Iframe those content are displaying in small panel even i mentioned height and width then also there is no effect. i have copied my code as follows and also i attached my UI problem images images  if u found any mistake please tell me.

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" >
  
<telerik:RadAjaxPanel ID="rjxPanel_SalesOrder" runat="server"
                    LoadingPanelID="RadAjaxLoadingPanel1" >
<telerik:RadSplitter ID="RadSplitter1" runat="server"
                 Width="100%" Height="550px"
                VisibleDuringInit="false"
                ResizeWithBrowserWindow="true"
                LiveResize="true" ResizeMode="AdjacentPane" >
                 
        <telerik:RadPane ID="RadPane_treeContracts" runat="server" Width="20%"
                MinWidth="110"  >
               <div style="float:left; margin-left:0px; text-align:left;
                            padding-right:0px;">
                <telerik:RadTreeView ID="treeContracts" runat="server" CssClass="Normal" EnableEmbeddedSkins="true" 
                         OnNodeExpand="treeContracts_NodeExpand"
                         OnNodeCollapse="treeContracts_Collapse"
                         OnNodeClick="treeContracts_NodeClick"
                         Width="100%" SingleExpandPath="true" >
                </telerik:RadTreeView>
                </div>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
        <telerik:RadPane ID="RadPane2" runat="server"  >
            <asp:MultiView ID="MultiView_Contract" runat="server">
                <asp:View ID="SalesOrderView" runat="server">
                    <asp:Panel id="panel_SalesOrder" runat="server" >
                    <div id="panel1" class="panel" runat="server" >
                        <iframe name="iframe" src="Iframe_ManageOrder.aspx?OrderID=<%=HiddenField_OrderID.Value %>"
                                width="100%" height="100%">
                        </iframe>
                    </div>
                    </asp:Panel>
                </asp:View>
                <asp:View ID="SalesBOMView" runat="server">
                     <asp:Panel id="panel_SalesBOM" runat="server" >
                    <div id="Div1" class="panel" runat="server" >
                        <iframe name="iframe" src="ManageOrderDetail.aspx?OrderID=<%=HiddenField_OrderID.Value %>"
                                width="100%" height="100%">
                        </iframe>
                    </div>
                    </asp:Panel>
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <asp:Panel id="panel_Project" runat="server" >
                    <div id="Div2" class="panel" runat="server" >
                        <iframe name="iframe" src="Iframe_ManageProject.aspx?ProjectID=<%=HiddenField_ProjectID.Value %>"
                                width="100%" height="100%">
                        </iframe>
                    </div>
                    </asp:Panel>
                </asp:View>
                <asp:View ID="View3" runat="server">
                <asp:Panel id="panel_Packing" runat="server" >
                    <div id="Div3" class="panel" runat="server" >
                     <iframe name="iframe" src="ManageProductDeliveryChelan.aspx?OrderID=<%=HiddenField_OrderID.Value %>"
                                width="100%" height="100%">
                        </iframe>
                    </div>
                </asp:Panel>
                </asp:View>
            </asp:MultiView>
        </telerik:RadPane>
</telerik:RadSplitter>
<asp:HiddenField ID="HiddenField_OrderID" runat="server" />
<asp:HiddenField ID="HiddenField_ProjectID" runat="server" />
</telerik:RadAjaxPanel>
     
<%--</fieldset>--%>
 
</asp:Content>

thank you
Dobromir
Telerik team
 answered on 29 Oct 2010
2 answers
297 views
Hi,

I need Title between Add new record and refresh button. i attached image for identify. please give me a tips for how to add title in this point.


Thanks,
Dhamu.
Dhamodharan
Top achievements
Rank 1
 answered on 29 Oct 2010
1 answer
128 views
Hello,

How can i expand the treeview nodes at a specific level.

Let say i need to expand the treeview at level 2, so all the childs node at level 2 will expand.
Level 3 : all the childs of the childs will expand and so on.

I would like that the treeview will be render every time i set a new level.

Regards,
Oren
Nikolay Tsenkov
Telerik team
 answered on 29 Oct 2010
3 answers
135 views
The following filter obviously doesn't do anything, however there is an interesting side effect.

function OnRadEditorClientLoad(editor, args) {
    editor.get_filtersManager().add(new testFilter());
}
 
testFilter = function() {
    testFilter.initializeBase(this);
    this.set_isDom(false);
    this.set_enabled(true);
    this.set_name("RadEditor Strip Table Margins");
    this.set_description("Strip table margins");
}
 
testFilter.prototype = {
    getHtmlContent: function(content) {
        return testCleanContent(content);
    }
}
 
function testCleanContent(content) {
    var TOP_LEVEL_ELEMENT_TAG = "DIV_TOP_ELEMENT";
    var dom = document.createElement(TOP_LEVEL_ELEMENT_TAG);
    Telerik.Web.UI.Editor.Utils.setElementInnerHtml(dom, content);
    var textOut = dom.innerHTML;
    return textOut;
}
 
testFilter.registerClass('testFilter', Telerik.Web.UI.Editor.Filter);

If I use Telerik.Web.UI.Editor.Utils.setElementInnerHtml(dom, content), the default content filters do not appear to fire.  However if I do this instead:

function testCleanContent(content) {
    var textOut = content;
    return textOut;
}

the default content filters do their job.

Any ideas?
Dobromir
Telerik team
 answered on 29 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?