Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
93 views
Hi,

How can I highlight grid row on mouse-over?

Many thanks.

M G
FISCAL
Top achievements
Rank 1
 answered on 10 Aug 2010
5 answers
197 views
Hi,

Iam using ASP.NET Ajax Q1 2008 Controls. Following is the scenario which we have encountered

We have 5 tabs with every tab having one grid each. Now on every post back in grid 1, all grids have there Individual events fired.

Requirement is to fire only the events of grid which is requested ie if user clicks on tab 3 only 3rd grid will load.

Following techniques were tried :-

1. We tried using AutoPostBack=true  for radtabstrip and RenderSelectedPageOnly=true for Multipage but we were unable to acheive the requirement

2. We tried to capture the tab that has been clicked or selected but before we get the selected tab name, all individual events of all grid fire which is exactly what is not required.

Kindly help to acheive the solution to the above problem.

Pavlina
Telerik team
 answered on 10 Aug 2010
1 answer
140 views
How can i  set the combo from client side.?

The way i do it now is

on Client side i pass value using hidden inputs to server side than i call ajaxRequest


j_inComboText.value = Description;

j_inComboVal.value = StatusId;

$find(

 

"<%= RadAjaxManager1.ClientID %>").ajaxRequest();

On server side i implement

 

 

 

if (rcbStatus.SelectedIndex == 0)

 

    rcbStatus.Items.Remove(0);

 

 

RadComboBoxItem ps = new RadComboBoxItem();

 

ps.Text = inComboText.value ;

ps.Value = inComboVal.Value ;

rcbStatus.Items.Insert(0, ps);

rcbStatus.SelectedIndex = 0;

It shows that my value is set ok in the combo but not refresh it to appear in the header of the combo?

Shinu
Top achievements
Rank 2
 answered on 10 Aug 2010
1 answer
84 views
Hi all,

I have installed trail version of Telerik controls. Could you tell me, can I use radgrid control to my existing asp.net application?
I am not interested to create another new web application for radgrid usability
Suggest me if I am wrong


Thanks,
Nagarajan Govindarajan.
Nagarajan
Top achievements
Rank 1
 answered on 10 Aug 2010
1 answer
161 views
Hi,
I'm trying to avoid duplicate appointments
I have created an appointment with Recurrence "weekly" that end after 5 occurrences, 1/8/2010 08:00 - 09:00
and it is being created OK
1/8/2010 08:00 - 09:00
8/8/2010 08:00 - 09:00
15/8/2010 08:00 - 09:00
22/8/2010 08:00 - 09:00
29/8/2010 08:00 - 09:00

now I create another appointment that overlap one of the re occurrence instance  for example  "8/8/2010 08:00 - 09:00" ,
I'm using the GetAppointmentsInRange to check for duplicates,
on the first and last occurrence it found a match,
on the middle occurrences it fail to find a match,
I have the same problem also when trying to create a new event with recurrence, that start at "8/8/2010 08:00 - 09:00" with weekly recurrence that end after 3 occurrences (I loop through the occurrences to check)

I'm using 2009 Q2

Please advise,
Mickey
Peter
Telerik team
 answered on 10 Aug 2010
2 answers
169 views
Hi,
   sorry for bothering you, but this is getting me crazy.
I'm using 2010q2.

The problem:

What I'm trying to accomplish is to use external js files instead of the "axd" resource files.
I've looked to your examples and I don't find them suitable for an application of medium/large dimension.
In fact you are suggesting of adding the scripts to the ScriptManager
<asp:ScriptManager ID="ScriptManager1" runat="server" >
      
<Scripts>
         
<asp:ScriptReference Path="~/Scripts/Common/Core.js" />

      </Scripts>
</
asp:ScriptManager>


This is a mess when dealing with hundreds of pages because developers must always remember which js files must be included for each control.

