Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
205 views
Hi,

I have CellTemplate for each PivotGridRowField which is an User Control. For the first load everything works fine, but when I reorder, template is lost and instead cell normal text is displayed. Please download project from below link to see how it happens. Just replace ItemGroup with InventSite using "Drag to Reorder", you will see ItemGroup is not using template. But after than, if you expand any of ItemGroup it binds to template again. I am using version 2013.1.417.40

Download link
Tim
Top achievements
Rank 1
 answered on 06 Nov 2013
3 answers
209 views
Hi,

I have seen this:

http://www.telerik.com/community/forums/aspnet-ajax/treeview/radtreeview-client-side-scrollintoview-for-selected-node-question.aspx

and this:

http://www.telerik.com/community/forums/aspnet-ajax/treeview/scrolling-to-last-expanded-node.aspx

However it doesnt achieve the results I need.

What is happening is that when I scroll all the way down the tree view and expand the last node (at the top level nodes) then it doesnt focus on the expanded children, I need to scroll down again to view the child nodes. What I want is for the childnodes to be shown upon expanding the parent node.
Kate
Telerik team
 answered on 06 Nov 2013
1 answer
98 views

I am trying to create a RadGrid which uses the batch edit mode feature but does not use any skin. When I change the Skin property from "Default" to "" the click to edit functionality stops working. I have been able to recreate the issue with a very basic example. Is this a known issue? Is there some sort of Skin="None" that I could use instead of an empty string?

Here is my ASPX

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="" AutoGenerateColumns="False">
    <MasterTableView CommandItemDisplay="TopAndBottom" EditMode="Batch" AutoGenerateColumns="False">
        <BatchEditingSettings EditType="Cell" />
        <Columns>
            <telerik:GridBoundColumn DataField="Item1"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Item2"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


Here is my C#

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        List<Tuple<string, string>> source = new List<Tuple<string, string>>();
        source.Add(new Tuple<string, string>("First Item", "Value1"));
        source.Add(new Tuple<string, string>("Second Item", "Value 2"));
        source.Add(new Tuple<string, string>("Third Item", "Value 3"));
 
        RadGrid1.DataSource = source;
        RadGrid1.DataBind();
    }
}
Angel Petrov
Telerik team
 answered on 06 Nov 2013
1 answer
90 views
hi
how to bind a GridDropDown column in edit mode using a value from datatable.
Princy
Top achievements
Rank 2
 answered on 06 Nov 2013
5 answers
98 views
  • Hi there,

     We are using the RadEditor version 2008.1.515.20 in our application. 
    We are getting the following error when using the hyperlink manager
    Could not load file or assembly 'Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

     Please see my webconfig below.

    Web.Config


     <httpHandlers>
          <remove path="*.asmx" verb="*"/>
          <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
          <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
          <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>

    <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/>
    <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler"    validate="false" />
    <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, Version=2008.2.1001.20, PublicKeyToken=121fae78165ba3d4"
            validate="false" />
    <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
      <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
      
      </httpHandlers>
       
     <httpModules>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>

        </httpModules>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
          <remove name="ScriptModule"/>
          <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/>
         
        </modules>

        <handlers>
          <remove name="ScriptHandlerFactory"/>
          <remove name="ScriptHandlerFactoryAppServices"/>
          <remove name="ScriptResource"/>
          <remove name="WebServiceHandlerFactory-Integrated"/>
          <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          
    <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>


     <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />  

        </handlers>
      </system.webServer>

    Thanks





Ianko
Telerik team
 answered on 06 Nov 2013
14 answers
663 views
Can I format number when export to excelML in radgrid? please tell me.

thank you telerik team.
Princy
Top achievements
Rank 2
 answered on 06 Nov 2013
5 answers
101 views
I'd been experiencing problems in IE8 when using multiple file selection, selecting >1 file in browser dialog and then immediately cancelling either uploadING files or files pending TO BE uploaded.  IE would throw an exception detailed below which would then break client side scripting.  The silverlight plugin is being used by IE.

After a lot of diagnosing I identified it to due to a possible bug caused by using multiple file selection with the UploadedFilesRendering="BelowFileInput" option on the control.

