I have tried the following codes but nothing hides the radtab on indexchange
RadTabStrip1.Tabs[1].Visible = false;
RadTabStrip1.Tabs[1].Width = 0;
RadTabStrip1.Tabs[1].Height = 0;
RadTabStrip1.Tabs[1].Attributes.Add("style", "display: none;");
I have a template column in a grid as follows trying to populate all the sources and set the focus on particular source...
but i was able to get only the focused value...and combo-box is not populating...how to achieve all the values and set focus on particular value
<
telerik:GridTemplateColumn
HeaderText
=
"Source"
DataField
=
"SourceName"
>
<
ItemTemplate
>
<%# DataBinder.Eval(Container.DataItem, "SourceName")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
ID
=
"rdcmbSource1"
runat
=
"server"
Height
=
"200px"
Width
=
"190px"
DataTextField
=
"SourceName"
DataValueField
=
"SourceID"
DataSource="<%# GetActivemarketingSources() %>"
SelectedValue='<%# Eval("SourceID").ToString() %>'>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
public
static
object
GetActivemarketingSources()
{
using
(EnabledDataContext db =
new
EnabledDataContext())
{
var getsources = (from sources
in
db.Sources
where sources.StoreID.Equals(535) && !sources.Deleted
orderby sources.SourceID
select
new
{
SourceID = sources.SourceID.ToString(),
SourceName = sources.SourceName.ToString()
}).ToList();
getsources.Insert(0,
new
{ SourceID =
""
, SourceName =
""
});
getsources.Insert(1,
new
{ SourceID =
""
, SourceName =
"Selected by user"
});
return
getsources;
}
}
Thanks...!!
Hi, I Have a problem with grid. I'm exporting to excel data from my grid and next in excel I see strange buttons/rectangles.
I don't know how to remove these settings in export to excel.
Can u help me with this? How to remove this buttons..
I think this problem is because in headers I have filters... But when I set rgProjectList.MasterTableView.AllowFilteringByColumn = false still I have this "buttons"
Here is how I m doing export (rgProjectList is my grid.):
private void HandleExporting()
{
hlExportToExcel.NavigateUrl = this.Page.Request.Url.AbsolutePath + String.Format("?{3}={0}&{1}={2}&CurrentPage={5}&PageSize={6}{4}&Export", this.FilteringManager.ViewId.ToString(), ProjectListWeb.ActionQueryParameterName, ProjectListWeb.ExportExcelActionName, ProjectExtendedPropertiesFilteringManager.QueryStringViewParameterName, IsReportView ? "&ReportView=1" : "", GridCurrentPage, GridPageSize);
hlExportToExcel.Target = "_blank";
hlExportToCsv.NavigateUrl = this.Page.Request.Url.AbsolutePath + String.Format("?{3}={0}&{1}={2}&CurrentPage={5}&PageSize={6}{4}&Export", this.FilteringManager.ViewId.ToString(), ProjectListWeb.ActionQueryParameterName, ProjectListWeb.ExportCsvActionName, ProjectExtendedPropertiesFilteringManager.QueryStringViewParameterName, IsReportView ? "&ReportView=1" : "", GridCurrentPage, GridPageSize);
hlExportToCsv.Target = "_blank";
rgProjectList.ExportSettings.ExportOnlyData = false;
rgProjectList.ExportSettings.FileName = "ProjectsList";
rgProjectList.ExportSettings.IgnorePaging = true;
rgProjectList.ExportSettings.Csv.EncloseDataWithQuotes = true;
if (this.isExporting)
{
rgProjectList.ExportCellFormatting += rgProjectList_ExportCellFormatting;
rgProjectList.MasterTableView.AllowFilteringByColumn = false;
rgProjectList.CurrentPageIndex = rgProjectList.MasterTableView.CurrentPageIndex = GridCurrentPage;
rgProjectList.PageSize = rgProjectList.MasterTableView.PageSize = GridPageSize;
if (rgProjectList.MasterTableView.Columns.Count > 3)
{
HideColumnsBeforeExport();
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
boundColumn.DataField = "Status";
boundColumn.HeaderText = "Status";
boundColumn.UniqueName = "Status";
GridBoundColumn boundColumnWT;
boundColumnWT = new GridBoundColumn();
boundColumnWT.DataField = "VPProjectEndTimeIndexExport";
boundColumnWT.HeaderText = "Wskaźnik terminu";
boundColumnWT.UniqueName = "VPProjectEndTimeIndexExport";
rgProjectList.MasterTableView.Columns.Insert(0, boundColumn);
rgProjectList.MasterTableView.Columns.Add(boundColumnWT);
}
rgProjectList.MasterTableView.AllowSorting = false;
rgProjectList.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
rgProjectList.MasterTableView.AllowPaging = false;
rgProjectList.MasterTableView.AllowCustomPaging = false;
rgProjectList.MasterTableView.ExportToExcel();
}
if (this.isExportingCsv)
{
this.CsvExportManager = new FlexiCsvExportManager();
this.CsvExportManager.SetExportSettings(rgProjectList, GridCurrentPage, GridPageSize);
}
}
Requirements |
|
RadControls version |
2008.03.1314.35 |
.NET version |
2.0 |
Visual Studio version |
2005 |
programming language |
C# |
browser support |
all browsers supported by RadControls |
I have a masterpage where a have defined a function below
function PopUpShowing(sender, eventArgs) {
var popUp = eventArgs.get_popUp();
var scrollTop = (typeof window.innerHeight != 'undefined' ? 0 : document.documentElement.scrollTop);
var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
var windowHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight - scrollTop);
var windowWidth = document.body.offsetWidth;
if (popUpHeight == "") popUpHeight = 300; // if the height isn't set on the popup, default to 300px
popUp.style.position = "fixed";
popUp.style.left = (Math.floor((windowWidth - popUpWidth) / 2)).toString() + "px";
popUp.style.top = (Math.floor((windowHeight - popUpHeight) / 4) + scrollTop).toString() + "px";
}
Then i have i page that opens a radwindow on button click. The radwindow contains a radgrid that has a popup editing set. So i want to call the PopUpShowing function in the masterpage to display the popup.
Hi,
we are running with 2012.1.411.35 version telerik.web.ui dll in our server with two applications. Now, we are planning to upgrade only one application to telerik version 2017.2.711.35.
Is it possible running two application with two version of telerik dlls on the same server?
Hi,
I have a pivot grid as per picture below. For Total Ratio row, need to display a value with custom calculation. Following is my calculation format.
A = SumOfQty Won
B = SumOfQty Pending
C = SumOfQty Quoted
D = SumOfQty Lost
Format Ratio (%) = [A / (A+B+C+D)] * 100
How to do it using code behind C#? I put my sample aspx code here.
<telerik:RadPivotGrid ID=
"RadPivotGrid1"
runat=
"server"
DataSourceID=
"SqlDataSource1"
OnCellDataBound=
"RadPivotGrid1_CellDataBound"
OnItemNeedCalculation=
"RadPivotGrid1_ItemNeedCalculation"
AggregatesLevel=
"1"
AggregatesPosition=
"Rows"
EmptyValue=
"0"
Skin=
"Bootstrap"
OnPivotGridCellExporting=
"RadPivotGrid1_PivotGridCellExporting"
>
<Fields>
<telerik:PivotGridRowField DataField=
"SummaryStatus"
Caption=
"Status"
>
</telerik:PivotGridRowField>
<telerik:PivotGridColumnField DataField=
"APP_INIT_DATE"
Caption=
"Month"
>
</telerik:PivotGridColumnField>
<telerik:PivotGridAggregateField DataField=
"Quantity"
Aggregate=
"Sum"
DataFormatString=
"{0}"
Caption=
"Quantity"
>
<TotalFormat Level=
"0"
Axis=
"Columns"
></TotalFormat>
</telerik:PivotGridAggregateField>
<telerik:PivotGridAggregateField DataField=
"Price"
Aggregate=
"Sum"
DataFormatString=
"{0:n2}"
Caption=
"Price (RM)"
>
<TotalFormat Level=
"1"
Axis=
"Columns"
></TotalFormat>
</telerik:PivotGridAggregateField>
<telerik:PivotGridAggregateField DataField=
"Ratio"
CalculationDataFields=
"Quantity"
CalculationExpression=
"{0}/100"
DataFormatString=
"{0:n2}"
CellStyle-Font-Italic=
"true"
>
</telerik:PivotGridAggregateField>
</Fields>
<TotalsSettings ColumnGrandTotalsPosition=
"First"
ColumnsSubTotalsPosition=
"First"
RowGrandTotalsPosition=
"First"
RowsSubTotalsPosition=
"First"
GrandTotalsVisibility=
"RowsAndColumns"
/>
</telerik:RadPivotGrid>
Thank you.
Hi Telerik,
Eight years ago, I initiated a thread "How To Prevent Double-Clicking Of Any Toolbar Button". I understand that a solution was developed by Telerik four years later here "ADD SingleClick property to the RadToolBar control."
Has there been any Telerik initiative to implement this on basically any button used anywhere? Because, realistically buttons can be clicked multiple times causing unintended consequences.
Another case in point are the "Save changes" and "Cancel changes" buttons that appear when Batch Edit is initiated in a RadGrid. I have a the following questions:
By the way, I'm using Telerik Version R3 2016.
Thank you.
Virgil