Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
328 views
Hi,

Can anyone let me know how to bind the check box list inside the form template of radgrid in the pageload event
or
any alternative solution for the above requirement 
or
Find the controls inside the Form Template in the page load event 

I have checked this link.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx
but they are binding the dropdown with static values.  I want to bind the dropdown on the fly in page load

Thanks in advance
Parmesh
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Jan 2012
2 answers
133 views
Hello,

I'm trying use domain data source with RadGrid in ASP.NET 4.0 project (by this demo http://demos.telerik.com/aspnet-ajax/grid/examples/programming/domaindatasource/defaultcs.aspx). I'm using LinqToEntitiesDomainService (EntityFramework).
<telerik:RadGrid ID="groups" runat="server" AllowPaging="true" DataSourceID="dsGroups">
    <MasterTableView CommandItemDisplay="Top" AllowAutomaticInserts="true" AllowAutomaticDeletes="true"
        AllowAutomaticUpdates="true" AutoGenerateColumns="false" DataKeyNames="GroupId">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" />
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" />
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" />
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
<asp:DomainDataSource ID="dsGroups" runat="server" DomainServiceTypeName="DataSources.GroupsDomainService"
    EnableDelete="True" EnableInsert="True" EnableUpdate="True" QueryName="GetGroups">
</asp:DomainDataSource>

I'm getting following error:

Server Error in '/' Application.

