Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
891 views

Hello.  I have a form with two drop down lists, one to select a month and another to select a year.  However, I cannot get them to drop down so the user can make a selection.  I have checked to make sure they are enabled and that they have items.  What could be causing this?  The other fields on the form (text boxes and buttons) work just fine.

Here is a snippet from my aspx file:

<div class="row">
     <label class="col-md-3 text-right"><span class="required">*</span> Expiration Date</label>
     <div class="col-sm-9">
          <Telerik:RadDropDownList ID="ddlMonth" DefaultMessage="Month" CssClass="form-control forgotten_txt" runat="server" Width="135px" DropDownHeight="200px" DropDownWidth="135px"></Telerik:RadDropDownList>
          <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlMonth" CssClass="alert-warning" ErrorMessage="(Required)" ValidationGroup="paymentprofile"></asp:RequiredFieldValidator>
          <Telerik:RadDropDownList ID="ddlYear" DefaultMessage="Year" CssClass="form-control forgotten_txt" runat="server" Width="135px" DropDownHeight="200" DropDownWidth="135"></Telerik:RadDropDownList>
          <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlYear" CssClass="alert-warning" ErrorMessage="(Required)" ValidationGroup="paymentprofile"></asp:RequiredFieldValidator>
          <asp:Label ID="lblErrorMessage" runat="server" CssClass="alert-warning"></asp:Label>
     </div>
</div>

In the code behind during page load, the following routine populates the month drop down list.  A similar routine is used for the year list.

Sub bindMonthDropdownlist()
    Dim item As DropDownListItem
    For month As Integer = 1 To 12
        item = New DropDownListItem()
        Dim monthName As String = Globalization.DateTimeFormatInfo.CurrentInfo.GetMonthName(month)
        item.Text = month.ToString("00") & " " & monthName
        item.Value = If(month < 10, "0" + month.ToString(), month.ToString())
        ddlMonth.Items.Add(item)
    Next
End Sub

The form is in a <div> that is initially hidden (visible="false").  I don't think that should make any difference, but I thought I should mention it.

I have tried removing the required field validator, populating the drop box lists using a table, but nothing seems to work.

Any suggestions would be greatly appreciated.

 

John
Top achievements
Rank 1
 answered on 18 Jan 2017
3 answers
160 views

I am running VS2017 RC and when I try to install the Telerik ASP.NET AJAX 2016.5.1111.0  extension, it fails to install with an error.   Below is the text from the install log

 

12/27/2016 5:18:49 AM - Microsoft VSIX Installer
12/27/2016 5:18:49 AM - -------------------------------------------
12/27/2016 5:18:49 AM - vsixinstaller.exe version:
12/27/2016 5:18:49 AM - 15.0.26014.0 built by: D15REL
12/27/2016 5:18:49 AM - -------------------------------------------
12/27/2016 5:18:49 AM - Command line parameters:
12/27/2016 5:18:49 AM - C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe,C:

\Users\e0019249\Downloads\Telerik.Web.UI.VSPackage.vsix
12/27/2016 5:18:49 AM - -------------------------------------------
12/27/2016 5:18:49 AM - Microsoft VSIX Installer
12/27/2016 5:18:49 AM - -------------------------------------------
12/27/2016 5:18:49 AM - Initializing Install...
12/27/2016 5:18:49 AM - Extension Details...
12/27/2016 5:18:49 AM - Identifier         : 057d8865-d4bb-46e8-b71e-e24fed08f4b9
12/27/2016 5:18:49 AM - Name               : Telerik ASP.NET AJAX VSExtensions
12/27/2016 5:18:49 AM - Author             : TelerikInc
12/27/2016 5:18:49 AM - Version            : 2016.5.1111.0
12/27/2016 5:18:49 AM - Description        : Telerik UI for ASP.NET AJAX VSExtensions
12/27/2016 5:18:49 AM - Locale             : en-US
12/27/2016 5:18:49 AM - MoreInfoURL        : https://visualstudiogallery.msdn.microsoft.com/4762f91c-c69f-43dc-