I managed to replicate this issue by testing the multiple selection example which initially had no issues cancelling files.  Then when the UploadedFilesRendering="BelowFileInput" option is added cancels are broken as described (attached broken example for reference).

Please advise if there is any workaround for this issue as I still require the layout to be such that the uploaded files are listed below the file input.  Thanks in advance.

IE exception:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E)
Timestamp: Tue, 15 Oct 2013 14:18:33 UTC


Message: System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args)
   at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount, ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)
Line: 12625
Char: 1
Code: 0
URI: http://localhost:56236/RadControls_AspNetAjax/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_QsfScriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a4401a8f1-5215-4b97-a426-3601ce0fa0ff%3a16e4e7cd%3af7645509%3b%7c%7c%3a2de754c%3a3ae6d49e%3a368ab121%3a38dcf56c%3a812a75b1%3a845d48ec%3bTelerik.Web.UI%2c+Version%3d2013.2.717.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a4401a8f1-5215-4b97-a426-3601ce0fa0ff%3a86526ba7%3a874f8ea2%3aa1a4383a%3a24ee1bba%3a1e771326%3aeaae47ab%3a7165f74%3a2003d0b8%3af46195d3%3ae524c98b%3a628ebdd0%3aed16cbdc%3a19620875%3a3f6e8f3f%3a68f76a79%3a52af31a4%3a2a2fc429%3ae330518b%3a8e6f0d33%3a6a6d718d%3aa7e79140
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 
    <telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
 
    <div class="qsf-demo-canvas">
        <%-- For the purpose of this demo the files are discarded.
             In order to store the uploaded files permanently set the TargetFolder property to a valid location. --%>
        <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" />
 
        <telerik:RadProgressArea runat="server" ID="RadProgressArea1" />
    </div>
 
</asp:Content>

Hristo Valyavicharski
Telerik team
 answered on 06 Nov 2013
1 answer
73 views
Hi,

before the DropdownTree comes up, we used RadComboBox with embedded RadTreeView in the ItemTemplate.
In the Databindings of the RadTreeView there where some nice settings like this:

<DataBindings>
<telerik:RadTreeNodeBinding CheckedField="isChecked" Expanded="True" CheckableField="isSelectable" />
 </DataBindings>


Would be nice to have this settings in the DropdownTree too.

Kind Regards

Thomas
Kate
Telerik team
 answered on 06 Nov 2013
2 answers
773 views
The rows in my grid need to be updated with the value of a checkbox. The rad dropdown gets a value, then based off of that value, the checkbox gets an assigned value of 'active'(checked) or 'not active'(unchecked). When the user clicks on 'Save', each checked box will then take the ID and associate it to the ID of the dropdown list. Debugging stops at the GridCommandItem line and throws the error `Index was outside the bounds of the array.` Can someone please help me out here? I don't work with arrays much so I don't know how to fix this.

<telerik:RadDropDownList ID="MarketDropDownList" runat="server" DefaultMessage="--Select Market--" Width="200px" DataSourceID="ddlDataSource" DataTextField="MarketName" DataValueField="MarketID" AutoPostBack="true" OnSelectedIndexChanged="MarketDropDownList_SelectedIndexChanged">
</telerik:RadDropDownList>
 
