Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
96 views

What I am trying to achieve is on selected index changed of a radcombobox in edit mode of a radgrid in cleint side.

I got the event  handled. But I cant get the button from the radgrid column. The foundelement.hide() or show() is returning a js error that show or hide is not a function. Please help.

 

    function OnClientSelectedIndexChanged(sender, eventArgs) {
                var item = eventArgs.get_item();
                var node = getElement(sender.get_element());

                var foundElement = null;
                while (node) {
                    foundElement = $telerik.findElement(node, "FTPDetailsButton2");
                    if (foundElement)
                        break;
                    node = getElement(node.parentNode);
                }

                if (foundElement) {
                    if (item.get_text() == "FTP") { foundElement.show();}
                    else { foundElement.hide();}
                }
            }

Vishakh
Top achievements
Rank 1
 asked on 06 Oct 2017
1 answer
179 views

Hey

I show a list of values to the user. If the user types a value that's not in the list, it must be added to the list.

I try to do this in OnClientBlur with the following code. I start with insert at index = 0 as first step.

Next step is to add at the end of the list, but the code fails in the first step. I have attached a screendump of the error.

var items = sender.get_items();
alert('items.get_count():' + items.get_count());
sender.trackChanges();
var comboItem = new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(value);
comboItem.set_value(value);
items.insert(0, comboItem);
sender.commitChanges();

Jorgen Vester
Top achievements
Rank 1
 answered on 06 Oct 2017
1 answer
206 views

I've done this several times in the past, but the one I just added will not work. I have a GridTemplateColumn with several LinkButtons with various CommandNames and CommandArguments. When you click on the link nothing happens, the OnCommandItem code is never hit. I'm not sure what I'm missing, I even have another one on t

 

Heres the code and the markup

 

protected void rgTCDashboard_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        switch (e.CommandName)
        {
            case "E2IAdd":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
            case "VREAdd":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
            case "VREPending":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
 
        }
    }
}

 

<telerik:GridTemplateColumn HeaderText="VR&E 1-on-1" UniqueName="VRE" AllowSorting="false" AllowFiltering="false" 
    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
    <ItemTemplate>
        <asp:Image ID="imgVRE" runat="server" Visible='<%# (string)Eval("VRE") == "Done" %>' ImageUrl="../../Images/CheckMarkMedium.png"  />
        <asp:LinkButton ID="lkbVREAdd" runat="server" Text="Add" Visible='<%# (string)Eval("VRE") == "Add" %>' CommandArgument='<%# "CerId" %>' CommandName="VREAdd" />
        <asp:LinkButton ID="lkbVREPending" runat="server" Text="Pending" Visible='<%# (string)Eval("VRE") == "Pending" %>' CommandArgument='<%# "CerId" %>' CommandName="VREPending" />

    </ItemTemplate>
</telerik:GridTemplateColumn>

Eyup
Telerik team
 answered on 06 Oct 2017
0 answers
192 views

I am using a User Control form to edit the rows in the second level of my hierarchy grid

 

Here is my grid definition

<telerik:radgrid runat="server" id="RadGridUCASRefs" showfooter="false" width="100%" enableajax="true" showstatusbar="true" allowautomaticinserts="false"
onitemcommand="RadGridUCASRefs_ItemCommand" onupdatecommand="RadGridUCASRefs_UpdateCommand" onitemcreated="RadGridUCASRefs_ItemCreated"
allowaddingrecords="false" autogeneratecolumns="false" allowsorting="false" allowpagesizeselection="False" onitemdatabound="OnItemDataBoundHandler" allowautomaticupdates="false"
allowpaging="True" skin="Bootstrap" pagesize="25" onneeddatasource="RadGridUCASRefs_NeedDataSource" onprerender="RadGridUCASRefs_PreRender" cssclass="table table-striped">
<MasterTableView AutoGenerateColumns="false" DataKeyNames="Student_reference" TableLayout="Auto" EditMode="EditForms" CommandItemDisplay="Top" RetainExpandStateOnRebind="false" HierarchyLoadMode="ServerBind" EnableHierarchyExpandAll="true" HierarchyDefaultExpanded="false">
<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" allowaddingrecords="false" DataKeyNames="Student_id,course_id,qualcode" Width="100%" EnableHierarchyExpandAll="true" CommandItemDisplay="None" EditMode="EditForms" name="GridRefs">
<Columns>
<telerik:GridEditCommandColumn HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="EditCommandColumn">
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="Student_id" HeaderText="Student ID" UniqueName="Student_id" runat="server" Display="false" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="qualcode" HeaderText="Subject Code" UniqueName="qualcode" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="course_id" HeaderText="Class" UniqueName="course_id" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="subject_name" HeaderText="Subject" UniqueName="subject_name" Display="true" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="grade" HeaderText="Name" UniqueName="grade" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="complete_flag" UniqueName="complete" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Complete" UniqueName="UCASComplete" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
<ItemTemplate>
<asp:LinkButton id="btnComplete" runat="server"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn DataField="Student_reference" HeaderText="Student ID" UniqueName="Student_reference" runat="server" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true">
</telerik:GridBoundColumn>
<telerik:GridCalculatedColumn DataFields="p_surname,p_forenames" HeaderText="Name" Expression='{1} + " " + {0}' UniqueName="student_name" Display="True" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridCalculatedColumn>
<telerik:GridBoundColumn DataField="p_surname" HeaderText="Name" UniqueName="p_surname" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="p_forenames" HeaderText="Name" UniqueName="p_forenames" Display="False" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings UserControlName="~\Private\Components\Teaching\Teaching_Plan\Class_List\UCASReview.ascx" EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<SelectedItemStyle BackColor="Gray" BorderColor="Blue" BorderStyle="Dashed" BorderWidth="1px" />
</telerik:radgrid>

