Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
513 views
This seems like it should be an easy thing to figure out, but I haven't found a solution to my problem. I wire up a PivotGrid to a DataTable (which I store in Session State between calls) using the NeedDataSource event handler. I have a search form on my page with 7 different parameters for the stored procedure that I call within that method.

What I am finding is that the search button works the first time (on page load), but clicking the search button doesn't cause the data to be recalled again. I would think that the rebinding of the pivot grid would be straighforward, and would cause the NeedDataSource event to fire again. Because of the size of the dataset (potentially 45,000 records) I need to store it in session between calls.

What am I missing here? 

The search button only calls:

pvtCMStoG2.DataBind()

The NeedDataSource event looks like this:
 
Private Sub pvtCMStoG2_NeedDataSource(sender As Object, e As PivotGridNeedDataSourceEventArgs) Handles pvtCMStoG2.NeedDataSource
    'Get an assign the data source.
    pvtCMStoG2.DataSource = GetPivotGridData()
End Sub
 
 
Public Function GetPivotGridData() As DataTable
    'Decalre local variables.
    Dim myDataTable As New DataTable()
 
 
    'Check to see if there is anything in Session for this.
    If Session("ReconciliationTime") IsNot Nothing Then
        'Retrieve from session.
        myDataTable = CType(Session("ReconciliationTime"), DataTable)
    Else
        'Set up the connection.
        Dim m_strConnectionString As [String] = ConfigurationManager.ConnectionStrings("SOREOConnection").ConnectionString
        Dim m_objConnection As New SqlConnection(m_strConnectionString)
 
        Dim m_objSQLCommand As New SqlCommand
        Dim m_cmdParameter As SqlParameter
 
        'Set the command properties.
        With m_objSQLCommand
            .Connection = m_objConnection
 
            'Set the command timeout value to wait indefinitely.
            .CommandTimeout = 0
 
            'Set the core properties.
            .CommandText = "[reconciliation].[cspCMStoG2TimesheetValidation]"
            .CommandType = CommandType.StoredProcedure
        End With
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter 'With {.ParameterName = "BeginDate", .SqlDbType = SqlDbType.DateTime}
        With m_cmdParameter
            .ParameterName = "@BeginDate"
            .SqlDbType = SqlDbType.DateTime
 
            'Set the value.
            .Value = ctlBillingPeriodPicker.StartDate
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@EndDate"
            .SqlDbType = SqlDbType.DateTime
 
            'Set the value.
            .Value = ctlBillingPeriodPicker.EndDate
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@EmployeeID"
            .SqlDbType = SqlDbType.UniqueIdentifier
 
            'Set the value.
            If String.IsNullOrEmpty(ctlEmployeePicker.SelectedEmployeeID) Then
                .Value = System.DBNull.Value
            Else
                .Value = ctlEmployeePicker.SelectedEmployeeID
            End If
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@CustomerID"
            .SqlDbType = SqlDbType.UniqueIdentifier
 
            'Set the value.
            If String.IsNullOrEmpty(ctlCustomerPicker.SelectedCustomerID) Then
                .Value = System.DBNull.Value
            Else
                .Value = ctlCustomerPicker.SelectedCustomerID
            End If
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@FundingAgency"
            .SqlDbType = SqlDbType.VarChar
 
            'Set the value.
            If String.IsNullOrEmpty(ctlFundingOrganization.SelectedFundingOrganizationName) Then
                .Value = System.DBNull.Value
            Else
                .Value = ctlFundingOrganization.SelectedFundingOrganizationName
            End If
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@TimesheetID"
            .SqlDbType = SqlDbType.Int
 
            'Assign the value
            If chkSingleTimesheetID.Checked = True Then
                .Value = radTimesheetID.Value
            Else
                .Value = System.DBNull.Value
            End If
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
        
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@IncludeLastImport"
            .SqlDbType = SqlDbType.Bit
 
            'Assign the value
            .Value = chkIncludeLastImport.Checked
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
        'Create and set the parameter values.
        m_cmdParameter = New SqlParameter
        With m_cmdParameter
            .ParameterName = "@ErrorsOnly"
            .SqlDbType = SqlDbType.Bit
 
            'Assign the value
            .Value = chkErrorsOnly.Checked
        End With
 
        'Add the parameter to the commands.
        m_objSQLCommand.Parameters.Add(m_cmdParameter)
 
 
 
        'Set up the DataAdapter
        Dim DataAdapter As SqlDataAdapter = New SqlDataAdapter
        DataAdapter.SelectCommand = m_objSQLCommand
 
 
        Try
            'Open the connection.
            m_objConnection.Open()
 
            'Fill the data adapter.
            DataAdapter.Fill(myDataTable)
        Finally
            'Close the connection.
            m_objConnection.Close()
        End Try
 
 
        'Add it to the session.
        Session("ReconciliationTime") = myDataTable
    End If
 
 
    'Return the final dataset.
    Return myDataTable
