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

I am creating a mobile website using radcomboboxes inside of update controls that are set to autopostback = true.  All of the controls work except on the page's initial load the UI elements are enlarged and look more like buttons.  They are still able to be selected and after the controls postback the elements still do not go back to a normal size. Only after a postback from another control do the UI elements shrink down to a normal size.  

I have tested the radcombobox with checkboxes enabled outside of the update panel and this behavior does not change.  I have a master page that contains jQuery files located in the header, and when I remove one of the js files, the problem disappears with the UI elements disappearing.  Can anyone help me figure out what is preventing the UI elements from rendering properly?

On Load:

   

After postback:

 

 

1 answer
74 views

Hi,

I have the following grid:


<TELERIK:RADGRID ID="RadGridProductCharacteristics" runat="server" AutoGenerateColumns="false" AllowAutomaticUpdates="true" OnItemUpdated="RadGridProductCharacteristics_ItemUpdated" OnItemDataBound="RadGridProductCharacteristics_ItemDataBound" OnItemCommand="RadGridProductCharacteristics_ItemCommand" OnPreRender="RadGridProductCharacteristics_PreRender">
	<CLIENTSETTINGS AllowGroupExpandCollapse="true" />
	<MASTERTABLEVIEW DataKeyNames="CharacteristicID" GroupLoadMode="Client" CommandItemDisplay="Top" EditMode="Batch">
		<BATCHEDITINGSETTINGS EditType="Cell" />
		<GROUPBYEXPRESSIONS>
			<TELERIK:GRIDGROUPBYEXPRESSION>
				<GROUPBYFIELDS>
					<TELERIK:GRIDGROUPBYFIELD FieldName="ParentCharacteristicName" />
				</GROUPBYFIELDS>
				<SELECTFIELDS>
					<TELERIK:GRIDGROUPBYFIELD FieldName="ParentCharacteristicName" HeaderText="Parent Characteristic" />
				</SELECTFIELDS>
			</TELERIK:GRIDGROUPBYEXPRESSION>
		</GROUPBYEXPRESSIONS>
		<COLUMNS>
			<TELERIK:GRIDBOUNDCOLUMN HeaderText="Characteristic" DataField="CharacteristicName" ReadOnly="true" />
			<TELERIK:GRIDBOUNDCOLUMN UniqueName="CharacteristicValue" HeaderText="Value" DataField="CharacteristicValue" />
			<TELERIK:GRIDTEMPLATECOLUMN HeaderText="Color" UniqueName="CharacteristicColor" DataField="CharacteristicColor">
				<ITEMTEMPLATE>
					<%# Eval("CharacteristicColor") %>
				</ITEMTEMPLATE>
				<EDITITEMTEMPLATE>
					<TELERIK:RADDROPDOWNLIST runat="server" ID="RadDropDownListColor" />
				</EDITITEMTEMPLATE>
			</TELERIK:GRIDTEMPLATECOLUMN>
			<TELERIK:GRIDBUTTONCOLUMN UniqueName="ImageButtonDelete" HeaderText="Action" ButtonType="ImageButton" ImageUrl="~/Resources/Images/icon_delete.png" CommandName="Delete" />
		</COLUMNS>
	</MASTERTABLEVIEW>
</TELERIK:RADGRID>

I would like to fill the RadDropDownListColor so it is filled when the user clicks the cell to edit the value.

I checked this article: Column Editors and from there I derived the following code:


protected void RadGridProductCharacteristics_PreRender(object sender, EventArgs e)
{
	GridTableView masterTable = (sender as RadGrid).MasterTableView;
	RadDropDownList radDropDownListColor = masterTable.GetBatchColumnEditor("CharacteristicColor") as RadDropDownList;

	radDropDownListColor.DataSource = DBCom.GetHTMLColors();
	radDropDownListColor.DataTextField = "HTMLColorName";
	radDropDownListColor.DataValueField = "HTMLColorCode";
	radDropDownListColor.DataBind();
	radDropDownListColor.Items.Insert(0, new DropDownListItem("", "0"));
}

But still the variable radDropDownListColor is null.

What am I doing wrong?

Doncho
Telerik team
 answered on 30 Mar 2023
1 answer
114 views

Iam using telerik grid of asp.net

I want to disable column "telerik:GridNumericColumn " in below code snippet on changing "telerik:GridDropDownColumn" I am not aware of how to handle selection change event of GridDropDownColumn on server side and make one column disabled.

Please help in this regard.

