Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
301 views
Hi,

I have a scenario where i have to display No. characters entered in a multi line text box on a text box.I have done the following code.
<telerik:RadTextBox ID="txt_Comment" runat="server" TextMode="MultiLine" Width="50%" Height="50px" onKeyUp="txt_CharacterCount.value=this.value.length" MaxLength="255">
</telerik:RadTextBox>
  
<telerik:RadTextBox ID="txt_CharacterCount" ClientIDMode="Static" runat="server" ReadOnly="true" Width="40px">
</telerik:RadTextBox>

Its not working for Rad Textbox. but the same is working for aspText box. How do i fix this issue. Pls guide me.
Jidesh
Jidesh Guptha
Top achievements
Rank 1
 answered on 25 Nov 2010
1 answer
63 views
I get the following error:

[IndexOutOfRangeException: Cell index out of range: 1]
   Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) +927
   Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +184
   Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +4698
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +42
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

This happens when the following criteria are met:

1.  I have a <appointmentTemplate>
2.  I have two events with the same start-time on the same calendar.

All dates are draggable/resizable on the calendar view (day) until the appointment items end up with the same start date.

Once this happens,  resizing the one to the right (second in my case)  causes a javascript error adn or the above error.  It can no longer be resized or dragged.  I can double click the event to edit it,  and it will then move around the calendar as much as I want,  until I end up with the same start time again.  And then the error occurs again.

I can provide a test project if need be, but I would prefer you test.

Telerik : 2010.2.713.40
Veronica
Telerik team
 answered on 25 Nov 2010
3 answers
125 views
We're using the RadDateTimePicker to insert dates and times. When a user selects a date in the calendar, the user stille has to select the time in time in the input box to edit it.

Is there a way to automatically place the cursor at the possition of the time text when a date is selected so he/she can immediatly start typing a new time.

If possible, can you also add a mask to the time text?
Tsvetina
Telerik team
 answered on 25 Nov 2010
2 answers
169 views
Hi,

This is an interesting issue and I cannot seem to find a programmatic solution to it.

I have two grids (left and right), either side of a splitterbar (these components consume the entire browser window). The left grid items display a tooltip on rollover and the tooltip is displayed "MiddleRight", relative to the left grid item. This causes the tooltip to appear on the otherside of the splitterbar over the top of the second grid, which is correct.  When I move the splitter to the right and reduce the amount of visible grid on the right, the tool tip displays "MiddleLeft" which is correct as there is not enough room on the right to display the tooltip.

However ... The exact same browser on the occasional different machine always displays the tooltip on the "MiddleLeft". It's like the control is unable to calculate the available space on the right, or simply cannot retrieve that figure. Is there any way I can influence the calulcation for tooltip positioning? If it is unable to reference or calculate the required figure, perhaps I can get the width of the visible space on the right and set it manually?

This is an urgent issue for me as I'm nearing project end, I would appreciate any help you can provide at this time.

I thank you in advance,



Andrew Buxton.

Andrew Buxton
Top achievements
Rank 1
 answered on 25 Nov 2010
1 answer
73 views
Hi all,

Is there a control that keep track of things on client- and serverside.
So when a user is leaving that he gets prompted.

I have found an idea for default .NET controls on http://www.4guysfromrolla.com/webtech/100604-1.shtml but to keep track for all the rad controls then I will be busy to change the script.

So before I do that, Ill ask.

Regards,

Marco
Sebastian
Telerik team
 answered on 25 Nov 2010
1 answer
85 views
Hello,
I have a website using telerik controls.
Now i have put my application in server2008, and also installed telerikcontrols in the server, and when browsing my website in the server, every radalert,radconfirm which is opened - actually Yes No buttons dont work.only the close button of its work.
(in my iis computer it works fix)

Anybody knows why? maybe there are more controls not working for me...

Thanks,
Gila
Georgi Tunev
Telerik team
 answered on 25 Nov 2010
1 answer
191 views
Hello I am using custsom paging, sorting and filtering inside NeedDataSource event. To retrieve data, I am using Entity Framework under the covers. Is there any way i can get the FilterExpression in hte form of esql. From what it appears, radgrid only returns esql where clause when you use entitydatasource. can u configure somewhere in radgrid to return the where clause in the form of esql so i can use hte builder methods. There are several reasons why i cant use linq in this case. here is what i what i have.