8a69-2ec4ab27c610
12/27/2016 5:18:49 AM - InstalledByMSI     : False
12/27/2016 5:18:49 AM - SupportedFrameworkVersionRange : [4.0,)
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - SignatureState     : Unsigned
12/27/2016 5:18:49 AM - Supported Products : 
12/27/2016 5:18:49 AM - Microsoft.VisualStudio.Pro
12/27/2016 5:18:49 AM - Version : [11.0,16.0)
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - References         : 
12/27/2016 5:18:49 AM - -------------------------------------------------------
12/27/2016 5:18:49 AM - Identifier   : Microsoft.VisualStudio.MPF
12/27/2016 5:18:49 AM - Name         : Visual Studio MPF
12/27/2016 5:18:49 AM - Version      : [11.0,16.0)
12/27/2016 5:18:49 AM - MoreInfoURL  : 
12/27/2016 5:18:49 AM - Nested       : No
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - -------------------------------------------------------
12/27/2016 5:18:49 AM - Identifier   : d4f5086c-54b9-4b07-bd22-af72d5b9228f
12/27/2016 5:18:49 AM - Name         : Telerik.CommonPackage
12/27/2016 5:18:49 AM - Version      : 
12/27/2016 5:18:49 AM - MoreInfoURL  : 
12/27/2016 5:18:49 AM - Nested       : Yes
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - -------------------------------------------------------
12/27/2016 5:18:49 AM - Identifier   : 94c35263-71d0-4f81-886e-c1e23ea9c837
12/27/2016 5:18:49 AM - Name         : Telerik UserSettings VSExtensions
12/27/2016 5:18:49 AM - Version      : 
12/27/2016 5:18:49 AM - MoreInfoURL  : 
12/27/2016 5:18:49 AM - Nested       : Yes
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - Prerequisites      : 
12/27/2016 5:18:49 AM - -------------------------------------------------------
12/27/2016 5:18:49 AM - Identifier   : Microsoft.VisualStudio.Component.Web
12/27/2016 5:18:49 AM - Name         : Web development tools
12/27/2016 5:18:49 AM - Version      : [15.0,16.0)
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - Signature Details...
12/27/2016 5:18:49 AM - Extension is not signed.
12/27/2016 5:18:49 AM - 
12/27/2016 5:18:49 AM - Searching for applicable products...
12/27/2016 5:18:49 AM - Found installed product - Microsoft Visual Studio Enterprise 2015
12/27/2016 5:18:53 AM - An extension with a matching Identifier is already installed to this product.
12/27/2016 5:18:53 AM - Found installed product - Microsoft Visual Studio Professional 2015
12/27/2016 5:18:56 AM - An extension with a matching Identifier is already installed to this product.
12/27/2016 5:18:56 AM - Found installed product - Microsoft Visual Studio Community 2015
12/27/2016 5:19:00 AM - An extension with a matching Identifier is already installed to this product.
12/27/2016 5:19:00 AM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
12/27/2016 5:19:00 AM - Found installed product - Global Location
12/27/2016 5:19:00 AM - Found installed product - ssms
12/27/2016 5:19:00 AM - Found installed product - ssms
12/27/2016 5:19:00 AM - Found installed product - Visual Studio Enterprise 2017 RC
12/27/2016 5:19:03 AM - The extension with ID '057d8865-d4bb-46e8-b71e-e24fed08f4b9' is not installed to Visual Studio 

Enterprise 2017 RC.
12/27/2016 5:19:08 AM - The following target products have been selected...
12/27/2016 5:19:08 AM - Visual Studio Enterprise 2017 RC
12/27/2016 5:19:08 AM - 
12/27/2016 5:19:11 AM - Beginning to install extension to Visual Studio Enterprise 2017 RC...
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64 declares Chip=x64, but package 

Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64 doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:11 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.Extensions.X64 declares Chip=x64, but package 

Microsoft.VisualCpp.CodeAnalysis.Extensions.X64 doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64 declares Chip=x64, but package 

Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64 doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources declares Chip=x64, but 

package Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources doesn't declare a chip
12/27/2016 5:19:12 AM - Dependency Microsoft.VisualCpp.CodeAnalysis.Extensions.X64 declares Chip=x64, but package 

Microsoft.VisualCpp.CodeAnalysis.Extensions.X64 doesn't declare a chip
12/27/2016 5:19:12 AM - Install Error : Microsoft.VisualStudio.ExtensionManager.NestedExtensionInstallException: The 

extension 'd4f5086c-54b9-4b07-bd22-af72d5b9228f' nested within '057d8865-d4bb-46e8-b71e-e24fed08f4b9' failed to install.
Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an 

instance of an object.
   at Microsoft.VisualStudio.ExtensionManager.InstallableExtensionImpl.RefreshExtractedPackageStream(IInstalledExtension 

parentExtension, IExtensionReference reference)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallNestedExtensions(InstallableExtensionImpl 

parentExtension, IInstalledExtension installedParentExtension, ZipPackage parentVSIX, InstallFlags installFlags, 

IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList 

modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallNestedExtensions(InstallableExtensionImpl 

parentExtension, IInstalledExtension installedParentExtension, ZipPackage parentVSIX, InstallFlags installFlags, 

IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList 

modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformLegacyInstall(InstallableExtensionImpl extension, 

IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList 

modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Boolean 

isPackComponent, IInstalledExtension& newExtension)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl 

extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 

extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags 

installFlags, AsyncOperation asyncOp, IInstalledExtension& newExtension)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, 

InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, 

IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, 

InstallFlags installFlags, AsyncOperation asyncOp)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, 

InstallFlags installFlags, AsyncOperation asyncOp)

 

Momchil
Telerik team
 answered on 18 Jan 2017
1 answer
89 views

Hi

I hava a problem with DropDownTree. 

When I Navigate with arrow keys between Items and Select 1 item with Pressing enter key Display Duplicate Item Text that Seperate with  ,

also I have RadAjaxManagerProxy on my page

and Version of Telerik is 2016.3.1027.45

Please help me what do I should do

Thanks

 

Ivan Danchev
Telerik team
 answered on 18 Jan 2017
4 answers
950 views

I am trying to create a RadGrid that shows RadDropDownList in both ItemTemplate and EditTemplate.

When the user clicks on the the dropdown list in ItemTemplate mode and changes the selected item and then clicks off the grid to collapse the dropdown list, the red icon does not appear in the top corner of the cell to show a change has been. When the grid is saved the changes are not saved and the value remains the same as it was before the user made the change.

However if the user clicks on the actual cell (the space on the side of the dropdown list in the same column) then changes the selected item, the red icon appears and the change is saved as expected.

I'm assuming this is because the grid only enters batch edit mode when the cell is clicked but when the dropdown list itself is clicked it remains in the ItemTemplate and shows the dropdown list that is in ItemTemplate mode.

What is the fix for this?

Code:

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sqlDisplayRegisters" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
    AllowFilteringByColumn="false" OnItemCommand="RadGrid1_ItemCommand" OnBatchEditCommand="RadGrid1_BatchEditCommand">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView AutoGenerateColumns="False" DataSourceID="sqlDisplayRegisters" DataKeyNames="RegID" EditMode="Batch" CommandItemDisplay="Bottom"
        NoMasterRecordsText="There are no registers for this selection" >
        <CommandItemSettings ShowAddNewRecordButton="false"  SaveChangesText="Submit Register" ShowCancelChangesButton="false" ShowRefreshButton="false"  />
        <CommandItemStyle Font-Size="Larger"/>
            <Columns>
                <telerik:GridBoundColumn HeaderStyle-Width="10%" DataType="System.String" DataField="P_Forename" HeaderText="Forename"
                    SortExpression="P_Forename" UniqueName="P_Forename" ReadOnly="true"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn FilterControlWidth="60%" DataField="Mark" FilterControlAltText="Filter Mark column"
                    HeaderText="Mark" UniqueName="Mark" SortExpression="Mark" DataType="System.String">
                    <HeaderStyle Width="80px" HorizontalAlign="Left" />
                    <ItemTemplate>
                         <telerik:RadDropDownList runat="server" ID="ddlMarkItem" DataSourceID="SqlDataSource1" DataValueField="Code" DataTextField="Description"
                             SelectedValue=<%# Eval("Mark") %> >
                        </telerik:RadDropDownList>
                    </ItemTemplate>
                    <EditItemTemplate>
                         <telerik:RadDropDownList runat="server" ID="ddlMarkEdit" DataSourceID="SqlDataSource1" DataValueField="Code" DataTextField="Description">
                        </telerik:RadDropDownList>                                   
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
</telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 18 Jan 2017
1 answer
144 views
Can we have two controls in the same column of Radgrid batch edit (please see the attachment). If it is possible, it would be great, if you could provide me a working sample as soon as possible. Looking forward for your response. 
Viktor Tachev
Telerik team
 answered on 18 Jan 2017