Regards, Kiran

 

Below is the radgrid declaration


<telerik:RadGrid ID="rg" runat="server"
                                                AllowSorting="False"
                                                AutoGenerateColumns="False" Width="730px" Height="263px"
                                                OnUpdateCommand="rg_Update"
                                                OnInsertCommand="rg_Insert"
                                                OnDeleteCommand="rg_Delete"
                                                OnItemCreated="rg_ItemCreated"
                                                OnItemCommand="rg_ItemCommand"
                                                OnSelectedIndexChanged="rg_SelectedIndexChanged"
                                                OnNeedDataSource="rg_NeedDataSource"
                                                OnDataBound="rg_DataBound"
                                                GridLines="None"
                                                CellSpacing="0"
                                                MasterTableView-Caption="Routing Rules">
                                                <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
                                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                                    <Selecting AllowRowSelect="True" />
                                                </ClientSettings>

                                                <MasterTableView CommandItemDisplay="Top" DataKeyNames="Id,IndexId">
                                                    <CommandItemSettings AddNewRecordText="Add New Routing Rule" />
                                                    <Columns>
                                                        <telerik:GridButtonColumn UniqueName="editButton" ButtonType="ImageButton" CommandName="Edit" FilterControlAltText="Filter editButton column"
                                                            HeaderText="Edit" HeaderStyle-Width="34px" ItemStyle-HorizontalAlign="Left" Resizable="false"
                                                            ImageUrl="~\Images\pencil.png">
                                                        </telerik:GridButtonColumn>
                                                        <telerik:GridButtonColumn UniqueName="deleteButton" ButtonType="ImageButton" CommandName="Delete" FilterControlAltText="Filter deleteButton column"
                                                            HeaderText="Delete" HeaderStyle-Width="47px" ItemStyle-HorizontalAlign="Left" Resizable="false"
                                                            ImageUrl="~\Images\delete.png"
                                                            ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?">
                                                        </telerik:GridButtonColumn>
                                                        <telerik:GridBoundColumn Visible="false" DataField="Id" UniqueName="RoutingRuleRuleId" ReadOnly="True" />
                                                        <telerik:GridNumericColumn DataField="Priority" UniqueName="RoutingRulePriority" HeaderText="Priority" DataType="System.Int32" MaxLength="3" />

                                                        <telerik:GridDropDownColumn
                                                            HeaderText="Rule Type" DataField="RoutingRuleDefinitionId" SortExpression="uRuleType" UniqueName="uRuleType"
                                                            ColumnEditorID="myRuleTypeDropDownEditor"
                                                            ListTextField="Name" ListValueField="Id" EnableEmptyListItem="True"
                                                            EmptyListItemValue="0" Visible="False">
                                                        </telerik:GridDropDownColumn>
</MasterTableView>
</telerik:RadGrid>

Doncho
Telerik team
 answered on 06 Mar 2023
1 answer
74 views

I have placed a RadComboBox inside a RadWindow I am using as a modal popup to capture some info. The RadComboBox is dynamically databound to a datatable result set and I can confirm that the data is loaded into the RadComboBox by clicking Up/Down arrows, I can see the other entries. However, clicking on the dropdown button, the dropbox will not expand. I have also tried the basic RadDropDownList with the same result.

I then tried an asp:DropDownList and it work's correctly. 

If I place the RadComboxBox outside of the RadWindow, it works. There are no javascript errors on the page.

 

Can anyone help?


<telerik:RadWindow ID="Results_popup" runat="server" Title="Import Results" VisibleTitlebar="true" VisibleStatusbar="false" VisibleOnPageLoad="false"
    Modal="true" Width="900px" height="600px" DestroyOnClose="True" KeepInScreenBounds="true" OnClientClose="ClosePopUpWindow_Replace"
    Behaviors="Close, Move, Resize">
    <ContentTemplate>
        <div id="inner-container" class="window-container">
            <asp:UpdatePanel ID="UpdatepanelListEdit" runat="server" UpdateMode="Conditional" RenderMode="Block" Visible="false">
                <ContentTemplate>
                        <div class="row">
                            <telerik:RadComboBox RenderMode="Lightweight" ID="drpListStatus" runat="server" Width="200" Label="Status:" />
                            <telerik:RadDropDownList ID="drpListStatusX" runat="server" />
                            <asp:DropDownList ID ="drpListStatusTmp" runat="server" CssClass="dropdown" />
                        </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </ContentTemplate>
</telerik:RadWindow>