End Function
Viktor Tachev
Telerik team
 answered on 01 Apr 2015
3 answers
105 views
Recently installed the latest version of Telerik UI for ASP.NET AJAX Q1 2015 on a new machine with VS 2013

I had an already existing solution with multiple radgrids, which i working fine on another development environment.
For few of the radgrids, the css does not load properly.

Have attached the screenshots for the same for reference.

Dharmesh
Top achievements
Rank 1
 answered on 01 Apr 2015
3 answers
123 views
I'm using a RadAsyncUpload control with in Radwindow. My page have RadGrid, RadAjaxManager and the Radwindow. when any postback event is occur then i'm getting  script error. when i click on the grid page that time also getting this error. The radajaxloading panel is not goes out.  

In Master page code
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Release"></telerik:RadScriptManager><telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>


in child page code

 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
   <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="panel1" LoadingPanelID="LoadingPanel1"   />                                                  <telerik:AjaxUpdatedControl ControlID="grid1" />
                    <telerik:AjaxUpdatedControl ControlID="panel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
     </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadWindow ID="RadWindow1" runat="server" Title="Settings" Width="500px" Height="350px" OnClientClose="refreshGrid">
    <ContentTemplate>
        <asp:Panel ID="panel1" runat="server">
           <telerik:RadAsyncUpload ID="AttachFiles" runat="server" InputSize="40" OnClientFileUploading="OnClientFileUploading"                  MultipleFileSelection="Automatic" OnClientValidationFailed="OnClientValidationFailed"                                            MaxFileSize="73400320" AllowedFileExtensions=".jpeg,.jpg,.png,.docx,.doc,.xlsx,.xls,.pdf">                                     </telerik:RadAsyncUpload>
       </asp:Panel>
    </ContentTemplate>
</telerik:RadWindow>

Ivan Danchev
Telerik team
 answered on 01 Apr 2015
1 answer
118 views
Hi,
Good Day!!!

Observed, telerik grid is supporting multiple .net frameworks, since our Application is in VS 2010 with asp.net 4.0 framework.

Could you please provide your inputs below points, if we choose Telerik Rad Grid.

1. Which version of Telerik grid is preferable?.Can we go for latest versions of telerik grid on the same.
2. is Grid feature supports all versions of telerik as per the their demos?.
3. Telerik sample code compatible all .net frameworks.

Regards
Vasu.
Viktor Tachev
Telerik team
 answered on 01 Apr 2015
1 answer
43 views
Rad image editor is not displayig button images correctly

<telerik:RadImageEditor ID="RadImageEditor1" runat="server" Skin="MetroTouch" RenderMode="Auto" ShowAjaxLoadingPanel="True" ToolBarPosition="Bottom">
             </telerik:RadImageEditor>

Any one got any ideas?
Vessy
Telerik team
 answered on 01 Apr 2015
2 answers
70 views


Hi,

I am using this control in my project, for creating the
appointment I am using my custom aspx page. For the new appointment/from the
menu option as well I am unable to call my custom aspx page. But during the
edit I am able to call my aspx page.

So, how do I open my custom aspx page both on new
appointment creation/from the context menu as well?

For achieving the above I try to use the below events but
there are not firing why??

<telerik:RadScheduler runat="server" ID="Scheduler" SelectedView="MonthView"

            FirstDayOfWeek="Monday" LastDayOfWeek="Friday" OverflowBehavior="Auto" DayEndTime="20:00:00"

            DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"

             Height=""StartEditingInAdvancedForm="false"

             Skin="Outlook"            OnClientAppointmentClick="OnClientAppointmentClick" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick" OnClientAppointmentContextMenuItemClicked="ClientAppointmentContextMenuItemClicked" >

            <AdvancedForm Modal="false"></AdvancedForm>

            <WeekView ShowResourceHeaders="false" />

            <TimelineView UserSelectable="false" />

            <MonthView UserSelectable="True" />

            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>

            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>

        </telerik:RadScheduler>

 

