Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
272 views
Hallo,

The class GridTableView supplies the method ExportToPdf(). This method writes the generated PDF-Data to the Page.Response. What I need is a method/solution which doesn't writes to Page.Response and returns a byte-Array or Stream which represents the PDF. Something like that:

public Byte[] ExportToPdfAsByteArray();

Does anyone know how to realize that?

BTW: I have seen the example from Telerik where a method was attached to the GridExporting-Event to extract the PDF-Data from the GridExportingArgs and write the pdf to a file. But that isn't a solution for me because it still writes to HttpResponse and it does a Response.Redirect to the actual page.

Thanks

Oliver
Konstantin Dikov
Telerik team
 answered on 17 Mar 2015
5 answers
213 views
Hi,

I have a RadPanel Bar and Panel items inside that. I have a grid view in which there is a textbox with autocomplete extender feature.

When i type the value in the textbox the Completion list of extender control is not going behind the panel bar and it hides behind the panel bar.

I tried to set the postioning to absoulte and z-index, but no luck

Please help me out on resolving this

Regards,
Ravi












Magdalena
Telerik team
 answered on 17 Mar 2015
3 answers
895 views
I have searched the forums but hve not found anything exactly like this, so forgive if I'm asking a question that's already been answered.

I have a grid where the record is in edit mode. The user tabs from one textbox to the next, entering data. the last tab stop is the check button. When the user tabs to the check button and then hits enter, the OnUpdate code fires. But the row is updated and the row closes and the cursor goes to the next tab stop (in this case, the beginning of the page). I have used SetFocus(AcctHeaderDetail.MasterTableView) to keep the focus on the grid. It does, but the focus goes to the insert button in the grid.

What I need to do is keep the focus in the grid in such a way that the user is able to use the down arrow to move down to the next record, hit Enter and the row opens up for editing.

Ho do I manage control of what object receives the focus after the OnUpdate code behind executes?
Viktor Tachev
Telerik team
 answered on 17 Mar 2015
3 answers
51 views
I am trying to access to a new added row in radgrid which is not committed yet. Just a new row is added and user enters data. Onclick on a link on this row a new method is being invoked which updates two fields in this particular row. So when user actually click on the insert button the updated fields are saved to the db along with user entry. So I want to know how refer to this newly added row in the radgrid which is not saved yet.

Thanks!
Maria Ilieva
Telerik team
 answered on 17 Mar 2015
3 answers
94 views
How can I combine two display members in a GridDropDownColumn. For example my table has a column Item_Id. The item table has a Make and Model field. I want my combobox to display Make-Model.
Viktor Tachev
Telerik team
 answered on 17 Mar 2015
3 answers
142 views
I reviewed this example: http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-types/defaultcs.aspx and cannot seem to replicate this in my application.

                <telerik:GridDropDownColumn DataField="Item_Id" DataType="System.Int32" FilterControlAltText="Filter Item_Id column" HeaderText="Item"  UniqueName="Item_Id" AutoPostBackOnFilter="true" DataSourceID="EntityDataSourceItem" ListValueField="Id"  ListTextField="Model" AllowVirtualScrolling="true" ShowMoreResultsBox="true" ItemsPerRequest="10" SortExpression="Item_Id" EmptyListItemText="Select" AllowAutomaticLoadOnDemand="true" DropDownControlType="RadComboBox" >
                </telerik:GridDropDownColumn>
 
<asp:EntityDataSource ID="EntityDataSourceItem" runat="server" ConnectionString="name=autocalEntities" DefaultContainerName="autocalEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="items"></asp:EntityDataSource>

Everything populates correctly on load but when I attempt to edit and retrieve a filtered list from the gridview i get the object reference not set to an instance of an object exception. Any idea what I am missing? 

Thanks,
Josh
Maria Ilieva
Telerik team
 answered on 17 Mar 2015
6 answers
452 views
I have a grid with a GridDateTimeColumn. I do InPlace editing on the grid. I need to validate that the date entered is a valid date. I can't see to determine how to do this. I tried the RequiredFieldValidator, but that doesn't work correctly. If I enter an invalid date, and click the update button, the date field gets the red box around it and the grid goes out of edit mode and reverts rebinds.

How can I flag the invalid date, notify the user the date is invalid and keep the grid in edit mode?

