Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
117 views
Hi Telerik Team,

I am having problem. I have radSchedular that is populating from database. I wrote TimeSlotCreated server side event in which I set the disabled/enabled class based on my required condition (e.TimeSlot.CssClass = "Disabled";)

In my ASPX page i wrote 

function OnClientTimeSlotClick(sender, eventArgs)
{
        var now = new Date();
if (sender.get_selectedView() == Telerik.Web.UI.SchedulerViewType.WeekView) {
            if (eventArgs.get_time() < now) {
                alert("Time slot not available");
            }
        }
}

this event simply shows alert if the tiemslot time is less than current time.
I need to get the CssClass and check if CssClass is "disabled" or "enabled". So that I can show alert('Time slot not available') if the CssClass is 'disabled'.

Prompt response is highly appreciated. 

Regards,
Mohsin
Frank
Top achievements
Rank 1
 answered on 07 Jun 2011
2 answers
214 views
Hi,

I would like to change the name "Insert" to "Add". How can I achieve this? Thanks
Kien Lim
Top achievements
Rank 1
 answered on 07 Jun 2011
1 answer
77 views
Hi,

I looked at this thread:

http://www.telerik.com/community/forums/aspnet-ajax/rotator/how-to-bind-radrotator-to-list-lt-t-gt.aspx

What I'd like to do is to create what looks like a scrollable radgrid reproducing the look of the embedded radgrid skins using tables and a radrotator.
 
My thought is to pick apart the output of a radgrid (view source) pull the css styles out of the skin files and then create a row template in the template of the rotator that matches the columns defined in the header row of the table for multiple attributes of a bound list.

My question is if I create a header row for the table outside of the rotator declaration and then define the row templates in the template of the radrotator will this mess up the table layout i.e will the table columns stay the same width?  could you provide a working example of this approach.  Also is there an alternating style on the radrotator to emulate the alternating row style on the radrid?

Thanks,

Jonathan



Niko
Telerik team
 answered on 07 Jun 2011
1 answer
98 views

We have column name Member Name in Data Set and we are using following sql query for getting this name into data set.

Select

 

