Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
284 views
Hello,

I am following the my portal demo. I have created app with similar functionality.

I have combobox with treeview embeded in it. On clicking tree nodes I add the Docks to the raddockzone.

Now I want to add "AsyncPostBackTrigger " to the treeview  which is inside the combobox so that when I hit "NodeClick" event then rest of the docks should not load again. Oly newly added dock should get impacted.

If I try to add the AsyncPostBackTrigger to Node click then I get the following error.

A control with ID 'RadTreeViewCustSupportReports' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: A control with ID 'RadTreeViewCustSupportReports' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.


Treeview inside the combobox:
<telerik:RadComboBox ID="RadComboReports" runat="server" AllowCustomText="true" EmptyMessage="-- Select Report --"
                           Height="300px" ShowToggleImage="True" Skin="Default" Width="275px">
                           <ItemTemplate>
                               <div id="div1">
                                   <telerik:RadTreeView ID="RadTreeViewCustSupportReports" runat="server" OnNodeClick="RadTreeViewCustSupportReports_NodeClick"
                                       Skin="Vista" Width="100%">
                                       <Nodes>
                                           <telerik:RadTreeNode runat="server" ImageUrl="~/Images/chart_pie.png" Text="Avg Response Time"
                                               Value="~/Internal/Dashboard/Reports/CSMD_Average_Response_Time.ascx">
                                           </telerik:RadTreeNode>
                                           <telerik:RadTreeNode runat="server" ImageUrl="~/Images/chart_pie.png" Text="Avg Resolution Time Frontline"
                                               Value="~/Internal/Dashboard/Reports/CSMD_Average_Resolution_Time_FL.ascx">

Update panel where raddoclayout is placed:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
    <ContentTemplate>
        <Martinbeeby:RadDockLayoutNew ID="RadDockLayout1" runat="server" OnLoadDockLayout="RadDockLayout1_LoadDockLayout"
            OnSaveDockLayout="RadDockLayout1_SaveDockLayout">
            <table style="width: 100%; padding-top: 4px;" cellpadding="0" cellspacing="0" border="0">
                <tr align="left" style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px;
                    padding-right: 0px;">
                    <td style="vertical-align: top; width: 267px; padding-left: 0px; padding-right: 0px;">
                        <Martinbeeby:RadDockZoneNew ID="RadDockZone1" runat="server" MinHeight="500px" Width="267px"
                            BorderStyle="None">

AsyncPostBackTrigger:

</Martinbeeby:RadDockLayoutNew>
            </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="RadTreeViewCustSupportReports" EventName="NodeClick" />
            </Triggers>
        </asp:UpdatePanel>


How to add this trigger ?

Dobromir
Telerik team
 answered on 11 May 2011
1 answer
57 views
Hi,

 I got a question, is there any way to recognize inside the page_load event, that the page is at the moment in rad window or not ?.

Regards,
Tomek
Marin Bratanov
Telerik team
 answered on 11 May 2011
3 answers
69 views
Hello,i want get ControlID (<asp:image />) but this controlID belong ItemTemplate tag of Radgrid
This's CODE
<Columns>       
        <telerik:GridClientSelectColumn UniqueName="column1">
        </telerik:GridClientSelectColumn>       
        <telerik:GridTemplateColumn UniqueName="TemplateColumn">
            <ItemTemplate>
                  <asp:Image ID="okimg" BorderWidth="0px"  ImageUrl="hinh/MailFlagRed.png"
                               Style="float: right; cursor: pointer;" runat="server">
                            </asp:Image>
            </ItemTemplate>
        </telerik:GridTemplateColumn>       
    </Columns>
I also have two topics need help
http://www.telerik.com/community/forums/aspnet-ajax/grid/help-expand-button-in-radgrid.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/clientselectcolumn-in-radgrid.aspx
Please Help Me
THANKS
Tsvetina
Telerik team
 answered on 11 May 2011
1 answer
55 views
Hello,

I currently have a RadGrid that has multiple columns with Auto Generated filters. The last column in the grid is a select column which I do not want a filter at the top of. I tried to fix this by adding an empty <FilterTemplate>&nbsp;</FilterTemplate>. This worked and removed the filter from above the select column, but none of my filters work now. If there a reason why this is happening?

