VS2013 2015.1.421.45
I added an empty item at the top so the user can set it to a blank entry but it's displaying a very thin line in the dropdown. (see pic)
Behavior is the same in Chrome and IE11.
The current workaround is to use this but not desirable <telerik:RadComboBoxItem Text="(blank)" Value="" />
Tried without Lightweight rendermode - no difference.
This is within LayoutRow/CompositeLayoutColumn/RadPageLayout shouldn't have an impact just let to let you know.
<
telerik:RadComboBox
ID
=
"cboCountry"
runat
=
"server"
Width
=
"250px"
MaxHeight
=
"250px"
ForeColor
=
"blue"
AllowCustomText
=
"false"
Autopostback
=
"true"
RenderMode
=
"Lightweight"
AppendDataBoundItems
=
"true"
>
Hello,
I've been going through the AJAX forums to see why the export function on RadScheduler would only generate the Title. It works perfectly on a local machine during development, but when attempted remotely, the title is only visible. I've removed update panels and AJAX containers so it can be processed via a full post back and rebind.
Exporting via ICS file does work.
Thanks
Scott B
Dear,
How to apply dynamic style attribute written by user (who is familiar with css) for dynamic Telerik controls?
Like:
RadTextBox1..Attributes.Add("style", "width:100%");
Thanking you,
Hello
I have a radgrid with a NestedViewTemplate. Inside this are 3 fieldsets with either lablels or LIs. All are bound on the dataitembound event. When I export to pdf, the labels & LIs (as text only) are present, but the fieldsets are not, so the horizontal organization of the data is lost... the labels export in a vertical stack.
I have tried replacing the fieldsets with spans to manage placement (I have seen a number of articles regarding div and width... so none of that).
I also tried to various "manipulations" the grid_PreRender. I note the fieldset is present as text of a LiteralControl and the actual Labels are Labels. The LiteralControls have \r\n\ & up to 24 spaces (this matches the html layout in VS). I have stripped all this out, tried creating new Panels and adding the Label controls to these, creating tables and adding the control text to the cells... and so on... but nothing seems to reformat this export.
here is my MasterTableView with NestedViewTemplate
<telerik:RadGrid ID="gvServiceItems" runat="server" DataKeyNames="ID" OnNeedDataSource="gvServiceItems_NeedDataSource"
OnItemCommand="gvServiceItems_OnItemCommand" OnItemDataBound="gvServiceItems_OnItemDataBound" OnPreRender="gvServiceItems_PreRender"
ShowGroupPanel="true" EnableHierarchyExpandAll="true">
<ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true">
</ExportSettings>
<ClientSettings AllowDragToGroup="true">
</ClientSettings>
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
<MasterTableView DataKeyNames="ID" Name="EstimateRequests">
<NestedViewTemplate>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblInfo" runat="server" Text="lblInfo" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<p>
<asp:Label ID="lblDescription" runat="server" Text="lblDescription" SkinID="LabelRadSilk"></asp:Label><br />
<asp:Label ID="lblDescriptionData" runat="server" Text="lblDescriptionData" SkinID="LabelData"></asp:Label>
</p>
<p>
<asp:Label ID="lblRequestNotes" runat="server" Text="lblRequestNotes" SkinID="LabelRadSilk"></asp:Label><br />
<asp:Label ID="lblRequestNotesData" runat="server" Text="lblRequestNotesData" SkinID="LabelData"></asp:Label>
</p>
</fieldset>
</span>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblEquipment" runat="server" Text="lblEquipment" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<asp:Label ID="lblEquipmentData" runat="server" Text="lblEquipmentData"></asp:Label>
</fieldset>
</span>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblParts" runat="server" Text="lblParts" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<asp:Label ID="lblPartsData" runat="server" Text="lblPartsData"></asp:Label>
</fieldset>
</span>
</NestedViewTemplate>
<Columns>
</Columns>
My grid_PreRender
protected void gvServiceItems_PreRender(object sender, EventArgs e)
{
if (IsExport)
{
foreach (GridHeaderItem header in gvServiceItems.MasterTableView.GetItems(GridItemType.Header))
{
foreach (TableCell cell in header.Cells)
{
cell.Style["font-family"] = "Arial Unicode MS";
cell.Style["font-size"] = "11px";
cell.Style["color"] = "black";
cell.Style["font-weight"] = "bold";
cell.Style["padding"] = "10px 0 4px 0";
cell.Style["margin"] = "0 4px";
cell.Style["text-align"] = "left";
cell.Style["background-color"] = "#ebf0f6";
}
}
int rowNumber = 0;
foreach (GridDataItem item in gvServiceItems.MasterTableView.Items)
{
foreach (TableCell cell in item.Cells)
{
cell.Style["font-family"] = "Arial Unicode MS";
cell.Style["font-size"] = "9px";
cell.Style["color"] = "black";
if (rowNumber.IsEven())
cell.Style["background-color"] = "#fff";
else
cell.Style["background-color"] = "#f3f6f9";
}
rowNumber++;
item.Expanded = true;
if (item.HasChildItems)
​
Any direction would be appreciated.
​
I have the fileexplorer on a screen but when I right click and the context menu pops up Open is missing from the context list. Double click does work and I have EnableOpenFile="true" but I would like Open to show in the context menu.
Also is there a way to add an open file button to the menu on the top. There are people who are tring to use the site on tablets amd the double click does not work and a press hold does not seem to provide the right click menu.
The width of StandardButtons (ButtonType="StandardButton"), SkinnedButtons (ButtonType="SkinnedButton") and LinkButtons (ButtonType="LinkButton") in the Classic render mode of RadButton is unified in the Q2 2015 release of UI for ASP.NET AJAX. As a result, the following changes in the width of the button control will be observed:
I have a combination of RadDropDownLists and RadComboBox's on a page, the last RadComboBox is losing it's selection(s) on PostBack. All other RadDropDownLists and RadComboBox's keep their selections on PostBack. What do I need to do to ensure the selections are not lost. I have tried enabling ViewState and several other suggestions found online, but none resolve the issue. Please advise.
ASPX:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CobraStatusTemplate1.aspx.cs" Inherits="CobraStatus.aspx.CobraStatusTemplate1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
br
/>
<
telerik:RadDropDownList
ID
=
"rdlProject"
runat
=
"server"
DefaultMessage
=
"Select Project"
OnSelectedIndexChanged
=
"rdlProject_SelectedIndexChanged"
AutoPostBack
=
"true"
Skin
=
"Office2010Black"
Enabled
=
"true"
>
</
telerik:RadDropDownList
>
<
telerik:RadDropDownList
ID
=
"rdlAnalyst"
runat
=
"server"
DefaultMessage
=
"Select Analyst"
OnSelectedIndexChanged
=
"rdlAnalyst_SelectedIndexChanged"
AutoPostBack
=
"true"
Skin
=
"Office2010Black"
Enabled
=
"false"
>
</
telerik:RadDropDownList
>
<
telerik:RadComboBox
ID
=
"rcbControlAccount"
runat
=
"server"
Text
=
"Select Control Account"
CheckBoxes
=
"true"
EnableCheckAllItemsCheckBox
=
"true"
OnSelectedIndexChanged
=
"rcbControlAccount_SelectedIndexChanged"
AutoPostBack
=
"true"
Skin
=
"Office2010Black"
Enabled
=
"false"
>
</
telerik:RadComboBox
>
<
telerik:RadComboBox
ID
=
"rcbEVT"
runat
=
"server"
CheckBoxes
=
"true"
EnableCheckAllItemsCheckBox
=
"true"
AutoPostBack
=
"true"
Skin
=
"Office2010Black"
Enabled
=
"false"
OnSelectedIndexChanged
=
"rcbEVT_SelectedIndexChanged"
>
</
telerik:RadComboBox
>
<
br
/>
<
br
/>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
GroupPanelPosition
=
"Top"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
OnPreRender
=
"RadGrid1_PreRender"
OnBatchEditCommand
=
"RadGrid1_BatchEditCommand"
Width
=
"100%"
Skin
=
"Office2010Black"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
EditMode
=
"Batch"
CommandItemDisplay
=
"Top"
Width
=
"100%"
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"False"
ShowSaveChangesButton
=
"True"
ShowCancelChangesButton
=
"True"
></
CommandItemSettings
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Project"
HeaderText
=
"Project"
SortExpression
=
"Project"
UniqueName
=
"Project"
FilterControlAltText
=
"Filter Project column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Ca1"
HeaderText
=
"Control Account"
SortExpression
=
"Ca1"
UniqueName
=
"Ca1"
FilterControlAltText
=
"Filter Ca1 column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Wp"
HeaderText
=
"Work Package"
SortExpression
=
"Wp"
UniqueName
=
"Wp"
FilterControlAltText
=
"Filter Wp column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Descrip"
HeaderText
=
"Description"
SortExpression
=
"Descrip"
UniqueName
=
"Descrip"
FilterControlAltText
=
"Filter Descrip column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Description"
HeaderText
=
"EV Technique"
SortExpression
=
"Pmt"
UniqueName
=
"Pmt"
FilterControlAltText
=
"Filter Pmt column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FullName"
HeaderText
=
"Analyst"
SortExpression
=
"C5"
UniqueName
=
"C5"
FilterControlAltText
=
"Filter C5 column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PcComp"
HeaderText
=
"% Complete"
SortExpression
=
"PcComp"
UniqueName
=
"PcComp"
DataType
=
"System.Decimal"
FilterControlAltText
=
"Filter PcComp column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Ssd"
HeaderText
=
"Baseline Start Date"
SortExpression
=
"Ssd"
UniqueName
=
"Ssd"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Ssd column"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Sfd"
HeaderText
=
"Baseline Finish Date"
SortExpression
=
"Sfd"
UniqueName
=
"Sfd"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Sfd column"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"Asd"
HeaderText
=
"Actual Start Date"
SortExpression
=
"Asd"
UniqueName
=
"Asd"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Asd column"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"false"
HeaderStyle-Width
=
"165px"
HeaderStyle-ForeColor
=
"#0000cc"
>
</
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
DataField
=
"Afd"
HeaderText
=
"Actual Finish Date"
SortExpression
=
"Afd"
UniqueName
=
"Afd"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Afd column"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"UpdPcComp"
HeaderText
=
"Updated % Comp"
SortExpression
=
"UpdPcComp"
UniqueName
=
"UpdPcComp"
DataType
=
"System.Decimal"
FilterControlAltText
=
"Filter UpdPcComp column"
ReadOnly
=
"false"
HeaderStyle-ForeColor
=
"#0000cc"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"UpdBy"
HeaderText
=
"Updated By"
SortExpression
=
"UpdBy"
UniqueName
=
"UpdBy"
FilterControlAltText
=
"Filter UpdBy column"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"UpdDate"
HeaderText
=
"Last Updated"
SortExpression
=
"UpdDate"
UniqueName
=
"UpdDate"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter UpdDate column"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
asp:Content
>
C#:
using
System;
using
System.Collections.Generic;
using
System.Configuration;
using
System.Data;
using
System.Data.SqlClient;
using
System.Drawing;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Web.UI;
namespace
CobraStatus.aspx
{
public
partial
class
CobraStatusTemplate1 : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
projects();
}
private
void
projects()
{
DataTable dt =
new
DataTable();
using
(SqlConnection con =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"FinanceSystemsApplicationsConnectionString"
].ConnectionString))
{
con.Open();
SqlCommand cmd =
new
SqlCommand(
"SELECT ProgramId FROM csProgram ORDER BY ProgramId"
, con);
SqlDataAdapter adapter =
new
SqlDataAdapter(cmd);
adapter.Fill(dt);
}
rdlProject.DataSource = dt;
rdlProject.DataTextField =
"ProgramId"
;
rdlProject.DataValueField =
"ProgramId"
;
rdlProject.DataBind();
}
private
void
analysts()
{
string
project = rdlProject.SelectedValue;
DataTable dt =
new
DataTable();
using
(SqlConnection con =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"FinanceSystemsApplicationsConnectionString"
].ConnectionString))
{
con.Open();
SqlCommand cmd =
new
SqlCommand(
"SELECT DISTINCT csCawp.C5, csAnalysts.EmployeeId, csAnalysts.FullName FROM csCawp INNER JOIN "
+
"csAnalysts ON csCawp.C5 = csAnalysts.EmployeeId WHERE Project = '"
+ project +
"'"
, con);
SqlDataAdapter adapter =
new
SqlDataAdapter(cmd);
adapter.Fill(dt);
}
rdlAnalyst.DataSource = dt;
rdlAnalyst.DataTextField =
"FullName"
;
rdlAnalyst.DataValueField =
"EmployeeId"
;
rdlAnalyst.DataBind();
}
private
void
controlAccount()
{
string
project = rdlProject.SelectedValue;
string
analyst = rdlAnalyst.SelectedValue;
DataTable dt =
new
DataTable();
using
(SqlConnection con =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"FinanceSystemsApplicationsConnectionString"
].ConnectionString))
{
con.Open();
SqlCommand cmd =
new
SqlCommand(
"SELECT DISTINCT Ca1 FROM CsCAWP WHERE Project = '"
+ project +
"' AND C5 = "
+ analyst +
""
, con);
SqlDataAdapter adapter =
new
SqlDataAdapter(cmd);
adapter.Fill(dt);
}
rcbControlAccount.DataSource = dt;
rcbControlAccount.DataTextField =
"Ca1"
;
rcbControlAccount.DataValueField =
"Ca1"
;
rcbControlAccount.DataBind();
}
private
void
evt()
{
string
project = rdlProject.SelectedValue;
string
analyst = rdlAnalyst.SelectedValue;
DataTable dt =
new
DataTable();
using
(SqlConnection conn =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"FinanceSystemsApplicationsConnectionString"
].ConnectionString))
{
string
controlAccount =
string
.Empty;
for
(
int
i = 0; i < rcbControlAccount.CheckedItems.Count; i++)
{
if
(i < rcbControlAccount.CheckedItems.Count - 1)
{
controlAccount += rcbControlAccount.CheckedItems[i].Value;
controlAccount +=
"'"
;
controlAccount +=
","
;
controlAccount +=
"'"
;
}
else
{
controlAccount += rcbControlAccount.CheckedItems[i].Value;
}
}
conn.Open();
SqlCommand cmnd =
new
SqlCommand(
"SELECT DISTINCT csEVT.Code, csEVT.Description FROM csCawp INNER JOIN csEVT ON csCawp.Pmt = csEVT.Code "
+
"WHERE csCawp.Project = '"
+ project +
"' AND csCawp.C5 = '"
+ analyst +
"' AND csCawp.Ca1 IN ('"
+ controlAccount +
"')"
, conn);
SqlDataAdapter adp =
new
SqlDataAdapter(cmnd);
adp.Fill(dt);
}
rcbEVT.DataSource = dt;
rcbEVT.DataTextField =
"Description"
;
rcbEVT.DataValueField =
"Code"
;
rcbEVT.DataBind();
}
protected
void
rdlProject_SelectedIndexChanged(
object
sender, Telerik.Web.UI.DropDownListEventArgs e)
{
analysts();
rdlAnalyst.Enabled =
true
;
}
protected
void
rdlAnalyst_SelectedIndexChanged(
object
sender, Telerik.Web.UI.DropDownListEventArgs e)
{
controlAccount();
rcbControlAccount.Enabled =
true
;
}
protected
void
rcbControlAccount_SelectedIndexChanged(
object
sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
evt();
rcbEVT.Enabled =
true
;
}
protected
void
rcbEVT_SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
RadGrid1.Rebind();
}
public
DataTable GetDataTable(
string
query)
{
String ConnString = ConfigurationManager.ConnectionStrings[
"FinanceSystemsApplicationsConnectionString"
].ConnectionString;
SqlConnection conn =
new
SqlConnection(ConnString);
SqlDataAdapter adapter =
new
SqlDataAdapter();
adapter.SelectCommand =
new
SqlCommand(query, conn);
DataTable myDataTable =
new
DataTable();
conn.Open();
try
{
adapter.Fill(myDataTable);
}
finally
{
conn.Close();
}
return
myDataTable;
}
protected
void
RadGrid1_NeedDataSource(
object
sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
int
rcbCA = rcbControlAccount.CheckedItems.Count;
int
rcbEvt = rcbEVT.CheckedItems.Count;
if
(rdlProject.SelectedValue !=
""
&& rdlAnalyst.SelectedValue !=
""
&& rcbCA > 0 && rcbEvt > 0)
{
string
project = rdlProject.SelectedValue;
string
analyst = rdlAnalyst.SelectedValue;
string
controlAccount =
string
.Empty;
for
(
int
i = 0; i < rcbControlAccount.CheckedItems.Count; i++)
{
if
(i < rcbControlAccount.CheckedItems.Count - 1)
{
controlAccount += rcbControlAccount.CheckedItems[i].Value;
controlAccount +=
"'"
;
controlAccount +=
","
;
controlAccount +=
"'"
;
}
else
{
controlAccount += rcbControlAccount.CheckedItems[i].Value;
}
}
string
evt =
string
.Empty;
for
(
int
i = 0; i < rcbEVT.CheckedItems.Count; i++)
{
if
(i < rcbEVT.CheckedItems.Count - 1)
{
evt += rcbEVT.CheckedItems[i].Value;
evt +=
"'"
;
evt +=
","
;
evt +=
"'"
;
}
else
{
evt += rcbEVT.CheckedItems[i].Value;
}
}
RadGrid1.DataSource = GetDataTable(
"SELECT csCawp.Project, csCawp.Ca1, csCawp.Wp, csCawp.Descrip, csEVT.Description, csAnalysts.FullName, csCawp.PcComp,"
+
"csCawp.Ssd, csCawp.Sfd, csCawp.Asd, csCawp.Afd, csCawp.UpdPcComp, csCawp.UpdDate, csCawp.UpdBy FROM csCawp INNER JOIN csEVT ON csCawp.Pmt = csEVT.Code INNER JOIN "
+
"csAnalysts ON CsCawp.C5 = csAnalysts.EmployeeId "
+
" WHERE PROJECT = '"
+ project +
"' AND Ca1 IN ('"
+ controlAccount +
"') AND Pmt IN ('"
+ evt +
"')"
);
}
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
}
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
if
(item[
"PcComp"
].Text ==
"0.000000"
)
item.ForeColor = Color.Red;
}
}
protected
void
RadGrid1_PreRender(
object
sender, EventArgs e)
{
}
protected
void
RadGrid1_BatchEditCommand(
object
sender, GridBatchEditingEventArgs e)
{
}
}
}
Thanks in advance,
Josh
Regards
Hi,
I am using the radcombobox on web pages throughout my application. If I select an item, then highlight the selected text and press the delete button, the text comes back when I click away.
When I submit the page, it results in the radcombobox having a text value, but the selectedindex is -1 and there is no selectedvalue.
If anyone has experienced this issue and has any advice it would be very appreciated.
Thanks.