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

I am trying to implement the server side ExportToExcel/pdf/csv functions.
When export option is selected Open is not seen on the window. Only Save and Cancel are seen.

I have the ExportSettings.OpenInNewWindow set to true.

Could you please help me out.

Thanks,
Ashwini
Shinu
Top achievements
Rank 2
 answered on 15 Jul 2011
1 answer
188 views
I have a list of collection list1, in this list, there are one items has sub list of collection (list2, list2 is inside list1).
Can I bind the grid to list1 and auto populate the child grid as list2?

Thanks
Princy
Top achievements
Rank 2
 answered on 15 Jul 2011
6 answers
216 views
hi,

i have a grid inside the radwindow.does anyone has example how can i pick selected row value from it and assign it to main page?
Princy
Top achievements
Rank 2
 answered on 15 Jul 2011
2 answers
134 views
I am trying to adapt the AdvancedForm Scheduler example to leverage the ObjectDataSource. However, it appears I am having problems with the parameter names on insert.

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteAppointment"
    InsertMethod="InsertAppointment" SelectMethod="AllData" TypeName="Tradewind.Core.AppointmentList"
    UpdateMethod="UpdateAppointment">
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="String" />
    </DeleteParameters>
    <UpdateParameters> <!-- Ignore - Trying to get Insert Only working right now -->
        <asp:Parameter Name="ID" Type="String" />
        <asp:Parameter Name="Subject" Type="String" />
        <asp:Parameter Name="Start" Type="DateTime" />
        <asp:Parameter Name="End" Type="DateTime" />
        <asp:Parameter Name="RecurrenceRule" Type="String" />
        <asp:Parameter Name="RecurrenceParentID" Type="Object" />
        <asp:Parameter Name="RecurrenceState" Type="Object" />
    </UpdateParameters>
    <InsertParameters>
        <asp:Parameter Name="Subject" Type="String" />
        <asp:Parameter Name="Start" Type="DateTime" />
        <asp:Parameter Name="End" Type="DateTime" />
        <asp:Parameter Name="Description" Type="String" />
        <asp:Parameter Name="Reminder" Type="Object" />
        <asp:Parameter Name="UserID" Type="Object" />
        <asp:Parameter Name="RoomID" Type="Object" />
        <asp:Parameter Name="RecurrenceRule" Type="String" />
        <asp:Parameter Name="RecurrenceParentID" Type="Object" />
        <asp:Parameter Name="RecurrenceRuleText" Type="String" />
        <asp:Parameter Name="RecurrenceState" Type="Object" />
    </InsertParameters>
</asp:ObjectDataSource>
<div class="exampleContainer">
    <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px"
        DataEndField="End" DataKeyField="ID"
        DataRecurrenceField="RecurrenceRule"
        DataRecurrenceParentKeyField="RecurrenceParentID"
        DataSourceID="ObjectDataSource1"
        DataStartField="Start"
        DataSubjectField="Subject"
        SelectedDate="2007-03-30" TimeZoneOffset="03:00:00"
        OnDataBound="RadScheduler1_DataBound" AppointmentStyleMode="Default"
        OnAppointmentCreated="RadScheduler1_AppointmentCreated"
        OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
        OnClientFormCreated="schedulerFormCreated"
        EnableDescriptionField="true">
        <AdvancedForm Modal="true" />
        <Reminders Enabled="true" />
        <AppointmentTemplate>
            <div class="rsAptSubject">
                <%# Eval("Subject") %>
            </div>
            <%# Eval("Description") %>
        </AppointmentTemplate>
        <AdvancedEditTemplate>
            <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                Subject='<%# Bind("Subject") %>'
                Description='<%# Bind("Description") %>'
                Start='<%# Bind("Start") %>'
                End='<%# Bind("End") %>'
                RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                Reminder='<%# Bind("Reminder") %>'
                UserID='<%# Bind("User") %>'
                RoomID='<%# Bind("Room") %>' />
        </AdvancedEditTemplate>
        <AdvancedInsertTemplate>
            <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
                Subject='<%# Bind("Subject") %>'
                Start='<%# Bind("Start") %>'
                End='<%# Bind("End") %>'
                Description='<%# Bind("Description") %>'
                RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                Reminder='<%# Bind("Reminder") %>' 
                UserID='<%# Bind("User") %>'
                RoomID='<%# Bind("Room") %>' />
        </AdvancedInsertTemplate>
        <TimelineView UserSelectable="false" />
        <TimeSlotContextMenuSettings EnableDefault="true" />
        <AppointmentContextMenuSettings EnableDefault="true" />                
    </telerik:RadScheduler>