Chris Wruck
Top achievements
Rank 2
Iron
 answered on 03 Feb 2023
1 answer
72 views
How to update/rebind RadDropDownList sql source when a user selected a value in a dropdownlist in another column?
Can you please provide a how-to example in VB.net. This is urgent. Please help.
Thanks.
Valentin Dragnev
Telerik team
 answered on 13 Dec 2022
0 answers
41 views
RadGrid running in batch edit mode. When selecting a value in dropdown "ddlPayrollId", I need to set  "StaffName" to a certain value, let's say 'Joe' . Can you please provide a VB example on how to do it!

ASPX:
 
<telerik:GridTemplateColumn UniqueName="PayrollId" DataField="PayrollId">
                        <ItemTemplate>
                            <%# Eval("PayrollId")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadDropDownList runat="server" ID="ddlPayrollId" DataValueField="PayrollId" DataTextField="PayrollId" DataSourceID="SqlDataSource1">
                            </telerik:RadDropDownList>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="StaffName" UniqueName="StaffName" ReadOnly="True"></telerik:GridBoundColumn>
Josif
Top achievements
Rank 1
 asked on 08 Dec 2022
0 answers
44 views

i'm lost on this.  I have a rad dropdown list that if I run through debugger and step through, it binds correctly showing years 2017-2022 from a SQL Query.  This is the weird part... If I build and run it on the dev server, somehow the years are being bound -1, displaying 2016-2021.  I have done a find for every reference to the dropdown and it is only accessed on two occasions - page load and on change,  what. in. the. world. is going on with this thing?

i've tried clearing the DDL, creating a new instance of DataSet, iterated through the returned dataset and bound each row individually, and everything else just short of clapping 3 times & doing the hokey pokey.

 

                DDLyear.Items.Clear();
                string yrSQL = "select year4 as TEXT, year4 as VALUE  from " + INSERT_TABLE_NAME_HERE + " group by year4 ORDER BY YEAR4 DESC";
                DataSet ds = new DataSet();
                ds = GetDataSet(yrSQL);
                DDLyear.DataSource = ds;
                DDLyear.DataBind();

 

Attached screenshots show the results running in debug and on dev server. 

Mike
Top achievements
Rank 1
 asked on 03 Nov 2022
0 answers
74 views
Hi,

I have a project whot lots of aspx pages, each one containing lot's of RadComboBoxes which are populated with declarative Data Sources :for each RadCombBox I define a certaing Object Data Source so to populate each RadComboBox whith proper items

let's consider a page in which I define:

1) the RadComboBox with rcbCDRATEINDEX ID,  which items are coming from odsTBRCFINPRICE_CDRATEINDEX Object Data Source calling the select method GetDataByCDCOMPANY
2) the RadComboBox with rcbCDrcbTPPLAN ID, which items are coming from odsTBRCFINPRICE_TPPLAN Object Data Source calling call the select method GetDataByCDCOMPANY_CUSTTYPE
3) the RadComboBox with rcbPER_SUG ID, which items are coming from odsTBRCFINPRICE_PER_SUG Object Data Source calling call the select method GetDataByCDCOMPANY_PER_SUG


<telerik:RadComboBox ID="rcbCDRATEINDEX" runat="server" DataSourceID="odsTBRCFINPRICE_CDRATEINDEX"
    DataTextField="DSRATEINDEX" DataValueField="CDRATEINDEX" Width="100%" OnClientSelectedIndexChanged="ClientRcbCDRATEINDEX_SelectedIndexChanged" />
<asp:ObjectDataSource ID="odsTBRCFINPRICE_CDRATEINDEX" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByCDCOMPANY"
    TypeName="DataAccessComponent.dsFinancialMarketAndRateTableAdapters.TCRATEINDEXTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hCDCOMPANY" DefaultValue="''" Name="CDCOMPANY" PropertyName="Value" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
...

...
<telerik:RadComboBox ID="rcbTPPLAN" runat="server" DataSourceID="odsTBRCFINPRICE_TPPLAN"
    DataTextField="DSCUSTOM" DataValueField="CUSTKEY" Width="100%" OnClientSelectedIndexChanged="ClientRcbTPPLAN_OnSelectedIndexChanged" />
<asp:ObjectDataSource ID="odsTBRCFINPRICE_TPPLAN" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByCDCOMPANY_CUSTTYPE"
    TypeName="DataAccessComponent.dsOtherTableAdapters.TBCUSTOMTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hCDCOMPANY" DefaultValue="''" Name="CDCOMPANY" PropertyName="Value" Type="String" />
        <asp:Parameter DefaultValue="DEPR_PLAN" Name="CUSTTYPE" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