My idea (as a sidenote I've always used this approach with all the third party libraries I've used in all my projects):
I inherited from your controls, for example I created
public class ExTabStrip : RadTabStrip
(another sidenote: I plan to do it independently of this issue, because it is always better to be able to add new behaviors to third party controls)
Since I know a bit of asp.net I've looked to your controls and noticed that they are implementing MS IScriptControl interface, so I thought the right solution was to override
IEnumerable<ScriptReference> GetScriptReferences()
and add there the external js files. In this way everything is wrapped in the control and the page must not know about these details.
For example 
protected override IEnumerable<ScriptReference> GetScriptReferences()
{
List<ScriptReference> scriptReferences = new List<ScriptReference>();
scriptReferences.Add(new ScriptReference("~/JS/Telerik/Common/Core.js"));
... // Other js files specific for each control
return scriptReferences;
}
But I get a lot of js errors. Sometimes this happens because some js files are imported more than once in the page (like the "PopupScripts.js" script)

Is this approach correct?
Is there any way to reach my goal?

Best regards, Andrea Pirola
Peter
Telerik team
 answered on 10 Aug 2010
1 answer
117 views

I have a user control with an AjaxManagerProxy on it, a RadComboBox, a button, and a RadWindow. Users click the button to open the RadWindow to add an item to the RadComboBox. After they click save, the record is inserted into the database, the window is closed and a javascript method is executed to "rebind" the combobox. Unfortunately the combobox items are not updated, however, if I click the button to add another item and just close the window the list is updated. If I click the button and add another button, the item I previously added appears in the list but not the current one.

Here is some code from the user control.

    <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnNewDepartment">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rdoDepartment" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
          
<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server">
    <Windows>
        <telerik:RadWindow ID="NewDepartmentDialog" runat="server" Width="500px" Left="150px" Height="425px" Behaviors="Close" Title="New Department Details" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" OnClientClose="OnDepartmentWindowClose" />
    </Windows>
</telerik:RadWindowManager>
      
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="20">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
    </telerik:RadAjaxLoadingPanel>

<telerik:RadComboBox ID="rdoDepartment" runat="server" width="300px" DataTextField="DepartmentName" DataValueField="DepartmentCode" MarkFirstMatch="true" /><asp:TextBox ID="txtEmployeeDepartmentRegularlyWorked" runat="server" MaxLength="50" Width="150px" />

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" language="javascript">
        function ShowInsertForm() {
            window.radopen("Window.aspx", "NewDepartmentDialog");
            return false;
        }
        function OnDepartmentWindowClose(sender, args) {
            $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("rebindDepartment");
        }
    </script>
</telerik:RadCodeBlock>

Protected Sub manager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
    Select Case e.Argument
        Case "rebindDepartment"
            Me.rdoDepartment.Items.Clear()
            Me.rdoDepartment.DataSource = db.SPs.CompanyDepartmentListSelect(Utility.GetCompanyKey).GetDataSet
            Me.rdoDepartment.DataBind()
            Me.rdoDepartment.Items.Insert(0, New RadComboBoxItem("", ""))
    End Select
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
    AddHandler manager.AjaxRequest, AddressOf manager_AjaxRequest
End Sub

Please advise.
Maria Ilieva
Telerik team
 answered on 10 Aug 2010
1 answer
125 views
Hello,

I'm having a wierd display error where certain calendar events are visually cut off (see screen shot).  I've investigated and found no difference in the data between ones that work and ones that done.  

I'm adding items to the calendar in C# using objects that inherit from IAppointmentData (see below).  

Has someone seen this before?  Thanks.

Steven

//map to appointment objects
foreach (DataRow row in events.Tables[0].Rows)
{
    DateTime startDate = (DateTime)row["Event_StartDate"];
    DateTime endDate = (DateTime)row["Event_EndDate"];
 
    if (startDate <= endDate)
    {
        AppointmentData apt = new AppointmentData();
        apt.Start = startDate;
        apt.End = endDate;
        //apt.Attributes.Add("ProgramName", row["ProgramName"].ToString());
        apt.Description = row["ProgramName"].ToString();
        apt.Subject = "<b>" + row["Event_Title"].ToString() + "</b><br><i>" + row["ProgramName"].ToString() + "</i>";
 
        //apt.Description = row["Event_Description"].ToString();
        apt.ID = row["EventId"].ToString();
 
        if (!addedAppts.Contains(apt.ID.ToString()))
        {
            appts.Add(apt);
            addedAppts.Add(apt.ID.ToString());
        }
    }
}

Veronica
Telerik team
 answered on 10 Aug 2010