My Object which this is bound to "Tradewind.Core.AppointmentList" looks like the following.

public static void InsertAppointment(
    string Subject, DateTime Start, DateTime End, string Description,
    Object UserID, Object RoomID, string RecurrenceRule, Object RecurrenceParentID, string RecurrenceRuleText, Telerik.Web.UI.RecurrenceState RecurrenceState)
{
    List<AppointmentInfo> sessApts = AllData();
    AppointmentInfo ai = new AppointmentInfo(Subject, Start, End);
    ai.RecurrenceRule = RecurrenceRule;
    ai.RecurrenceParentID = RecurrenceParentID;
    ai.RecurrenceState = RecurrenceState;
    sessApts.Add(ai);
}

This worked fine for the basic example, but gets more complex with the AdvancedForm and new resources. I know this has something to do with my ObjectDataSource not having the correct parameters as I get the following error.

bjectDataSource 'ObjectDataSource1' could not find a non-generic method 'InsertAppointment' that has parameters: Subject, Start, End, Description, Reminder, UserID, RoomID, RecurrenceRule, RecurrenceParentID, RecurrenceRuleText, RecurrenceState, .
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.InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'InsertAppointment' that has parameters: Subject, Start, End, Description, Reminder, UserID, RoomID, RecurrenceRule, RecurrenceParentID, RecurrenceRuleText, RecurrenceState, .
 
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:
 
[InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'InsertAppointment' that has parameters: Subject, Start, End, Description, Reminder, UserID, RoomID, RecurrenceRule, RecurrenceParentID, RecurrenceRuleText, RecurrenceState, .]
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e) +39
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +80
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Insert(RadScheduler owner, Appointment appointmentToInsert) +184
   Telerik.Web.UI.SchedulerProviderBase.Insert(ISchedulerInfo schedulerInfo, Appointment appointmentToInsert) +62
   Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointment) +101
   Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointment(ISchedulerInfo schedulerInfo, Appointment appointment) +40
   Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +282
   Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +483
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
   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

Any help on where I can find a collection or something of the proper parameters, or a better suggestion on how to do this would be welcome.

Many thanks.
Kojo
Top achievements
Rank 1
 answered on 15 Jul 2011
0 answers
97 views
Hi all,

My RadGrid Column uses DateTime Type which doesn't have "Contains" in the Filter Option List.
Could I add it manually?

Thanks.

Andy
Andy
Top achievements
Rank 1
 asked on 15 Jul 2011
2 answers
136 views
I have a multi-page radgrid that allows the user to select a singe record.  I persist that selection in a session variable while they go do other things on other pages.

Is there a way for me to load the grid (when  they return) and have it load the grid-page that contains their selected row?  I assume I can cause it to be selected during a server-side event but am not sure how I can control which page the grid shows or be sure that it is going to contain the saved selected item.

Advice?

Thanks.

Mike
Mike
Top achievements
Rank 1
 answered on 14 Jul 2011
1 answer
172 views
I'm guessing that my problem is because of a limitation i found here client side binding specifics :"Data editing and grid editors. Since the control is bound on the client, and no subsequent trips are made to the server, the default editors cannot be rendered, and shown, which is the standard behavior, when the grid is bound on the server."  So I assume I'll need to add an external edit form as suggested. Please let me know if that is the case, or if I'm simply missing something below.

I have a radgrid with a number of gridtemplatecolumns, most of which contain radtextboxes, radnumerictextboxes and radcomboboxes that the user can edit at any time, without setting individual columns in edit mode. This all worked well using server side binding, but was slow (my customer needs to be able to add and save new rows in about 1 second or less, partial postbacks are taking ~4 seconds).
I am now attempting to get client side binding to work, and have hit a roadblock while trying to add a new row on the client side. I see that a new row is added below my other rows, but only the GridClientSelectColumn's checkbox on the leftmost column is displayed on the new row, all the template columns with textboxes and comboboxes are blank, not just empty controls, the controls aren't in the new column at all.