My code is posted below:
<telerik:radgrid runat="server" DataSourceID="dsFindNavCustomers" 
    GridLines="None" ID="grdCustomers" AutoGenerateColumns="False" 
    AllowPaging="True" AllowSorting="True" PageSize="15" 
    AllowFilteringByColumn="True" CellSpacing="0">
    <PagerStyle Mode="Slider" />
    <FilterItemStyle HorizontalAlign="Left" />
    <MasterTableView datasourceid="dsFindNavCustomers"
        nomasterrecordstext="There are no customers matching your filters.">
        <Columns>
            <telerik:GridTemplateColumn DataField="No." HeaderText="Customer No." UniqueName="CustomerNo">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerNo" runat="server" Text='<%# Container.DataItem("No.") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left" 
                    Font-Strikeout="False" Font-Underline="False" Width="100px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Name" HeaderText="Customer Name" FilterControlWidth="120px"
                UniqueName="Name">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                    <asp:Label ID="lblCompanyName" runat="server" 
                        Text='<%# Eval("Company Name") %>' Visible="False"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="200px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="Contact" HeaderText="Contact Name" FilterControlWidth="120px"
                UniqueName="Contact">
                <ItemTemplate>
                    <asp:Label ID="lblContactPersonName" runat="server" 
                        Text='<%# Eval("Contact") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="City" HeaderText="Bill-to City" FilterControlWidth="110px"
                UniqueName="City">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerCity" runat="server" Text='<%# Eval("City") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="125px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn DataField="State" HeaderText="Bill-to State" FilterControlWidth="50px"
                UniqueName="State">
                <ItemTemplate>
                    <asp:Label ID="lblCustomerState" runat="server" Text='<%# Eval("State") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" HorizontalAlign="Left"
                    Font-Strikeout="False" Font-Underline="False" Width="65px" Wrap="True" />
                <ItemStyle HorizontalAlign="Left" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="select">
                <ItemTemplate>
                    <asp:LinkButton ID="btnSelectCustomer" runat="server" CausesValidation="false" 
                        CommandName="Select" Text="Select"></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Width="40px" Font-Bold="True" Font-Italic="False" HorizontalAlign="Left"
                    Font-Overline="False" Font-Strikeout="False" Font-Underline="False" 
                    Wrap="True" />
                <FilterTemplate>
                       
                </FilterTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
    <clientsettings>
        <selecting enabledragtoselectrows="False" />
    </clientsettings>
</telerik:radgrid>

Any help would be greatly appreciated.
Thanks,
Ryan Pope
Pavlina
Telerik team
 answered on 11 May 2011
3 answers
113 views
Hello,

How can I tell RadComboBox, which column to search in, when I type something in the textbox?

Also How can I do contains search rather then starts with search?

Thanks.
Jimmy.
Dimitar Terziev
Telerik team
 answered on 11 May 2011
3 answers
107 views

Hello,

Every created appointment, there is gape in Appointment Scheduler slot. It is not show the full color in that appointment slot and it remain some space. It created a lot of problem when we try to manipulate lunch and block time. It created appointment in remaining gape area. It should not occurred this type of gape.

Also, I attached the related file of this problem.

Please help me as soon as possible.

Thanks


Best Regards


Mutum Jiten Singh

Peter
Telerik team
 answered on 11 May 2011
3 answers
120 views
Hi

I am using form edit in RadGrid. And am using following code.

<asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>&nbsp;
<asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
</asp:Button>


But the problem is, it not at all firing the client side OnCommand event.

Please help me.


Thanks,
John.
Marin
Telerik team
 answered on 11 May 2011
1 answer
59 views
Hello,

I have been using this piece of code for a long time and it works fine, but after upgrading to Q1 2011 it fails because the if condition became false:

If e.Column.ColumnType = "GridBoundColumn" Then
      Select Case e.Column.DataType.Name
        Case "Int32"
           .....

I have read in section "What is fixed" in Q1 2001 the following: "Fixed: RadGrid does not create GridNumericColumn for int data type when AutoGenerateColumns=true "

On the other hand, this is what it's said in RadGrid Column types documentation:
"Automatically-generated columns are always of type GridBoundColumn."

And this is a fragment of a forum thread message:
"Well if the column's are AutoGenerated I don't see how any of them would be one of those specific types, since they should all be GridBoundColumn."