How do I set and get the data in the edit form for updating?

 

Suzan
Top achievements
Rank 1
 asked on 06 Oct 2017
22 answers
435 views
Hello

When I try to export the scheduler to PDF, only one page is exported/printed, though only half of the scheduler appears on the PDF.
It should have more than one page to see the whole scheduler.

I use Q3 release (2011.3.1115.35)

Thanks in advance

Rock
Top achievements
Rank 1
 answered on 06 Oct 2017
2 answers
177 views

Hello

 

We use the RadTreeView in our site and all the nodes have his own context menu. The problem is when the node tree is so long and when we show the context menu with right clic, the context menu appears a few pixels higher than the clic was done. I attach a picture of that problem.

 

The node I clic is marked in yellow. I try with the Telerik example and the problem still continue. There is no CSS or custom styles.

 

Thanks in advance

 

Alvaro
Top achievements
Rank 1
 answered on 06 Oct 2017
2 answers
192 views

Hi,
Can you please correct me where I'm wrong and educate me where I need it here -  I've just discovered that the
Parent Node property of the RadTreeNode object is read-only and a couple things come to mind.

1.
I discovered this after writing some recursive sql to retrieve an entire branch (all descendants, all levels) of a root node.  I populate my treeview via LoadOnDemand->WebMethod approach and in certain scenarios I want the option to retrieve either one level deep or the entire branch. I intended to populate the parentnode values as I built the tree but now see I cannot do that.
Do I have any options?

2.
It also seems that in a LoadOnDemand scenario, in order to re-establish your CurrentNode positioning (Selected, Focused, and In View) after a page reload you would have to (if Current Node was not a root node) load down the branch at
least to the level of the Current Node in order to establish positioning. Am I missing something? Is there a standard or best-practice approach to accomplishing this?

Why is Parent Node read-only? If the source code is available is it reasonable
to consider my own version where parent node is not read-only?

Thanks!
Eric

Darren
Top achievements
Rank 1
 answered on 05 Oct 2017
12 answers
291 views

I am continuously receiving this error within my pages (through the javascript console)

SCRIPT5007: Unable to get property 'handleEvent' of undefined or null reference

Telerik.Web.UI.WebResource.axd (647,33)

It is within this chunk of code

}}if($telerik.useDetachEvent(c)){c.detachEvent("on"+d,a);
}else{if(c.removeEventListener)

{c.removeEventListener(d,a,false);    // <<<< 
} //<<<<

}b.splice(f,1);

Me thinks something is wrong with the Telerik.Web.UI.WebResource.axd resource handler.

Rumen
Telerik team
 answered on 05 Oct 2017
22 answers
590 views
I seem to have this problem with my context menu, but only in Chrome.  In FF it displays just fine, but in Chrome it displays all the way at the bottom of the screen.  Please see the attached FF and Chrome screenshots from the same identical page.  i looked at the markup using inspector and it seems that in Chrome there are hard coded left, and top coordinates that are placing the menu at the bottom of the page.  where do these come from and how can this behavior be corrected?

Thanks!
-Mark
Rumen
Telerik team
 answered on 05 Oct 2017
0 answers
196 views

I would like to generate large XLSX and CSV file in MVC as given on below URL 

http://demos.telerik.com/aspnet-mvc/spreadstreamprocessing

I am unable to download Model and Class File above example.

1) using Telerik.Documents.SpreadsheetStreaming;
2) using Kendo.Mvc.Examples.Models.SpreadStreamProcessing;
3) DocumentSettings class

Please help me to resolve this issue.

Thanks in adv.

Atul
Top achievements
Rank 1
 asked on 05 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?