...

...
<telerik:RadComboBox ID="rcbPER_SUG" runat="server" DataSourceID="odsTBRCFINPRICE_PER_SUG"
    DataTextField="DSCUSTOM" DataValueField="CUSTKEY" Width="100%" />
<asp:ObjectDataSource ID="odsTBRCFINPRICE_PER_SUG" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByCDCOMPANY_PER_SUG"
    TypeName="DataAccessComponent.dsOtherTableAdapters.TBCUSTOMTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hCDCOMPANY" DefaultValue="''" Name="CDCOMPANY" PropertyName="Value" Type="String" />
        <asp:Parameter DefaultValue="PER_SUG" Name="CUSTTYPE" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>

Now let's suppose that a developer's bug causes that the method GetDataByCDCOMPANY_CUSTTYPE produces no data.

Then an exception of this kind is generated:

Exception Message: 'System.Web.HttpUnhandledException'.

Exception StackTrace: in System.Web.UI.Page.HandleError(Exception e)
in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
in System.Web.UI.Page.ProcessRequest()
in System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
in System.Web.UI.Page.ProcessRequest(HttpContext context)
in ASP.cpwizardratecard_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\dll\5102107e\48518dac\App_Web_cpwizardratecard.aspx.cdcab7d2.dm-dka8a.0.cs:riga 0
in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
in System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

[ArgumentOutOfRangeException: Selection out of range
Parameter Name: value]
   Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +287
   Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +329
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
   Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +758
   Telerik.Web.UI.RadComboBox.PerformSelect() +21
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +76
   Telerik.Web.UI.RadComboBox.DataBind() +40
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
   Telerik.Web.UI.RadComboBox.OnPreRender(EventArgs e) +24
   System.Web.UI.Control.PreRenderRecursiveInternal() +90
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906

This kind of exception is a generic one,  because it states that a component Telerik.Web.UI.RadComboBox of the page, fails during it's Data Binding performing.

This exception don't tell me that THE RadComboBox rcbTPPLAN, which use declaratively the method GetDataByCDCOMPANY_CUSTTYPE, fails.

So every time that happens an exception like that above mentioned, we're in the panic, struggling to understand which declaratively sourced Rad Combo Box produce the error.

Is there a way to understand the rad combo box id that produced the exception?
Finwave Spa
Top achievements
Rank 1
 asked on 28 Oct 2022
1 answer
61 views

*** Thread created by Telerik by Progress staff ***
*** Please follow-up with additional details, if necessary. Thank you. ***

 

I've recently able to finally got this upgraded and are now in the same versions between the 3 dlls.  Please see what you can recommend how I can fix the issue below.  The one on the left is the upgrade version.  Please notice that there's no border around the drop down.

I have the following in the config (not complete but just related to Telerik and I've also changed to Default in the Telerik.Skin to no avail):

 

<add key="Telerik.Skin" value="Windows7" />
<add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
<add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />

<httpHandlers>
	<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
	<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
	<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
	<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
	<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
</httpHandlers>
<httpModules>
	<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
	<add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
</httpModules>
<sessionState timeout="180" />
</system.web>
<modules runAllManagedModulesForAllRequests="true">
	<remove name="RadUploadModule" />
	<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
	<remove name="RadCompression" />
	<add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
</modules>
<handlers>
	<remove name="ChartImage_axd" />
	<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
	<remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
	<add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
	<remove name="Telerik_Web_UI_DialogHandler_aspx" />
	<add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
	<remove name="Telerik_RadUploadProgressHandler_ashx" />
	<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
	<remove name="Telerik_Web_UI_WebResource_axd" />
	<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
</handlers>
</system.webServer>
<runtime>
	<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
		<dependentAssembly>
			<assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" culture="neutral" />
			<bindingRedirect oldVersion="0.0.0.0-2011.2.712.35" newVersion="2011.2.712.35" />
		</dependentAssembly>
	</assemblyBinding>
</runtime>

 

Thank you very much for your time!

Valentin Dragnev
Telerik team
 answered on 21 Oct 2022
1 answer
65 views

Hi, I want to have a column in radgrid batch edit and that column can contain either a textbox or dropdown based on a condition of the binding dataset. How can I implement this?

Thanks

Attila Antal
Telerik team
 updated answer on 04 Oct 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?