Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views

hiii,
i am using treelist and treeview both.
and i am having checkbox inside it.
i am fetching checked items from database and binding it to treelist or treeview.

it is binding correctly but not able to display the count at parent level
i want to display the count of checked item count at parent level in treelist

Plz help me.

Viktor Tachev
Telerik team
 answered on 31 Aug 2015
6 answers
135 views
Exception type: TargetInvocationException 
    Exception message: Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat)
   at System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember)
   at System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember)
   at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)
   at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat)
   at Telerik.Web.UI.RadComboBox.DescribeComponent(IScriptDescriptor descriptor)
   at Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control)
   at Telerik.Web.UI.RadDataBoundControl.GetScriptDescriptors()
   at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Value cannot be null.
Parameter name: registration
Krishnat
Top achievements
Rank 1
 answered on 31 Aug 2015
1 answer
218 views

Hi,

 I have a RadWindow which opens up on the click event of a rad button present in each row of a RadGrid.

The RadWindow doesn't open on the single click for the first time (it takes double click for the first time) and opens in single click the next time.

Please see the code below and not sure if I am missing some thing.

Thanks!

ASPX:

<telerik:GridTemplateColumn HeaderText="Order Now" AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10%" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:LinkButton ID="gvlnkbtnViewMenu" runat="server" Text="View" CommandName="VIEW" CausesValidation="false" ToolTip="Open PDF" ForeColor="#B72B3C" Font-Bold="false" Font-Underline="true"></asp:LinkButton>
                            </ItemTemplate>

</telerik:GridTemplateColumn>​

  <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <Windows>
               <telerik:RadWindow ID="UserListDialog" runat="server" Modal="true" OnClientShow="setWindowsize" VisibleStatusbar="false" Title="" >
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>

 function ShowEditForm(id, rowIndex) {
                var grid = $find("<%= radGridPrintStatus.ClientID %>");
                    var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                    grid.get_masterTableView().selectItem(rowControl, true);
                    window.radopen("Viewer.aspx?ID=" + id, "UserListDialog");
                    return false;
             }

ASPX.CS :

 protected void radGridPrintStatus_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName.ToUpper().Equals("VIEW"))
            {
                GridDataItem item = (GridDataItem)e.Item;
                string rowId = item["MenuId"].Text;
                LinkButton editLink = (LinkButton)item.FindControl("gvlnkbtnViewMenu");
                editLink.Attributes["href"] = "javascript:void(0);";
                editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", rowId, e.Item.ItemIndex);              
            }

Danail Vasilev
Telerik team
 answered on 31 Aug 2015
1 answer
113 views

I have some cascading comboboxes.  No matter where I am when I start, when I select the first and the other is updated, the 1st keeps focus, but the page scrolls up so that the ​1st control is at the very bottom of the browser window.  What can I do to change this?

 

<table>
    <tr>
        <td>
            <asp:Label ID="lblPosition" runat="server" CssClass="Label"></asp:Label>
        </td>
        <td>
            <CW:ComboBox ID="rcbPosition" DataTextField="PosName" DataValueField="PosNum" Width="204px"
                runat="server" OnSelectedIndexChanged="rcbPosition_SelectedIndexChanged" AutoPostBack="true"
                CausesValidation="false" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectSaveChangesToAllSessions">
                <Items>
                    <Telerik:RadComboBoxItem Text="<%$Resources:LanguageResource, AllPositions%>" Value="0" />
                </Items>
            </CW:ComboBox>
        </td>
        <td>
            <asp:Label ID="lblSubPosition" runat="server" CssClass="Label"></asp:Label>
        </td>
        <td>
            <CW:ComboBox ID="rcbSubPosition" Width="204px" runat="server" DataTextField="SubPosName"
                DataValueField="SubPosNum" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectSaveChangesToAllSessions">
                <Items>
                    <Telerik:RadComboBoxItem Text="<%$Resources:LanguageResource, AllSubPositions%>"
                        Value="0" />
                </Items>
            </CW:ComboBox>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="lblDistrict" runat="server" CssClass="Label"></asp:Label>
        </td>
        <td>
            <CW:ComboBox ID="rcbDistrict" DataTextField="DistName" DataValueField="DistNum" Width="204px"
                runat="server" OnSelectedIndexChanged="rcbDistrict_SelectedIndexChanged" AutoPostBack="true"
                CausesValidation="false" AppendDataBoundItems="true" OnClientSelectedIndexChanged="SelectSaveChangesToAllSessions">
                <Items>
                    <Telerik:RadComboBoxItem Text="<%$Resources:LanguageResource, AllDistricts%>" Value="0" />
                </Items>
            </CW:ComboBox>
        </td>
        <td>
            <asp:Label ID="lblBuilding" runat="server" CssClass="Label"></asp:Label>
        </td>
        <td>
            <CW:ComboBox ID="rcbBuilding" DataTextField="BuildName" DataValueField="BuildNum"
                Width="204px" runat="server" OnClientSelectedIndexChanged="SelectSaveChangesToAllSessions">
                <Items>
                    <Telerik:RadComboBoxItem Text="<%$Resources:LanguageResource, AllBuildings%>" Value="0" />
                </Items>
            </CW:ComboBox>
        </td>
    </tr>