This is my grid.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
      AllowSorting="True" DataSourceID="Datasource"
      AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
      AllowAutomaticDeletes="true" ShowFooter="true"
      Skin="Forest" PageSize="100"
      OnItemCommand="RadGrid1_ItemCommand"
      CellSpacing="0" GridLines="None">
      <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true"></Scrolling>
      </ClientSettings>
 
        <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" DataKeyNames="ID"
           AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
           AllowAutomaticDeletes="true"  DataSourceID="Datasource"
           CommandItemDisplay="Top">
            <CommandItemTemplate>
                <div style="padding: 5px 5px;">
                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# Not RadGrid1.MasterTableView.IsItemInserted%>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/AddRecord.gif"/>Add new description</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Insert.gif"/>Add this description</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton7" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.MasterTableView.IsItemInserted%>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Cancel.gif"/>Cancel</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count = 0%>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Edit.gif"/>Edit this description</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton5" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0%>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Update.gif"/>Update this description</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton6" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.EditIndexes.Count > 0%>'><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Cancel.gif"/>Cancel</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton8" OnClientClick="javascript:return confirm('Deactivate selected description?')" runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Delete.gif"/>Deactivate selected description</asp:LinkButton>  
                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../Images/Refresh.gif"/>Refresh description display</asp:LinkButton>
                </div>
            </CommandItemTemplate>
 
            <SortExpressions>
                <telerik:GridSortExpression FieldName="DateHoliday" SortOrder="Ascending" />
            </SortExpressions>
            <Columns>
                <telerik:GridBoundColumn DataField="ID"  UniqueName="ID" Visible="false" ReadOnly="true" />
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" UniqueName="Description"/>
                <telerik:GridDateTimeColumn DataField="DateHoliday" HeaderText="Date of Holiday" UniqueName="DateHoliday" PickerType="DatePicker" DataFormatString="{0:MM/dd/yyyy}" >
                    <ColumnValidationSettings EnableRequiredFieldValidation="true" >
                        <RequiredFieldValidator runat="server" ErrorMessage="Please enter a valid date."></RequiredFieldValidator>
                    </ColumnValidationSettings>
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="TimeOpen" HeaderText="Opening time" UniqueName="TimeOpen" PickerType="TimePicker" DataFormatString="{0:t}" />
                <telerik:GridDateTimeColumn DataField="TimeClosed" HeaderText="Closing Time" UniqueName="TimeClosed" PickerType="TimePicker" DataFormatString="{0:t}"/>
                <telerik:GridCheckBoxColumn DataField="Active" UniqueName="Active" HeaderText="Active" />
            </Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
        </ClientSettings>
         
    </telerik:RadGrid>
Konstantin Dikov
Telerik team
 answered on 17 Mar 2015
7 answers
154 views
Hello,

I have a strange problem here. I have a grid where some rows are selectable and some are not based on certain criteria. The user can execute different queries to produce different results, which in-turn produces different unselectable rows. The problem is, the unselectableItemsIndex in the grid's client state is not staying in sync. The rows that were unselectable in the previous query become unselectable in the new result set. This problem seems to compound itself with each new query. In other words, it seems the unselectableItemsIndex array is just appended to.

Oh, this is all happening via AJAX.

Any help would be appreciated.

Blair
Angel Petrov
Telerik team
 answered on 17 Mar 2015
1 answer
78 views
Hi

RadTreeView OnNodeClick IE11 error event Fires unnecessary multiple times without the user clicking on the node. But in IE9, Chrome and firefox it works fine. Any suggestions?

<telerik:RadTreeView ID="xyz" runat="server" DataFieldID="Key" 
                                    DataFieldParentID="ParentKey" DataTextField="TreeName" DataValueField="Key" 
                                    OnClientNodeClicking="treeViewMiningEquipment_ClientClickHanlder"
                                    OnClientLoad="treeViewMiningEquipment_Load"
                                    OnNodeClick="treeViewMiningEquipments_NodeClick"
                                    >
Ivan Danchev
Telerik team
 answered on 17 Mar 2015
4 answers
139 views
Hi
I have a scheduler using the advanced template for edit & insert.
The End Date is set programmatically.
I want to hide the End Date input entirely (date picker, time picker and label) on both the edit and insert forms.
I am using this method to hide the all day checkbox and I can also hide the End Date picker using this method but the time picker and the End date label still appears on the Edit form.
I want to hide all controls for End Date Input on both Edit & Insert forms.
Thanks in advance
Chris

Protected Sub RadScheduler1_FormCreated(sender As Object, e As Telerik.Web.UI.SchedulerFormCreatedEventArgs)
    If (e.Container.Mode = SchedulerFormMode.AdvancedEdit) OrElse (e.Container.Mode = SchedulerFormMode.AdvancedInsert) Then
        Dim allDayCheckBox As CheckBox = DirectCast(e.Container.FindControl("AllDayEvent"), CheckBox)
        allDayCheckBox.CssClass = "Hide"
         
        Dim endDate As RadDatePicker = DirectCast(e.Container.FindControl("EndDate"), RadDatePicker)
        endDate.CssClass = "Hide"
 
        Dim startDate As RadDatePicker = TryCast(e.Container.FindControl("StartDate"), RadDatePicker)
        startDate.ClientEvents.OnDateSelected = "changeEndDate"
         
    End If
End Su
Ivan Danchev
Telerik team
 answered on 17 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?