function
ShowErrorMessage(Message) {
radalert(Message, 500, 210,
"List Error Alert"
);
}
<custom:DepartmentFilteringColumn DataField="Department_Name" HeaderText="Department" AllowFiltering="true"
UniqueName="Filter_Department" DataType="System.String" AutoPostBackOnFilter="True" CurrentFilterValue="%" >
<itemtemplate>
<telerik:RadComboBox ID="radcomboDepartment" Runat="server" Skin="Telerik"
DataSourceID="dsDepartments" AutoPostBack="true" ShowToggleImage="True"
OnSelectedIndexChanged="radcomboDepartment_SelectedIndexChanged" DataValueField="ID"
DataTextField="Name" DataMember="DefaultView" MarkFirstMatch="True" Width="300px" EnableScreenBoundaryDetection="true">
<ExpandAnimation Type="OutQuart" />
</telerik:RadComboBox>
</ItemTemplate>
<HeaderStyle Width="100px"></HeaderStyle>
</custom:DepartmentFilteringColumn>
<custom:EmployeeFilteringColumn DataField="Responsible_Employee_Name_String" HeaderText="Employee Name" AllowFiltering="true"
UniqueName="Filter_Employee" DataType="System.String" AutoPostBackOnFilter="True" CurrentFilterValue="Unallocated" >
<itemtemplate>
<telerik:RadComboBox ID="radcomboEmployee" Runat="server" Skin="Telerik"
ShowToggleImage="True" MarkFirstMatch="True" Width="300px" EnableScreenBoundaryDetection="true">
<ExpandAnimation Type="OutQuart" />
</telerik:RadComboBox>
</ItemTemplate>
<HeaderStyle Width="100px"></HeaderStyle>
</custom:EmployeeFilteringColumn>
Imports
Microsoft.VisualBasic
Imports Telerik.Web.UI
Namespace
Ims.DepartmentFilteringColumnNameSpace
Public Class DepartmentFilteringColumn
Inherits GridTemplateColumn
Protected Overrides Sub SetupFilterControls(ByVal cell As TableCell)
Dim myDropDownListDepartment As New DropDownList()
myDropDownListDepartment.ID =
"myDropDownListDepartment"
myDropDownListDepartment.Width = Unit.Percentage(100)
myDropDownListDepartment.AutoPostBack =
True
Dim myDataSource As New SqlDataSource
myDataSource.SelectCommand = "SELECT 0 AS ID, ' All' AS Name UNION SELECT ID, Name FROM Departments ORDER BY Name"
myDataSource.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("IMS_Development").ToString()
myDropDownListDepartment.DataSource = myDataSource
myDropDownListDepartment.DataTextField =
"Name"
myDropDownListDepartment.DataValueField = "ID"
myDropDownListDepartment.DataBind()
AddHandler myDropDownListDepartment.SelectedIndexChanged, AddressOf myDropDownListDepartment_SelectedIndexChanged
cell.Controls.Add(myDropDownListDepartment)
End Sub
Protected Overrides Function GetFilterDataField() As String
Return Me.DataField
End Function
Protected Overrides Sub SetCurrentFilterValueToControl(ByVal cell As TableCell)
If Not Me.CurrentFilterValue Is String.Empty Then
Dim myDropDownListDepartment As DropDownList = cell.Controls(0)
If Me.CurrentFilterValue <> "" Then
If Not IsNothing(myDropDownListDepartment.Items.FindByText(Me.CurrentFilterValue)) Then
myDropDownListDepartment.Items.FindByText(Me.CurrentFilterValue).Selected = True
End If
End If
End If
End Sub
Protected Overrides Function GetCurrentFilterValueFromControl(ByVal cell As TableCell) As String
Dim myDropDownListDepartment As DropDownList = cell.Controls(0)
Me.CurrentFilterValue = myDropDownListDepartment.SelectedItem.Text
If Not myDropDownListDepartment.Items(myDropDownListDepartment.SelectedIndex).Value = "0" Then
Me.CurrentFilterFunction = GridKnownFunction.Contains
Else
Me.CurrentFilterFunction = GridKnownFunction.NoFilter
End If
Return Me.CurrentFilterValue
End Function
Public Overrides Function SupportsFiltering() As Boolean
Return True
End Function
Public Sub myDropDownListDepartment_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim GridFilteringItem As GridFilteringItem = sender.parent.parent
Dim dropdownlist As DropDownList = sender
GridFilteringItem.FireCommandEvent(
"Filter", New Pair(dropdownlist.Items(dropdownlist.SelectedIndex).Text, Me.DataField))
End Sub
End Class
End
Namespace
Hi All,
I am binding RADCHART from webservice,
The webservice returns MONTH & Available services (%) for that month.
I use MONTH as a X axis data lebel and Available services as Data YColumn.
My webservice retuns MONTH only when the services have data for that month, due to this i am not
able to show some months for which there are no data available for services (not getting from WS).
My need is to show those months also where services data are unavailable (without showing Available services data).
I am thinking to populate the WS data in the arraylist and binding with RADCHART, but how can proceed with this, that's difficulty iam facing rightnow.
Plz anybody help me on this.