¿Could you please tell me which column type is the correct one for an auto generated column with integer data bound?.

Thanks in advance

Tsvetina
Telerik team
 answered on 11 May 2011
1 answer
170 views
Version: 2010.2.929.40
VS 2010, C# 4.0

I'm adding a CustomValidator to a RadAsyncUpload control.  I found the post that states that the ControlToValidate must NOT be set to validate this type of control, so I am not setting it.

The validation works, and the error shows up, but Microsoft's built-in function ValidatorSetFocus(val, event) { is being overridden by the method in Telerik.Web.UI.Input.TextBox.RadInputScript.js, and that method is dependent upon the ControlToValidate and is throwing a JavaScript error when trying to set the style of the rad upload control.

This is what is being executed in lieu of Microsoft's code.  g is always null because d.controltovalidate is undefined so getting/setting g.style causes the "there is no 'style' property in 'null'" exception.

if(typeof(ValidatorSetFocus)=="function"){ValidatorSetFocus=function(d,a){var g;
if(typeof(d.controlhookup)=="string"){var f;
if((typeof(a)!="undefined")&&(a!=null)){if((typeof(a.srcElement)!="undefined")&&(a.srcElement!=null)){f=a.srcElement;
}else{f=a.target;
}}if((typeof(f)!="undefined")&&(f!=null)&&(typeof(f.id)=="string")&&(f.id==d.controlhookup)){g=f;
}}if((typeof(g)=="undefined")||(g==null)){g=document.getElementById(d.controltovalidate);
}var c=false;
if((g.style)&&(typeof(g.style.visibility)!="undefined")&&(g.style.visibility=="hidden")&&(typeof(g.style.width)!="undefined")&&(document.getElementById(g.id+"_text")||document.getElementById(g.id+"_dateInput_text"))&&(g.tagName.toLowerCase()=="input"||g.tagName.toLowerCase()=="textarea")){c=true;
}if((typeof(g)!="undefined")&&(g!=null)&&(g.tagName.toLowerCase()!="table"||(typeof(a)=="undefined")||(a==null))&&((g.tagName.toLowerCase()!="input")||(g.type.toLowerCase()!="hidden"))&&(typeof(g.disabled)=="undefined"||g.disabled==null||g.disabled==false)&&(typeof(g.visible)=="undefined"||g.visible==null||g.visible!=false)&&(IsInVisibleContainer(g)||c)){if(g.tagName.toLowerCase()=="table"&&(typeof(__nonMSDOMBrowser)=="undefined"||__nonMSDOMBrowser)){var e=g.getElementsByTagName("input");
var b=e[e.length-1];
if(b!=null){g=b;
}}if(typeof(g.focus)!="undefined"&&g.focus!=null){if(c&&document.getElementById(g.id+"_text")){document.getElementById(g.id+"_text").focus();
}else{if(c&&document.getElementById(g.id+"_dateInput_text")){document.getElementById(g.id+"_dateInput_text").focus();
}else{g.focus();
}}Page_InvalidControlToBeFocused=g;
}}};

Here is my client side validator for the RadAsyncUpload control.  Nothing different than what is in the forum posts except for that in my case rau does not have a GetUploadedFiles() method so I go directly to the internal property _uploadedFiles.  Not sure why that is the case.
function radAsyncUpload_OnClientValidate(source, arguments) {
    var rau = $find("<%= rauUpload.ClientID %>");
    arguments.IsValid = rau._uploadedFiles.length > 0;
}

Anyone have any thoughts??  I can't see why the RadInputControl.ValidatorSetFocus would be overriding the validation on an upload control...

Thanks!
Thad
Genady Sergeev
Telerik team
 answered on 11 May 2011
6 answers
145 views
Hi,
I'm trying to implement selection list for lookup tables in the Radgrid popup edit/insert form.
I'd like to use Radcomboboxes with Radgrid as Item Template as described here: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridincombobox/defaultvb.aspx?product=grid
My scenario is a little bit different, because the RadComboBox i want to populate with the selection is in the edit form, and I don't know how to access this control. FindControl("RadComboboxName") returns "Nothing".
Thanks in advance.
D
daniele
Top achievements
Rank 1
 answered on 11 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?