4 answers
207 views
I have a radGrid in a user control that I am basically using as a way for the user to select a list of companies and cost centers for which they want combined into a report.  I am using the "Grid / Client-side Row Selection" grid 2 as an example.

The purpose of my user control is to return a string containing an XML representation of the selected items.  The first column in my grid is a GridClientSelectColumn.  If I click on the checkbox in the header, it selects all items, but if I uncheck one of the items, it does not uncheck the checkbox in the headers.  This works in the sample mentioned above.

My user control looks like:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="gridEntitiesAndCCs.ascx.vb" Inherits="gridEntitiesAndCCs" %>
<link href="CTM.css" rel="stylesheet" type="text/css" />
<telerik:RadGrid ID="gridEntitiesAndCCs" runat="server" AllowSorting="True" AllowMultiRowSelection="true" 
  AutoGenerateColumns="False" GridLines="None">
  <MasterTableView DataKeyNames="EntityID,CostCtr" AllowMultiColumnSorting="true">
    <Columns>
      <telerik:GridClientSelectColumn UniqueName="clientSelect" >
        <ItemStyle Width="25" />
      </telerik:GridClientSelectColumn>
      <telerik:GridBoundColumn DataField="ShortName" HeaderText="Entity" 
        SortExpression="ShortName" UniqueName="ShortName">
      </telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField="CostCtr" HeaderText="Cost Center" 
        SortExpression="CostCtr" UniqueName="CostCtr">
      </telerik:GridBoundColumn>
      <telerik:GridBoundColumn DataField="DeptName" HeaderText="Dept Name" 
        SortExpression="DeptName" UniqueName="DeptName">
      </telerik:GridBoundColumn>
    </Columns>
  </MasterTableView>
  <ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    <Selecting AllowRowSelect="true" />
  </ClientSettings>
</telerik:RadGrid>

and my code-behind looks like:
Partial Class gridEntitiesAndCCs
  Inherits System.Web.UI.UserControl
  
  Public ReadOnly Property selectedValues() As String
    Get
      Return Me.getCheckedRowDetails()
    End Get
  End Property
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
  End Sub
  
  Protected Sub gridEntitiesAndCCs_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gridEntitiesAndCCs.NeedDataSource
    Dim ds As DataSet = MM.getUserEntitiesAndCostCenters()
    gridEntitiesAndCCs.DataSource = ds
  End Sub
  
  Private Function getCheckedRowDetails() As String
    Dim row As GridItem
    Dim entityID As String
    Dim costCtr As String
  
    Dim dstCCs As New DataSet
    Dim dtblCCs As DataTable = New DataTable("EntsCCs")
    dstCCs.Tables.Add(dtblCCs)
    dtblCCs.Columns.Add(New DataColumn("entityID", GetType(String)))
    dtblCCs.Columns.Add(New DataColumn("costCtr", GetType(String)))
    Dim drowItem As DataRow
  
    For Each row In gridEntitiesAndCCs.SelectedItems
      entityID = row.OwnerTableView.DataKeyValues(row.ItemIndex)("EntityID")
      costCtr = row.OwnerTableView.DataKeyValues(row.ItemIndex)("CostCtr")
      drowItem = dtblCCs.NewRow()
      drowItem("entityID") = entityID
      drowItem("costCtr") = costCtr
      dtblCCs.Rows.Add(drowItem)
    Next
  
    Return dstCCs.GetXml()
  End Function
End Class

I don't see anything different in the example that would cause the checkbox in the header to be not cleared when I uncheck a row.  Any ideas?

Also, is it possible to check to see what the status of the checkbox in the header is?  If I knew that the checkbox in the header was checked - and the above problem is resolved ;^) - then I would not need to process each record.  I could simply return a different value to indicate that all rows are selected.

Thanks!


Tsvetoslav
Telerik team
 answered on 10 Aug 2010
1 answer
43 views
I have a client that is unable to see the Image Manager, Hyperlink Manager, or other related pop-up dialogs, instead the dialog opens to a blank window.  This only seems to happen in their IE 8 but it happens on multiple computers.  When I open it in IE 8 it works fine for me and when they use Firefox it opens just fine.  Is there any known security setting or other setting in IE 8 that may cause this issue?
Rumen
Telerik team
 answered on 10 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?