I call AddNewRow() to add a row, getValues() is a js function which supplies the default values for the new row, and InsertRowToDataSource() webservice returns a JSON string of the current grid data plus one new row with default values (e.g. [{id:"123", RoomName:"x"}, {id:"456", RoomName:"y"}]  ) and finally, on rowdatabound, RadGrid1_RowDataBound(...) is called so i can set values on my template controls. However, my template controls appear to not exist on the new row.
       
function AddNewRow()
        {
            wsLookup.InsertRowToDataSource(getValues(), updateGrid);
            return false;
        }
         
        function updateGrid(result)
        {
            var ds = eval(result);
            var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
            tableView.set_dataSource(ds);
            tableView.dataBind();
        }
        function RadGrid1_RowDataBound(sender, args)
        {
            var room = args.get_item().findControl("rtbRoom");  // var room is null on the new row
            room.set_value(args.get_dataItem()["RoomName"]);
        }

and here is my radgrid (with some columns omitted):
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSourceAudit" EnableAJAX="True" EnableOutsideScripts="True"
     AutoGenerateColumns="False" GridLines="None" Width="100%" Height = "100%" PageSize="8" Skin="Office2007" ShowStatusBar="True" OnItemDataBound="RadGrid1_ItemDataBound" >
         <MasterTableView DataSourceID="SqlDataSourceAudit" CommandItemDisplay="Top" ClientDataKeyNames="AuditEntryID">
             <CommandItemSettings ExportToPdfText="Export to Pdf" />
             <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
             </RowIndicatorColumn>
             <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
             </ExpandCollapseColumn>
             <Columns>
                <telerik:GridClientSelectColumn Visible="true" HeaderStyle-Width="35px" UniqueName="ClientSelectColumn" HeaderText="Edit" ButtonType="ImageButton" Text="Edit" ImageUrl="~/images/16/pen_16.png" />
                 <telerik:GridTemplateColumn HeaderText="Sort" UniqueName="Sort" FilterControlAltText="Filter Sort column" Display = "false">  
                  <ItemTemplate> 
                      <telerik:RadNumericTextBox ID="rnSort" runat="server" Width = "100%" DataType="System.Int32" MinValue="0">
                          <NumberFormat DecimalDigits="0" />
                      </telerik:RadNumericTextBox>
                  </ItemTemplate>
                     <HeaderStyle Width="40px" />
                </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn HeaderText="Building" UniqueName="Building" FilterControlAltText="Filter Building column">  
                  <ItemTemplate>
                      <telerik:RadComboBox ID="rcbBuilding" runat="server" AllowCustomText="True" Filter="Contains" Width="100%">
                      </telerik:RadComboBox>
                  </ItemTemplate> 
                     <HeaderStyle Width="100px" />
                </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn HeaderText="Area" UniqueName="Area" FilterControlAltText="Filter Area column">  
                  <ItemTemplate> 
                      <telerik:RadTextBox ID="rtbRoom" runat="server" Width="100%" ToolTip="The area or room in the building">
                      </telerik:RadTextBox>
                  </ItemTemplate> 
                     <HeaderStyle Width="100px" />
                </telerik:GridTemplateColumn>
                  
                <telerik:GridButtonColumn ConfirmText="Delete this audit entry?" ConfirmDialogType="RadWindow"
                  ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                  UniqueName="DeleteColumn" ImageUrl="~/images/16/remove_16.png" FilterControlAltText="Filter DeleteColumn column">
                  <ItemStyle HorizontalAlign="Center"/>
                  <HeaderStyle Width="25px" />
                </telerik:GridButtonColumn>
             </Columns>
             <EditFormSettings>
                 <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                 </EditColumn>
             </EditFormSettings>
             <CommandItemTemplate>
                 <table>
                  <tr>
                    <td align="left">
                     <asp:ImageButton ID="btnAdd"
                       CommandName="Insert" Runat="server" ImageUrl = "~/images/16/add_16.png"
                       tooltip="Add new audit line" ></asp:ImageButton>
                     <asp:ImageButton ID="btnSave"
                      CommandName="Save" Runat="server" ImageUrl = "~/images/16/ok_16.png"
                      tooltip="Save all grid changes"></asp:ImageButton>
                    </td>
                    <td align="right">
                     <asp:ImageButton ID="btnRefresh"
                      CommandName="Cancel" Runat="server" ImageUrl="~/images/16/refresh_16.png"
                      tooltip="Refresh grid"></asp:ImageButton>
                    </td>
                  </tr>
                 </table>
            </CommandItemTemplate>
         </MasterTableView>
         <FilterMenu EnableImageSprites="False">
         </FilterMenu>
         <ClientSettings>
             <Selecting AllowRowSelect="True" />
             <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True">
             </Scrolling>
             <Resizing AllowColumnResize="True" />
             <ClientEvents OnRowSelected="RadGrid1_ItemSelected" OnCommand="RadGrid1_Command" OnRowDataBound="RadGrid1_RowDataBound" />
         </ClientSettings>
         <PagerStyle Mode="Slider" />
         <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007">
         </HeaderContextMenu>
     </telerik:RadGrid>
