Hi,
The problem is that my date is like "31/12/2015 11:45:00" and i want be able to sorting and filtering on this date.
Here is the code:
<telerik:RadGrid ID="Grid_ID" runat="server" DataSourceID="ObjectDataSource1" GroupPanelPosition="Top" AllowSorting="true" AllowFilteringByColumn="true">
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView DataSourceID="ObjectDataSource1" AutoGenerateColumns="False">
<Columns>
<telerik:GridBoundColumn DataField="Code" HeaderText="Code"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Num_article" HeaderText="Num. article"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Description" HeaderText="Description"></telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="Date" HeaderText="Date" DataFormatString="{0:d}" FilterDateFormat="dd/MM/yyyy"></telerik:GridDateTimeColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:ObjectDataSource runat="server" ID="ObjectDataSource1" SelectMethod="SP_RECORD_GET" TypeName="DA_Record"></asp:ObjectDataSource>
De sorting is on "string value" and i want he sort on de DATE.
Thanks for your help.
We have 20 declared columns (NOT using auto-generated columns) and the user can use the context menu to group by any column and have nested groupings. The default is no grouping. I set the Aggregate="Count" property on the primary ID databound field. The counts get displayed in the footer but I want to display them in the header next to the header text. Also the catch with this approach is that if that column is hidden (user can decide which columns to view), the totals do not show up. I simply want to add a count of the number of records/items that are in each group.
I tried using ItemDataBound checking for GridGroupHeaderItem but all of the AggregatesValues for the item are null.
Here is what I've tried in the itemdatabound event.
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridGroupHeaderItem)
{
GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
int
c1 = item.GetChildItems().Length;
//always 0
int
c2 = item.GetChildItems().Count()
//always 0
}
}
I already have marker click event setup and able to extract coordinates from marker. Now, i need dynamically show lines initiated from these coordinates on marker click, meaning i need to manipulate source to my shape layer.
Any recommendations?
Hi,
I am using version 2014.3.1209.40 and I have the following combo box:
<telerik:RadComboBox ID="ddCostCenter" runat="server" CheckBoxes="true" EmptyMessage="Select Cost Center" > </telerik:RadComboBox>
If I remove CheckBoxes="true" the empty message shows on initial load, otherwise it doesn't.
How should I set it up, so EmptyMessage shows on initial load when I have the checkboxes?
Thanks!
Hi,
I'm having problems with the RibbonBarDropDown. I'm having two RibbonBarDropDowns and as soon as in one is a specifc item selected, the other gets enabled.
I'm using RadAjaxManger and the "OnClientDropDownSelectedIndexChanged" event to do the ajax request.
In my code behind i'm doing the following:
List<
string
>boxValues = ViewModel.GetBoxValues();
SecondBox.Items.Clear();
SecondBox.Items.AddRange(boxValues.Select(x =>
new
RibbonBarListItem() {Text = x}));
if
(boxValues.Count > 0)
{
SecondBox.Enabled =
true
;
SecondBox.SelectedIndex = 0;
}
else
{
SecondBox.Enabled =
false
;
}
Everything is working fine except setting the selectedIndex. The selectedIndex is only set to 0 if the RibbonBarDropDown was enabled before.
Any suggestions what i'm doing wrong?
hi
I am searching members through a textbox and then click a button Go.
Before adding Dropdownlist in the grid, i was able to search for member and it display the result on the grid if found.
After adding a dropdownlist in the GridTemplateColumn, the grid disappear and display only dropdownlist.
Have I done something wrong? Thanks a lot
<%@ Page Title="" Language="C#" MasterPageFile="~/crm/layout.master" AutoEventWireup="true" CodeFile="registration.aspx.cs" Inherits="registration" %>
<%@ Register src="../usercontrol/title.ascx" tagname="course" tagprefix="uc1" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Left" Runat="Server">
<uc1:Title ID="Title1" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Middle" Runat="Server">
<div class="container">
<h4>REGISTRATION</h4>
<hr />
<div>
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-btn" >
<asp:TextBox ID="txtSearch" runat="server" CssClass="form-control" placeholder="Search for..." />
<asp:Button ID="btnserach" cssclass="btn btn-default" runat="server" Text="Go" OnClick="btnserach_Click" />
</span>
</div>
</div>
</div>
</div>
<div style="margin-left:5px;margin-top:15px;margin-right:5px">
<div>
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Skin="Metro" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="MemberID" >
<Columns>
<telerik:GridBoundColumn DataField="MemberID" FilterControlAltText="Filter MemberID column" HeaderText="Member ID" SortExpression="MemberID" UniqueName="MemberID">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Gender" Display="false" FilterControlAltText="Filter Gender column" HeaderText="Gender" SortExpression="Gender" UniqueName="Gender">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FullName" FilterControlAltText="Filter FullName column" HeaderText="Name" SortExpression="Salutation" UniqueName="FullName">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Email" FilterControlAltText="Filter Email column" HeaderText="Email" SortExpression="Email" UniqueName="Email">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DOB" DataType="System.DateTime" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter DOB column" HeaderText="DOB" SortExpression="DOB" UniqueName="DOB">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Uname" HeaderText="Title">
<ItemTemplate>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="CategoryIDDropDown" DataValueField="TitleID"
DataTextField="Title" DataSourceID="SqlDataSource1">
</telerik:RadDropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn CommandName="attendance" ConfirmText="Are you sure?"
FilterControlAltText="Filter column column" HeaderText="Confirm Attendance" Text="Confirm Attendance"
UniqueName="attendancecolumn" ItemStyle-ForeColor="#333333">
<ItemStyle ForeColor="#333333"></ItemStyle>
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Title_SelectDropdown" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</div>
</div>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class registration : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["mark"] = " ";
RadGrid1.Rebind();
}
}
protected void btnserach_Click(object sender, EventArgs e)
{
Session["mark"] = txtSearch.Text;
RadGrid1.Rebind();
}
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = Memberlib.Member_SelectMark(Session["mark"].ToString());
}
}