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?
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:
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>
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>
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.
*** 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!
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