</table>
<Telerik:RadAjaxManagerProxy ID="RadAjaxManagerCourse" runat="server">
    <AjaxSettings>
        <Telerik:AjaxSetting AjaxControlID="rcbPosition">
            <UpdatedControls>
                <Telerik:AjaxUpdatedControl ControlID="rcbSubPosition" LoadingPanelID="LoadingPanel2" />
            </UpdatedControls>
        </Telerik:AjaxSetting>
        <Telerik:AjaxSetting AjaxControlID="rcbDistrict">
            <UpdatedControls>
                <Telerik:AjaxUpdatedControl ControlID="rcbBuilding" LoadingPanelID="LoadingPanel2" />
            </UpdatedControls>
        </Telerik:AjaxSetting>
         
    </AjaxSettings>
     
</Telerik:RadAjaxManagerProxy>
 
<telerik:RadAjaxLoadingPanel ID="LoadingPanel2" runat="server" />​

Viktor Tachev
Telerik team
 answered on 31 Aug 2015
4 answers
155 views

The autocomplete box is rendered in a div element, other controls just in a span. ​If I ​assign a label to a Telerik control, the control is placed right of the label, but the auto complete box is placed underneath (as it's a div, not just a span).

 

Can I somehow change that behavior?

Nessi
Top achievements
Rank 1
 answered on 31 Aug 2015
7 answers
1.6K+ views
On my radgrid, I have EditFormSettings EditFormType set to WebUserControl.  Inside that WebuserControl, I have a submit button and a delete button.  And I know that you can close these by setting the CommandName to Update or Cancel.  However, this is not working when I have the another control nested inside that control. 

Can I close these windows explicitly either through js or the codebehind?  I'm not sure but I think my problem is that I have a control nested inside another control. Both have the commandnames set to Update and Cancel.  There must be some conflict?

Thanks in advance.

Vince
Abitar
Top achievements
Rank 1
 answered on 31 Aug 2015
2 answers
218 views

In the ListBox ItemTemplate Demo, a numeric textbox is included to allow users to enter order Quantity. No problem creating a similar item template. No problem passing item.Value to SqlParameter and inserting to database. But I cannot figure out how to grab a value from a textbox and pass that as another parameter.

Code below passed an empty string or NULL to @Quantity: 

 

 foreach (RadListBoxItem item in collection)
                {
                    cmd4.Parameters.Clear();
                    cmd4.Parameters.AddWithValue("@Product_ID", item.Value);
                    cmd4.Parameters.AddWithValue("@Quantity", Convert.ToInt32(item.FindControl("RadNumericTextBox1.Text") as TextBox));
                    cmd4.ExecuteNonQuery();
                }​

A few articles I found suggest textbox values are lost during postback? Anyone else run into this problem? Advice appreciated.

 

                              

Aneliya Petkova
Telerik team
 answered on 31 Aug 2015
5 answers
1.3K+ views
1. How do I set RadDatePicker to ReadOnly mode so that it prints better (Enabled = False prints light).
2. How do I hide the calendar icon in ReadOnly mode?    RadComboBox has .ShowToggleImage = False but not RadDatePicker.
Eyup
Telerik team
 answered on 31 Aug 2015
3 answers
459 views

Hi guys, 

      could someone possibly explain me what is the most correct way how to use radeditor in MVC project?

 

Thanks you !

Ianko
Telerik team
 answered on 31 Aug 2015
6 answers
129 views
not sure why I am getting below issue.
Unknown server tag 'telerik:GanttResourceColumn'.
Bozhidar
Telerik team
 answered on 31 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?