6 answers
377 views

So this is a strange one.  I just updated to the latest 2016 Q2 and since then I cannot put a space into a textbox.  I've tried both a radTextBox and a standard asp:textbox and neither works.  I rolled back to the previous build and it started working immediately.  Put Q2 back and it fails.  Curious if anyone else is seeing the same.

Richard

 

Veselin Tsvetanov
Telerik team
 answered on 18 Jan 2017
0 answers
121 views

Hi All,

How can I change value 1 to Pending/2 to Submit/etc. in my Multicolumn Header Grid that is Created Dynamically.

before I'm just using this code to my template in aspx:

<asp:Label ID="lblStatus" Runat="server" Font-Size="Medium" Text='<%# FormatStatus(DataBinder.Eval(Container.DataItem, "Status"))%>'

Now how to apply this in codebehind with my grid which is created dynamically

My grid looks like this

----------------------------------------------------------------------------------------------

                                          Task1                             Task2

Project Name             Status         Date             Status         Date 

-----------------------------------------------------------------------------------------------

Project 1                       2            1/1/2017              1

------------------------------------------------------------------------------------------------

 

Thanks in advance,

RJ

 

RJ
Top achievements
Rank 1
 asked on 18 Jan 2017
9 answers
804 views
Hi,

I'm using the multicolumn headers feature of the RadGrid control, and generate the multicolumn headers dynamically. Unfortunately the top header disappears after a postback. When I refresh the page, the top header is back again.

My aspx:
<table>
    <tr><td>Start date*</td>
        <td><telerik:RadDatePicker ID="RadDatePicker1" runat="server" EnableScreenBoundaryDetection="false">
                <DateInput DisplayDateFormat="d-M-yyyy"></DateInput>
                <DatePopupButton ToolTip="Open de kalender"></DatePopupButton>
            </telerik:RadDatePicker></td>
        <td>End date*</td>
        <td><telerik:RadDatePicker ID="RadDatePicker2" runat="server" EnableScreenBoundaryDetection="false">
                <DateInput DisplayDateFormat="d-M-yyyy"></DateInput>
                <DatePopupButton ToolTip="Open de kalender"></DatePopupButton>
            </telerik:RadDatePicker></td>
        <td><telerik:RadButton ID="DatumButton" runat="server" Text="Ok"
                onclick="DatumButton_Click">
            </telerik:RadButton>
        </td>
    </tr>
</table>
 
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" OnSelectedCellChanged="RadGrid1_SelectedCellChanged">
    <MasterTableView DataKeyNames="myDataKeyName">
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true" >
        <Selecting CellSelectionMode="SingleCell" />
    </ClientSettings>
</telerik:RadGrid>