private string _filterExpression;
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        int startRowIndex = RadGrid1.CurrentPageIndex * RadGrid1.PageSize;
        int maximumRows = RadGrid1.PageSize;
        string sort = RadGrid1.MasterTableView.SortExpressions.GetSortString();
        _filterExpression = RadGrid1.MasterTableView.FilterExpression;
        //needed to bypass RadGrid's internal filtering
        RadGrid1.MasterTableView.FilterExpression = string.Empty;
        if (configuration == null)
        {
            configuration = new SystemSetupFieldConfiguration(TagPrefixList, startRowIndex, maximumRows, sort, _filterExpression);
        }
        var combinedfields = configuration.GetCombinedFields();
        var fieldcount = configuration.CombinedFieldsCount;
        RadGrid1.VirtualItemCount = fieldcount;
        RadGrid1.DataSource = combinedfields;
        
    }

internally i want to be able to apply the filter using builder methods in linq to entities instead of linq query.
db.Customers.Where(filter).OrderBy(orderby).Skip(startrow).Take(maxrows);

Please help!
Radoslav
Telerik team
 answered on 25 Nov 2010
3 answers
139 views
Hi There,

Just a quick question: is it possible to put a grid row in an update panel and set up triggers/server side event handler for the panel?

I would like the following feature: if postback is triggered by a grid row, i.e., a dropdown list with autopostback enabled, only elements in the grid row will be re-rendered and go to the client side (browser).

Thanks,
Y. Fan
Nikolay Rusev
Telerik team
 answered on 25 Nov 2010
2 answers
289 views
I've got a grid with data that can be sorted, paged and filtered by the end user. The grid data is tied to a declarative EntityDataSource and it works very well. I want to filter the data returned by the EntityDataSource so that the user only sees a subset of the records.

OK, so I can't use a declarative EDS and Filters on the grid at the same time as the Filters overwrite the 'Where' clause I put in the EDS. So I'm trying to move the EDS to code behind using the NeedDataSource event.

This is the problem I can see, it seems that the NeedDataSource event expects ALL data to be returned (already bound) which means I'll have lost all of my automatic paging and sorting on the server. I also can't see an example that uses the EDS like this (my code below encounters a NullException error).

My code:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    var Eds = new EntityDataSource();
 
    Eds.DefaultContainerName = "EntityDb";
    Eds.ConnectionString = "name=EntityDb";
    Eds.EntitySetName = "Meetings";
    Eds.EnableDelete = true;
    Eds.EnableInsert = true;
    Eds.EnableUpdate = true;
    Eds.AutoPage = true;
    Eds.Include = "Venue";
    Eds.OrderBy = "it.StartDate";
    RadGrid1.DataSource = Eds;
}

The code above does not work, the code below (from the demo) looks like paging and sorting are done in the grid, not passed to the datasource which means the benefit of the EDS is lost (only fetching the rows needed etc).

Example from demo:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
 OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/Nwind.mdb"));
 OleDbDataAdapter adapter = new OleDbDataAdapter();
 adapter.SelectCommand = new OleDbCommand("SELECT * FROM Customers", conn);
 DataTable myDataTable = new DataTable();
 conn.Open();
 try
 {
    adapter.Fill(myDataTable);
 }
 finally
 {
    conn.Close();
 }
 RadGrid1.DataSource = myDataTable;
}

Questions;
1) Is there a good sample of using EDS in code behind?
2) Is there another way to accomplish this declaratively?
3) Will the EDS in the code behind always get all of the data and sort it in the grid or does it use the EDS properly?

Thanks in advance,

Ryan
Ryan O'Neill
Top achievements
Rank 1
 answered on 25 Nov 2010
3 answers
92 views
I have a sqldatasource databound radgrid i'm using for data entry.

date, start mileage, end mileage, personal miles

prior to update/insert , i need to check to ensure end mileage > start mileage, and personal miles is not > (endmileage - startmileage)

I've fudged around on the documentation site but cannot find any concrete examples I can adapt to accomplish this.

anyone have suggestions?
Radoslav
Telerik team
 answered on 25 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?