COALESCE(   

   STUFF   

   (   

    (    

     SELECT DISTINCT  

      ''; '' + FirstName + CASE WHEN MI IS NULL THEN '''' ELSE '' '' + MI END + '' '' + LastName  

     FROM  

      TestTable1 

      INNER JOIN TestTable2 on TestTable1.customerid = TestTable2.customerid  

     WHERE  

      TestTable2.MemberID = TestTable1.customerid

     FOR XML PATH('''')     

    )   

   ,1,1,''''   

   ),''N/A'')  AS [Name]

   From TestTable

 

Based on above query we are getting customer name successfully in data set and bind to grid. Now issue is that we are not able to use Starts with operator and column filter is not returning any result. However when we use “Contains” operator we are able to retrieve correct result.

Also we have another column that simply returns column data as below


Select TestTable.PersonName From TestTable


Using above query we are successfully use starts with operator.


So what can be the problem and how can we resolve it?

Regards,

Dharmesh Solanki

Veli
Telerik team
 answered on 07 Jun 2011
10 answers
785 views
I want to do something like

RadGrid1.MasterTableView.FilterExpression = "SubmitDate >= '01/10/2008' and SubmitDate <= '02/01/2008'";
RadGrid1.Rebind();

But I get an error (something about a character literal can't be greater than 1 character).  SubmitDate is a DatTime field in the db.

Maybe this can't be done, not sure.

Any Ideas on how I can accomplish this?

Thanks
Iana Tsolova
Telerik team
 answered on 07 Jun 2011
1 answer
73 views

I have a hierarchy grid that is populated on demand (server side) using the NeedDataSource and DetailTableDataBind events (single level detail table) based on your example provided in the documentation.

Everything works fine but I have noticed that if 2 child levels are opened/expanded at the same time the second one does not refresh correctly. When I click to expand to see the details in another row I have correct number of pages but no data in the grid.

If I only have one sub level expanded/opened at the time everything works fine – for example I close/hide the details before I open/expand another row.

What else do I need to do to fix the refresh issue.

Tsvetina
Telerik team
 answered on 07 Jun 2011
3 answers
114 views
Today i am happy to found telerik's FormDecorator to style my standard asp.net web control, and it's free, there is no reason i don't give it a try.

I open a new blank new ASP.NET 4.0 project to test, but after a 10+ times postback.
telerik control's response.write a prompt message about : ( To remove this message, please purchase a developer version )

I have Attached a screenshot below.

Below is the markup of my test project.
And i have few question,

1. Is it the RadScriptManager1 and RadSkinManager1 not include in free FormDecorator suite?
2. I have remove the RadScriptManager1 ,but it show error
:
"The control with ID 'RadFormDecorator1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it."
So, do i have to use the classic ScriptManager come from ASP.NET 4.0?

3. Where can i add my free license information for register? web.config? of place a app_license.dll in /bin folder like "De*Express" and "Comp*nentArt" ?

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true">
    </telerik:RadSkinManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2007"
        DecoratedControls="All" />
    <asp:Button ID="Button1" runat="server" Text="Button" />
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AdventureWorksLT2008ConnectionString %>"
        SelectCommand="SELECT top 10 * FROM [SalesLT].[Customer]"></asp:SqlDataSource>
    </form>
</body>
</html>

And
Default.aspx.cs
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
}

and web.config
<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <add name="AdventureWorksLT2008ConnectionString" connectionString="Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=AdventureWorksLT2008;Integrated Security=True" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
    </compilation>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>
Lini
Telerik team
 answered on 07 Jun 2011
4 answers
133 views
HI
if i ll pass query parameter (?Id=0) value is 0 radgrid should be  opened  initinsertmode by defult orelse query  parameter (?id=10) is 10 or any value ,radgrid should be opened Correct index item in editmode by default .its all should be done in page load event.

what can i do for this?if u send me a sample application for this, it ll be very helpful to me.

nanthakumar thangavel
Top achievements
Rank 1
 answered on 07 Jun 2011
19 answers
637 views
Hi

I am using the radgrid 5.1.2.0 and I can't hide the plus and minus images in the group header. I have been following the example in this help file

ms-help://telerik.radgrid.51.Net2/telerik.radgrid.51.Net2/grdPreventGroupsExpansion.html

but it's not working

I've set the client settings on the grid like so:

<

rad:RadGrid id="dgStock" runat="server" Width="400px" Skin="Windows"

<

ClientSettings Resizing-AllowColumnResize="true" />

then i have this in the code behind

Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.WebControls.GridColumnCreatedEventArgs) Handles dgStock.ColumnCreated

If TypeOf e.Column Is GridGroupSplitterColumn Then

e.Column.HeaderStyle.Width = Unit.Pixel(1)

e.Column.ItemStyle.Width = Unit.Pixel(1)

e.Column.Resizable =

False

End If

End Sub


but the expand collapse buttons are still there.

I also tried adding this code

Private Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgStock.PreRender

For Each column As GridColumn In dgStock.MasterTableView.RenderColumns

If (TypeOf column Is GridGroupSplitterColumn) Then

column.HeaderStyle.Width = Unit.Pixel(1)

column.ItemStyle.Width = Unit.Pixel(1)

column.Resizable =

False

End If

Next

End Sub

The grouping of the grid is achieved as shown below

<

GroupByExpressions>

<

rad:GridGroupByExpression><SelectFields>

<

rad:GridGroupByField FieldName="StockType" FieldAlias="StockType" FormatString="" HeaderText=""></rad:GridGroupByField>

</

SelectFields>

<

GroupByFields>

<

rad:GridGroupByField FieldName="StockType" FieldAlias="StockType" FormatString="" HeaderText=""></rad:GridGroupByField>

</

GroupByFields>

</

rad:GridGroupByExpression>

</

GroupByExpressions>


Many thanks for your help
andrea

Prathap
Top achievements
Rank 1
 answered on 07 Jun 2011
5 answers
105 views
Hello,
             I have a RadGrid in my page. The ID of the RadGrid is "_uxSuccession". if the id has underscore in front then the grid will not work properly that is we cannot select Row in the Grid. If the Id will not contain underscore in front then the Radgrid will  work properly that is we can select the row of the rad grid. If the id contain underscore in front then no row click event will arise after clicking the row. please help me as soon as possible.

Thanks,
Velkumar
Tsvetoslav
Telerik team
 answered on 07 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?