<telerik:RadGrid ID="radProductsGrid" runat="server" AllowPaging="True"
                AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
                OnNeedDataSource="radProductsGrid_NeedDataSource"
                OnSortCommand="radProductsGrid_SortCommand" PageSize="100" CellSpacing="0">
  <MasterTableView AllowMultiColumnSorting="false"
                    AllowNaturalSort="false" AllowSorting="true" AutoGenerateColumns="false"
                    Width="100%">
 
                    <CommandItemTemplate>
                        <telerik:RadComboBox ID="RadComboBox1"  DataTextField="ProductID" DataValueField="ProductID" runat="server"> 
                        </telerik:RadComboBox>
                    </CommandItemTemplate>
  
                    <Columns>
                        <telerik:GridTemplateColumn AllowFiltering="true" HeaderText="Product in Market"
                            ReadOnly="true" UniqueName="TemplateColumnCheckBox">
                            <HeaderTemplate>
                                <asp:CheckBox ID="selectAllCheckboxes" runat="server"
                                    onClick="javascript:SelectDeselectAllCheckboxes(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="ProductInMarketCheckBox" runat="server" />
                                <asp:HiddenField runat="server" ID="ProductID" Value="ProductID" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
 
                        <telerik:GridBoundColumn AllowFiltering="true" DataField="ItemNumber"
                            HeaderText="Item Number" ReadOnly="true" SortExpression="ItemNumber"
                            UniqueName="ItemNumber">
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn AllowFiltering="true" DataField="ProductName"
                            HeaderText="Product Name" ReadOnly="true" SortExpression="ProductName"
                            UniqueName="ProductName">
                        </telerik:GridBoundColumn>
 
                        <telerik:GridBoundColumn AllowFiltering="true" DataField="CategoryName"
                            HeaderText="Category Name" ReadOnly="true" SortExpression="CategoryName"
                            UniqueName="CategoryName">
                        </telerik:GridBoundColumn>
 
                    </Columns>
  </MasterTableView>
</telerik:RadGrid>
<asp:Button ID="btnAddProductToMarket" runat="server" border="0" Text="Save" ToolTip="Select Checkbox and Add Product to Market" OnClick="btnAddProductToMarket_Click" />


protected void btnAddProductToMarket_Click(object sender, EventArgs e)
        {
            int[] myArray = new int[0];
            try
            {
                GridCommandItem cmdItem = (GridCommandItem)radProductsGrid.MasterTableView.GetItems(GridItemType.CommandItem)[0];
                RadComboBox combo = (RadComboBox)cmdItem.FindControl("RadComboBox1");
                string strtxt = combo.Text;
                foreach (GridDataItem items in radProductsGrid.Items)
                {
                    if (((CheckBox)items["TemplateColumnCheckBox"].FindControl("ProductInMarketCheckBox")).Checked)
                    {
                        HiddenField ProductID = null;
                        ProductID = (HiddenField)items.FindControl("ProductID");
                        Array.Resize(ref myArray, myArray.Length + 1);
                        myArray[myArray.Length - 1] = new int();
                        myArray[myArray.Length - 1] = int.Parse(ProductID.Value);
                        //update query
                        String ConnString = ConfigurationManager.ConnectionStrings["DBConnectingString"].ConnectionString;
                        SqlConnection conn = new SqlConnection(ConnString);
                        String query = @"UPDATE vPanel_MarketMappings SET ProductID = @ProductID, MarketID = @MarketID";
                        using (SqlCommand cmd = new SqlCommand(query,conn))
                        {
                            cmd.Parameters.AddWithValue("@ProductID", ProductID);
                            cmd.Parameters.AddWithValue("@MarketID", (CheckBox)items.FindControl("ProductInMarketCheckBox"));
                            conn.Open();
                            cmd.ExecuteNonQuery();
                            conn.Close();
                        }
                    }
                }
            }
            catch ( Exception ex )
            {
                LogException( Logging.PageType.ProductManage, Logging.MessageType.Exception, ex.ToString() );
                UIUtils.ShowMessageToUser( "OnErrorMesg", this.Page );
            }
        }
Konstantin Dikov
Telerik team
 answered on 06 Nov 2013
4 answers
986 views
Dear All,

In my application i want to add validation in insert and Update for some fields. Please let me know how to add validations in the grid. Also I have found the following code in the internet which is not working for me.
<telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" UniqueName="ShipName">
    <ColumnValidationSettings EnableRequiredFieldValidation="true" EnableModelErrorMessageValidation="true">
        <RequiredFieldValidator ForeColor="Red" ErrorMessage="This field is required"></RequiredFieldValidator>
        <ModelErrorMessage BackColor="Red" />
    </ColumnValidationSettings>
</telerik:GridBoundColumn>


In the above code snippet i am getting an error that the ColumnValidationSettings is not supported. Please help me.
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?