And my javascript is

function OnClientAppointmentDoubleClick(sender, eventArgs) {

             try{

                 alert('Test');

                 var win = window.open('abc.aspx', 'Details');

                 win.center();

             } catch (e) {

                 alert(e.message);

             }

         }

         function ClientAppointmentContextMenuItemClicked(sender, args) {

             try {

                 alert('Test');

                 var win = window.open('abc.aspx', 'Details');

                 win.center();

             } catch (e) {

                 alert(e.message);

             }

         }

Thanks
Burepalli V S Rao
Top achievements
Rank 1
 answered on 01 Apr 2015
2 answers
109 views
Hi Quick question I am using the trail version to show someone that its worth while to purchase but when i use the RadImage editor it is coming up corrupt ie no images on the buttons. I wanting to show the resize image options automatically is their any option to allow this. As I am using this for student photos and is their anyway to set default resize sizes?.

http://snag.gy/NmeSY.jpg

<telerik:RadImageEditor ID="RadImageEditor1" runat="server" Visible="False" ToolBarMode="Docked">
 </telerik:RadImageEditor>
Vessy
Telerik team
 answered on 01 Apr 2015
1 answer
114 views
I have an ASMX service inside same scope of my UI layer and using below lines to refer it and pull data for client side binding. No errors and no data too. What's wrong?

<telerik:RadGrid ID="SourceGrid" runat="server" ShowGroupPanel="false" AllowSorting="false" ShowFooter="true" AllowPaging="false" HeaderStyle-CssClass="tableHeading br" AutoGenerateColumns="false" GridLines="Both" EnableViewState="false">
<ClientSettings>
<DataBinding Location="Employee.asmx" SelectMethod="GetEmployees" >


[WebMethod]
public static List<Employee> GetEmployees()
{
List<Employee> employeeList = new List<Employee>();
for (int i = 0; i < 100; i++)
{

employeeList.Add(new Employee { EmpNumber = i, Name = "John" + i, Age = 30, Designation = "Clerk" + i, Salary = 2000 });
//    employeeList = new List<Employee> { 

//new Employee{ EmpNumber=1000, Name="John", Age=30, Designation="Clerk", Salary=2000},
//new Employee{ EmpNumber=1001, Name="Mary", Age=35, Designation="Programmer", Salary=4000},
//new Employee{ EmpNumber=1002, Name="Joe", Age=40, Designation="Manager", Salary=6000},
//new Employee{ EmpNumber=1003, Name="Mike", Age=45, Designation="Head", Salary=9000},
//new Employee{ EmpNumber=1004, Name="Leena", Age=28, Designation="DBA", Salary=3000},
//new Employee{ EmpNumber=1005, Name="Mark", Age=30, Designation="Tester", Salary=3000},
//new Employee{ EmpNumber=1006, Name="Hany", Age=31, Designation="Programmer", Salary=4000},
//new Employee{ EmpNumber=1007, Name="Tiaa", Age=45, Designation="Manager", Salary=6000},
//};
}


return employeeList;
}
Viktor Tachev
Telerik team
 answered on 01 Apr 2015
2 answers
182 views
Good day,

we are having some problems while trying to assign a string time value to a radtimepicker.

Page logic is as follows:
We have a formview with a bound control. That control is displaying a string with the value of a previous radtimepicker user inserted value.
We need to clientside assign the string value of the bound control to a radtimepicker in the current page.

We've read the api at
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-basics.html
and there the only method seems to be set_selectedDate as a method to update the target field.
The problem is that set_selectedDate accepts only a date type, while our source type is a string.

We don't want to implement culture support for conversion from time string to time date, so we need to know:
1- is there an alternative client side method for setting the time in a radtimepicker, that uses a string parameter
2- is there an 'universal' datetime format that we can Date.Parse out time string ("08:30") so that the radtimepicker will accept it without culture and timezone problems?

Thanks in advance
Konstantin Dikov
Telerik team
 answered on 01 Apr 2015
1 answer
132 views
This works for ItemTemplate:

http://www.telerik.com/help/aspnet-ajax/menu-templates-accessing-controls.html

But how can I access the ContentTemplate for a menu item from code?

Marc
Ivan Danchev
Telerik team
 answered on 01 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?