Brett
Top achievements
Rank 1
 answered on 14 Jul 2011
6 answers
300 views
Hi,
I am getting other error as "Web.config missing registration."
I followed every instruction on this link  http://www.telerik.com/support/kb/aspnet-ajax/editor/error-web-config-registration-missing-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file.aspx
but no success. pls guide.
Thanks
Amruta
Amruta
Top achievements
Rank 1
 answered on 14 Jul 2011
4 answers
182 views
Hi,

in our project we have problem with grid width: on page load it's ok, here's piece of markup from page source:
<div tabIndex="0" class="RadGrid RadGrid_GreenSF FullWidth" id="ctl00_cphMain_tc1_ctl00_contentArea_ctl00_ctl01_gridClient" _events="[object Object]" control="[object Object]" EmptyDataText="No data" CommandItemDisplay="Top" jQuery1605439695548107272="158">

but after postback it looks like this:

<div tabIndex="0" class="RadGrid RadGrid_GreenSF FullWidth" id="ctl00_cphMain_tc1_ctl00_contentArea_ctl00_ctl01_gridClient" style="width: 682px;" _events="[object Object]" control="[object Object]" EmptyDataText="No data" CommandItemDisplay="Top" jQuery1608745933755360553="158">

I have no idea where this inline style came from, I have not set width for the grid.

As a result, grid occupies not whole width, as FullWidth (width: 100%) prescribes, but instead some part of the page :(

What could be wrong here?

p.s. There is nothing especial with postback, the only note: postback happens from parent page and the grid is situated in iframe page.
Alexander
Top achievements
Rank 1
 answered on 14 Jul 2011
3 answers
126 views
Hi All,

  I have few buttons on my pager template. The buttons disappear when the last record is left. I want  those buttons to appear if I am on the last record. below is my code. i want the Update Record Button and Save Record button on the pager item. How can i achieve this.
<PagerTemplate>
                <table border="0" cellpadding="0" cellspacing="0" style="height: 20px" width="540px">
       <tr >
         <td style="width:10%" >
          
           <asp:ImageButton ID="btnFirst" runat="server" ImageUrl="~/images/PagingFirst.gif" AlternateText="First" CommandName="Page" CommandArgument="First" />
         </td>
         <td style="width:10%">
        
           <asp:ImageButton ID="btnPrev" runat="server" ImageUrl="~/images/PagingPrev.gif" CommandName="Page" CommandArgument="Prev" />
         </td>
         <td style="width:10%">
    
           <asp:ImageButton ID="imgNext" runat="server" ImageUrl="~/images/PagingNext.gif" CommandName="Page" CommandArgument="Next" />
         </td>
         <td style="width:10%">
         
           <asp:ImageButton ID="imgLast" runat="server" ImageUrl="~/images/PagingLast.gif" CommandName="Page" CommandArgument="Last" />
         </td>
              <td style="width:35%"  >
               <asp:Button ID="Btn_UpdateRecord" runat="server" Text="Update Record" OnClick="Btn_UpdateRecord_Click" />
           </td>
                <td  >
               <asp:Button ID="Btn_FinalizeRecord" runat="server" Text="Save Record" OnClick="Btn_FinalizeRecord_Click" />
           </td>
       </tr>
     </table>
   </PagerTemplate>

Thanks for all the help.
Anjali
Top achievements
Rank 1
 answered on 14 Jul 2011
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?