I have a radcombobox that uses a headertemplate and an itemtemplate and I would like my users to be able to sort by clicking on the text from the headertemplate.
Here is the radcombobox. It works and it's pretty simple but I can't work out how to get it to sort the items based on clicking text in the header.
<telerik:RadComboBox ID="rcbEmp2" runat="server" Width="570px" AutoPostBack="true"
MarkFirstMatch="true" HighlightTemplatedItems="true" AppendDataBoundItems="true" >
<HeaderTemplate>
<ul>
<li>Employee</li>
<li>Miles</li>
<li>Shifts</li>
<li>Availability</li>
</ul>
</HeaderTemplate>
<ItemTemplate>
<ul>
<li><asp:Label runat="server" ID="lbEmpNameg" Text='<%# Eval("EmpFullName")%> '></asp:Label></li>
<li><asp:Label runat="server" ID="Label1" Text='<%# Eval("KsDistance")%> '></asp:Label></li>
<li><%# DataBinder.Eval(Container.DataItem, "ThisWeeksDemoCount")%></li>
<li><%# DataBinder.Eval(Container.DataItem, "AvailText")%></li>
</ul>
</ItemTemplate>
</telerik:RadComboBox>
Thanks in advance!
Hi. I have RadGrid with filter implemented as combo box. On Item command of GridColumnButton I update the record that changes value of the field being filtered by and rebind the grid. If before grid was filtered by the column that is updated and result contains only one record, rebind crashes the application. After record is updated, the only valid value for column "Sections" is Any Sections Not Complete.
<telerik:GridButtonColumn UniqueName="ImageButton" CommandName="MarkRecord" ButtonType="ImageButton"
ImageUrl="Content/Images/Reverse.jpg" HeaderStyle-Width="60px" Exportable="false">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn UniqueName="Sections" DataField="Sections" HeaderText="Sections" HeaderStyle-Width="180px" Exportable="false">
<FilterTemplate>
<telerik:RadComboBox ID="ddlSection" runat="server" DataSource="<%#Sections %>"
DataTextField="Name" DataValueField="Name" Width="130px" AppendDataBoundItems="true"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Sections").CurrentFilterValue %>'
OnClientSelectedIndexChanged="SectionsIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="All" />
</Items>
</telerik:RadComboBox>
<telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
<script type="text/javascript">
function SectionsIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
alert(args.get_item().get_value());
tableView.filter("Sections", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
string strNewStatus;
string btnAction;
if(e.CommandName == "Complete" || e.CommandName == "Reverse")
{
if (e.CommandName == "Complete")
{
strNewStatus = "COMPLETE";
btnAction = "Mark Complete";
}
else
{
strNewStatus = "PENDING";
btnAction = "Reverse Complete";
}
GridDataItem dataItem = e.Item as GridDataItem;
var id = (int)dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["EncounterID"];
Encounter enc = Encounters.Find(i => i.EncounterID == id);
string userName = HttpContext.Current.User.Identity.Name.Replace("ROTHMAN\\", String.Empty);
string retValue;
retValue = DataAccess.UpdateVisitInfo(Convert.ToInt32(enc.tid), enc.EncounterID, enc.ECWAcct, userName, strNewStatus, enc.notes, ddlSource.SelectedValue);
if (retValue != "")
{
//handle error
e.Canceled = true;
radWindowManager.RadAlert(retValue, 280, 100, "Error", null);
return;
}
retValue = DataAccess.UpdateTracker(userName, enc.EncounterID, Convert.ToInt32(enc.ECWAcct), btnAction, strNewStatus, "", ddlSource.SelectedValue);
if (retValue != "")
{
e.Canceled = true;
radWindowManager.RadAlert(retValue, 280, 100, "Error", null);
return;
}
// refresh grid
Session["Encounters"] = null;
RadGrid1.Rebind();
}
}
I'm using OpenStreetMap as the MapLayer
Is there a way to add a search address box?
protected void grdInventory_ExcelMLWorkBookCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExcelMLWorkBookCreatedEventArgs e) { WorkBook wb = e.WorkBook; StyleElement header = new StyleElement("Header"); header.FontStyle.Bold = true; header.FontStyle.FontName = "Arial"; header.FontStyle.Size = 8; header.AlignmentElement.Attributes["ss:WrapText"] = "1"; wb.Styles.Add(header); }
Hi,
i would like to download latest 2023 files into my project.
which one do i need to download msi or zip file?
thanks for your help.
Vitaly.
Hi,
Is there a way to choose BackgroundColor of cells in RadSpreadsheet from UI that are not part of the given list of colors???
or maybe a way to edit the background color # from UI ???
thanks,
Efrat
RadAlertas.DataSource = IConsultarStatus()
RadAlertas.PlotArea.Series.Clear()
Dim serieAlertas As New BarSeries
serieAlertas.DataFieldY = "Total"
RadAlertas.PlotArea.XAxis.DataLabelsField = "Alerta"
serieAlertas.Appearance.FillStyle.BackgroundColor = Drawing.Color.Blue
RadAlertas.PlotArea.XAxis.Color = Drawing.Color.Red
serieAlertas.TooltipsAppearance.ClientTemplate = "Quantidade: #= dataItem.Total#<br/>Evento: #= dataItem.Alerta#"
serieAlertas.VisibleInLegend = True
RadAlertas.PlotArea.Series.Add(serieAlertas)
RadAlertas.DataBind()
Hello I have a bar chart, loaded to a DataSource and when inspecting the HTML the values are present, but the chart is not displayed.
The data is:
Total Alerta
8 Alert1
16 Alert2
1 Alert3
RadAlertas.DataSource = IConsultarStatus()
RadAlertas.PlotArea.Series.Clear()
Dim serieAlertas As New BarSeries
serieAlertas.DataFieldY = "Total"
RadAlertas.PlotArea.XAxis.DataLabelsField = "Alerta"
serieAlertas.Appearance.FillStyle.BackgroundColor = Drawing.Color.Blue
RadAlertas.PlotArea.XAxis.Color = Drawing.Color.Red
serieAlertas.TooltipsAppearance.ClientTemplate = "Quantidade: #= dataItem.Total#<br/>Evento: #= dataItem.Alerta#"
serieAlertas.VisibleInLegend = True
RadAlertas.PlotArea.Series.Add(serieAlertas)
RadAlertas.DataBind()
But the graphic image does not load.
Is there a way to create different CustomContextMenu items based on the specific column the cell resides?
I.e. the cells of two different columns will have different and unique ContextMenu item lists.
I think we are ok but noticed some Telerik versions have some vulnerabilities. Could someone confirm our version is ok.
https://www.cvedetails.com/vulnerability-list/vendor_id-14130/Telerik.html
Our version is ASP .NET AJAX 2020.2.512.40