My Code behind:
protected void Page_Load(object sender, EventArgs e)
        {
            if (RadDatePicker1.SelectedDate == null)
            {
                RadDatePicker1.SelectedDate = DateTime.Today;
            }
 
            if (RadDatePicker2.SelectedDate == null)
            {
                RadDatePicker2.SelectedDate = DateTime.Today.AddDays(6);
            }
             
            if (!Page.IsPostBack)
            {
                GetGrid();
            }
        }
 
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GetMyDataList();
        }
 
        protected void RadGrid1_SelectedCellChanged(object sender, EventArgs e)
        {
            GridTableCell d = RadGrid1.SelectedCells[0];
 
            if (d.Text == "1")
            {
                d.Text = " ";
            }
            else
            {
                d.Text = "1";
            }
 
            d.Selected = false;
        }
 
        private void GetGrid()
        {
            DateTime startDate = Convert.ToDateTime(RadDatePicker1.SelectedDate);
            DateTime endDate = Convert.ToDateTime(RadDatePicker2.SelectedDate);
 
            GridBoundColumn cCode = new GridBoundColumn();
            RadGrid1.MasterTableView.Columns.Add(cCode);
            cCode.HeaderText = "Code";
            cCode.DataField = "Code";
            cCode.UniqueName = "Code";
            cCode.ReadOnly = true;
            cCode.ItemStyle.Width = 50;
 
            GridBoundColumn cDescription = new GridBoundColumn();
            RadGrid1.MasterTableView.Columns.Add(cDescription);
            cDescription.HeaderText = "Description";
            cDescription.DataField = "Description";
            cDescription.UniqueName = "Description";
            cDescription.ReadOnly = true;
            cDescription.ItemStyle.Width = 250;
 
            while (startDate <= endDate)
            {
                string day = startDate.ToString("dddd").Substring(0, 2);
                string date = startDate.ToString("dd-MM");
 
                GridColumnGroup columnGroup = new GridColumnGroup();
 
                columnGroup.HeaderText = string.Format("{0} {1}", day, date);
                columnGroup.Name = startDate.ToString("yyyyMMdd");
 
                RadGrid1.MasterTableView.ColumnGroups.Add(columnGroup);
                List<MyList> listMyList = GetMyList();
                for (int i = 0; i < listMyList.Count; i++)
                {
                    GridBoundColumn column = new GridBoundColumn();
                    RadGrid1.MasterTableView.Columns.Add(column);
                    column.HeaderText = listMyList.ElementAt(i).myElement;
                    column.UniqueName = listMyList.ElementAt(i).myElement + "_" + startDate.ToString("yyyyMMdd");
                    column.ColumnGroupName = startDate.ToString("yyyyMMdd");
                    column.DataField = " ";
                    column.ItemStyle.Width = 50;
                }
                startDate = startDate.AddDays(1);
            }
        }

When I took the GetGrid function out of the if(!Page.IsPostback), the behavior of the grid did not change. The top header still disappears after a postback, but not after a refresh.

Can you please help me solve this? Thanks!
RJ
Top achievements
Rank 1
 answered on 18 Jan 2017
3 answers
237 views

Can I run a standard ASP.NET compare validator on the autocompletebox? I want to test if the initial value was changed. If not trigger it. I running this in dropdownlist mode.

 

Thanks!

Nencho
Telerik team
 answered on 18 Jan 2017
0 answers
116 views

Hi,

I am trying to evaluate and build around radgrid, in my current situation i have 15 grids (each in its own individual user control) to display in a single page "so i have 15 user control, with 1 grid in each user control". To accomplish this i am trying to perform lazy load which will initiate loading each grid once page loaded (we don't want customer starring at white screen while system fetching data from database, it could take as long as 60-200seconds to load entire page).

Now issue starts when each grid finish loading. Once each grid finish loading, vertical scrollbar goes back to last position or to top of page based on last location of scrollbar. It would be very annoying, lets say customer looking at 5th grid "while other grids are still loading" and page scroll back to different position as any other grid finish loading.

In my current page i am using XMLHttpRequest to post request to get different grids (using this method i can call as many grids as i want without effecting scroll bar).

I am wasting to much time to see if it can work, here i am attaching Page with user control, in case if anyone can help.

Seems it is not allowed to upload rar file, so here is rar file with 4 files inside https://www.datafilehost.com/d/3c8fa347

While page loading grids, you can scroll down and you will notice it goes back right to top when any grid finish loading at bottom of page.

Regards,

Waqar

Waqar
Top achievements
Rank 1
 asked on 18 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?