I am relatively new to RadGrid and have run into a situation when editing a record in the grid. I am able to get text values in with no issue but when trying to create a dropdown list and set it's selected value to the value from the row selected I get the following error:
" 'ddlEmpType' has a SelectedValue which is invalid because it does not exist in the list of items. "
I'm not sure where my code is wrong. Here is a snippet:
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
style="border-collapse: collapse;">
<tr class="EditFormHeader">
<td colspan="2">
<b>Employee Details</b>
</td>
</tr>
<tr>
<td>
<table id="Table3" width="450px" border="0" class="module">
<tr>
<td>Employee ID:</td>
<td>
<asp:TextBox ID="tbEmployeeID" runat="server" Text='<%# Bind("IDNUM") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>Last Name:</td>
<td>
<asp:TextBox ID="tbLastName" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>First Name:</td>
<td>
<asp:TextBox ID="tbFirstName" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>Employee Type:</td>
<td>
<asp:DropDownList ID="ddlEmpType" runat="server" SelectedValue='<%# Bind("EMP_TYPE") %>'
DataSourceID="SQL_EmpType" AppendDataBoundItems="True">
<asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update"></asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
The datasource is set up as follows:
<asp:SqlDataSource ID="SQL_EmpType" runat="server" ConnectionString="<%$ ConnectionStrings:TECU_WS %>"
SelectCommand="SELECT DISTINCT EMP_TYPE FROM vwGetEmployees v WHERE ACTIVESTATUS is not NULL">
</asp:SqlDataSource>
Hopefully this is enough information to go on.
I am fairly new to telerik and web forms but I have a page with a RadGrid and separate button for the export. When I click on the export button I get an ArgumentOutOfRangeException. I set export settings on the RadGrid as follows
<ExportSettings
IgnorePaging="true"
ExportOnlyData="true"
Excel-Format="Xlsx"
OpenInNewWindow="true">
ExportSettings>
For the export button:
protected void rbtnExport_Click(object sender, EventArgs e)
{
rgBidActivity.ExportSettings.FileName = "BidActivity";
rgBidActivity.MasterTableView.ExportToExcel();
}
So I am not sure what exactly is causing the error in the attached image. Any suggetions?
protected
void ddlSentencing_SelectedIndexChanged(object sender, EventArgs e)
{
if (selectedVal == 2 || selectedVal == 3)
{
ddlSentencing.Attributes.Add(
"onclick", "openRadWinNew(); return false;");
}
}
function openRadWinNew() {
var url = "Dialog.aspx";
var oWnd = radopen(url, "ResponsePopup").setSize(500, 300)
}
it works but always only on second click, one step behind. Can ypu please help me fix this?
Thanks
I have a radgrid that has X number of rows. On grid export item command, would it be possible to use a different datasource with Y number of rows(which is > x rows in the grid) that can be saved when exporting?
Thanks
Anitha
Hello,
I wonder if you have bootstrap themes to use in my projects?
I had a working app service that I published to azure. I have been publishing it for years. Recently it stopped working.
When I hit F12 I see the following errors:
Telerik.Web.UI.WebResource.axd:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Uncaught ReferenceError: Sys is not defined at login.aspx:232
After researching it I believe it has to do with Telerik.Web.UI.WebResource.axd
It's a large web form application so I created a new (telerik based) smaller app and tried to publish to azure but received the same error.
I have listed my web config, any thought on what could be the issue? Your help is greatly appreciated.
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="Telerik.Skin" value="Bootstrap"/>
<add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>
<add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>
<add key="Telerik.Web.UI.RenderMode" value="lightweight"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5.2"/>
<pages>
<controls>
<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
</controls>
</pages>
<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>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<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>
</configuration>
After moving our site to newer version of IIS (10.x), PDF viewer stopped working.
Is there something that it might be missing from web.config etc?
Other components are working file (upload, excel, etc). Also, PDF viewer is working on other sites on the same server.
- Mikko
While using the filter fix suggested in the documentation here , it causes an issue when tabbing into and then immediately out of a combobox.
If you tab into a combobox with the fix in place and then tab out without entering any other text, the tab out causes the suggested fix to fire sender.showDropDown(). At this point you've already moved to the next field, so I think what is happening is the dropdown gets shown then hid and in that process it then selects the first item in the list as the SelectedItem, but it doesn't change the actually item displayed in the combobox. So this results in a different item being reported as selected compared to what the user sees.
Changing the suggested fix to not fire for the tab key fixes the problem. Suggested fix should be:
<
telerik:RadComboBox
RenderMode
=
"Lightweight"
ID
=
"rco_1"
Filter
=
"Contains"
AllowCustomText
=
"false"
OnClientKeyPressing
=
"HandleComboBoxKeyPress"
runat
=
"server"
>
</
telerik:RadComboBox
>
<script type=
"text/javascript"
>
function
HandleComboBoxKeyPress(sender, e) {
if
(!sender.get_dropDownVisible()) {
if
(e.get_domEvent().keyCode != 9) {
// not tab out, show the dropdown to filter
sender.showDropDown();
}
}
}
</script>