The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NotSupportedException: The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.]
   System.Data.Objects.ELinq.PassthroughOrderByLifter.Skip(DbExpression k) +94
   System.Data.Objects.ELinq.ExpressionConverter.Skip(DbExpressionBinding input, DbExpression skipCount) +31
   System.Data.Objects.ELinq.SkipTranslator.TranslatePagingOperator(ExpressionConverter parent, DbExpression operand, DbExpression count) +63
   System.Data.Objects.ELinq.PagingTranslator.TranslateUnary(ExpressionConverter parent, DbExpression operand, MethodCallExpression call) +62
   System.Data.Objects.ELinq.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +81
   System.Data.Objects.ELinq.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod) +14
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +102
   System.Data.Objects.ELinq.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq) +54
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +110
   System.Data.Objects.ELinq.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +58
   System.Data.Objects.ELinq.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod) +14
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +102
   System.Data.Objects.ELinq.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq) +54
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +110
   System.Data.Objects.ELinq.ExpressionConverter.Convert() +16
   System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +110
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +149
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +44
   System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() +36
   System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() +10
   System.ServiceModel.DomainServices.Server.DomainService.Enumerate(IEnumerable enumerable, Int32 estimatedResultCount) +299
   System.ServiceModel.DomainServices.Server.DomainService.Query(QueryDescription queryDescription, IEnumerable`1& validationErrors, Int32& totalCount) +1289
   Microsoft.Web.UI.WebControls.DomainDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +435
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   Telerik.Web.UI.GridTableView.PerformSelect() +16
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Telerik.Web.UI.GridTableView.DataBind() +259
   Telerik.Web.UI.RadGrid.DataBind() +87
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
   System.Web.UI.Control.EnsureChildControls() +102
   Telerik.Web.UI.GridBaseDataList.get_Controls() +15
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +41
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +623
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +623
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +623
   Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +623
   Telerik.Web.UI.RadFormDecorator.DecorateAspNetControls() +39
   Telerik.Web.UI.RadFormDecorator.ControlPreRender() +624
   Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +22
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237


Could you help me please?

Thank you



JiriSchmitt
Top achievements
Rank 1
 answered on 17 Jan 2012
3 answers
258 views
I have a radgrid which displays data that is entered from rad editor.  The problem is that the grid shows several char values instead of the way it was entered. 

The grid is bound from code being and I dont have an option to set the format of the column to HTMLEditorColumn in desing view.  I was thinking to do this in code behind but did not know how to do that. 

can you please provide some light on the same

general structure of the code is 

RadGrid1.DataSource = DataTable
RadGrid1.DataBind()

For z = 0 To RadGrid1.MasterTableView.RenderColumns.Count - 1

If  <some condition to identify column> then
RadGrid1.MasterTableView.RenderColumns(z).  -- what should the code be here to set the correct format of the column
        End if 

Next


Also, can this be done in the pre-render event or does this need to be done somewhere else.  Any help provided will be much appreciated.
Andrey
Telerik team
 answered on 17 Jan 2012
1 answer
62 views
Hi Everybody


Could you suggest me about the following problem?
I want to produce the telerik report which data are coming from the telerik radgrid check box checked items. How should I do for logically? I got the checked items' keyvalues but how can I retrieve from database and pass to telerik    report.
 Pls anyone suggestion !

Thanks
Htut   
Andrey
Telerik team
 answered on 17 Jan 2012
4 answers
133 views
Hi,

I need to get buttons by their attributes (these attributes are set server-side). These buttons need to be activated, all other buttons must be deactivated. With activated I mean "visible", not "enabled".

How I can I get a collection of all buttons attached to the RibbonBar and how can I get their attributes?

Thanks!
Peter From LA
Top achievements
Rank 1
 answered on 17 Jan 2012
5 answers
122 views
Hi there,

How can i access the "Individual Buttons for transfer of data between two ListBox"
Bozhidar
Telerik team
 answered on 17 Jan 2012
1 answer
39 views

my rad upload is in a  format tempelate which is in the details table of rad grid , i want to implement required field validation on the upload control , i am attaching the markup with the post for your further convenience , thnx


 

 

 

<telerik:GridTableView DataKeyNames="IncomingDocumentRegisterPA.Id,Id" Name="IncDocRegInit"

 

 

 

 

 

 

 

 

Width="100%" CommandItemDisplay="Top" EditMode="EditForms">

 

 

 

 

 

 

 

 

<EditFormSettings EditFormType="Template" PopUpSettings-Height="260px" PopUpSettings-Width="400px"

 

 

 

 

 

 

 

 

PopUpSettings-Modal="true">

 

 

 

 

 

 

 

 

<FormTemplate>

 

 

 

 

 

 

 

 

<div class="BoxHeadFull">Selection of initiator by personal assistant(PA)</div>

 

 

 

 

 

 

 

 

<!-- INSIDE CHROME -->

 

 

 

 

 

 

 

 

<asp:ValidationSummary ID="vsInitiator" ValidationGroup="vgrpInitiator" runat="server"

 

 

 

 

 

 

 

 

ShowMessageBox="true" />

 

 

 

 

 

 

 

 

<table border="0" cellspacing="0" cellpadding="0" width="100%">

 

 

 

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

 

<tr>

 

 

 

 

 

 

 

 

<td bgcolor="#ffffff" align="left" class="FormTextBlue">Select scanned document<span class="FormRequiredField"> * </span></td>

 

 

 

 

 

 

 

 

<td bgcolor="#ffffff" align="left">

 

 

 

 

 

 

 

 

<span class="FormText">

 

 

 

 

 

 

 

 

<telerik:RadUpload ID="rfScannedDocument" InitialFileInputsCount="1" MaxFileInputsCount="1" ControlObjectsVisibility="None" runat="server"></telerik:RadUpload>

 

 

 

 

 

 

<%

 

-- <asp:CustomValidator ID="ValidateUpload" ControlToValidate="rfScannedDocument" runat="server" ErrorMessage="CustomValidator" OnServerValidate="ServerValidation"></asp:CustomValidator>--%>

 

 

 

</span>

 

 

 

 

 

 

 

 

 

 

</td>

 

 

 

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

</MasterTableView>

 

</

 

 

telerik:RadGrid>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bozhidar
Telerik team
 answered on 17 Jan 2012
6 answers
204 views
I am using a RadScheduler, and have some issues. I cant seem to get rid of the edit templates. What i have done is, in the OnClientAppointmentDoubleClick event, i do some custom Javascript code. I want only this code to run, and dont want to see any edit templates etc from the telerik control. But when i run this, the template for editing is displayed when i double click an appointment. How can I avoid this? I have set AllowEdit="False", but that does not seem to help. And i cannot catch the AppointmentEditingEvent from this post:http://www.telerik.com/community/forums/silverlight/scheduler/how-to-disable-some-features-of-radscheduler.aspx
for 2 reasons:
1. I still want the user to be able to expand an item by clicking and dragging.
2. There IS NO SUCH EVENT on the Scheduler control.

How can I disable the edit template showing up when double clicking an appointment?


What I actually want to do is:
- User double clicks an appointment
- Hide scheduler
- Show a hidden panel
- Put ID, subject, start and end of the clicked appointment into textboxes inside the new panel

And I would like this panel to be TOTALLY INDEPENDANT of the Scheduler. Possible? 
Ivana
Telerik team
 answered on 17 Jan 2012
2 answers
94 views
Hi,

I want to assign an id to each cell of scheduler, so that when the user do click in scheduler, a custom popup page be displayed and the querystring have the assigned id.

I have the code to open a popup page, but I don't know how to pass some id

    function OnClientAppointmentClick(sender, e)
    {
        var x = newWin('../Tasks/Task.aspx?tid=1', '700', '700', 'S');
        return false;
    }
 
    function OnClientTimeSlotClick(sender, args)
    {
        var x = newWin('../Tasks/Task.aspx', '700', '700', 'S');
        return false;
    }    
   </script>
 
--------------------------------------------------
 
    <telerik:RadScheduler runat="server" ID="RadScheduler1" Height="600px" DayStartTime="00:00:00"
        DayEndTime="23:00:00"
        DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
        DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentId"
        AppointmentStyleMode="Default"
        ShowResourceHeaders="false"
        DataReminderField="Reminder"
        SelectedView="WeekView"
        ShowFooter="false"
        FirstDayOfWeek="Monday"
        LastDayOfWeek="Saturday"
        OnClientAppointmentClick="OnClientAppointmentClick"
        OnClientTimeSlotClick="OnClientTimeSlotClick"
        ShowHoursColumn="false"
        ShowAllDayRow="false"
        ShowFullTime="false"
        ShowViewTabs="false">
        <AdvancedForm Modal="true" Enabled="false" />
        <TimelineView UserSelectable="false" />
 
        <TimeSlotContextMenuSettings EnableDefault="false" />
        <AppointmentContextMenuSettings EnableDefault="false" />       
        <Reminders Enabled="false" />
    </telerik:RadScheduler>

Thanks for your help.

Segundo Serrano 
Plamen
Telerik team
 answered on 17 Jan 2012
0 answers
75 views
Hi,
I configured my RadListview to provide sorting and delete feature. I have set AllowMutlipleSorting attribute to "true". I divided radListView into 2 column, one column binded to string field and another column which contains Delete Icon. On Click of Delete Icon, We  need to delete record from database as well as RadListViewItem. Please provide me any support for sorting and deletion programatically.

-Mahens
Nannu
Top achievements
Rank 1
 asked on 17 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?