Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
136 views
With the latest 2015.2.623 version of Telerik.Web.UI we discovered an issue when using RadPersistenceManager control to load the grid settings. In such case the control hangs due to a bug in the aforementioned version. Nevertheless, we have already included a fix in the internal build and also one will be included in the SP1.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 13 Jul 2015
7 answers
618 views

Hi,

How do we set the date format when using the new xlsx format export from a grid?

All we get in Excel is that all datetime columns gets the custom format: M-D-ÅÅÅÅ. No matter what we do...

Even in the online sample, both date columns are formatted in this way:

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/excel-export/defaultcs.aspx

We tried setting the DataFormatString of the grid column, no change...

Regards
Andreas

Viktor Tachev
Telerik team
 answered on 13 Jul 2015
1 answer
217 views

I have a column in the grid which returns multiple data vertically. How can I display the content horizontally?

i.e. my column displays:

AB

CD

EF

 

but I need to display: AB, CD,EF

this is my code:

<telerik:GridBoundColumn DataField="Specialty" HeaderText="Specialty" SortExpression="Specialty" ItemStyle-Width="9%"
HeaderStyle-Width="9%" UniqueName="Specialty"
FilterControlWidth="30px" ItemStyle-HorizontalAlign="Left" FilterControlToolTip="Search by Specialty" AutoPostBackOnFilter="true"
FooterText="Total Credits: " FooterStyle-HorizontalAlign="Right" FooterStyle-Font-Bold="true" FilterImageToolTip="Search by Specialty" HeaderTooltip="Sort by Specialty" >
</telerik:GridBoundColumn>

Thanks,

Eyup
Telerik team
 answered on 13 Jul 2015
4 answers
122 views

Currently we have a modal, with a grid inside of that. The bug is, if I add a row then delete the same row then attempt to save the grid, there is a javascript error, linked below:

http://prntscr.com/7qf6zr

is this an issue with my code? this bug does not trigger itemcommand, or batcheditcommand. Probably because of the clientside bug.

Viktor Tachev
Telerik team
 answered on 13 Jul 2015
1 answer
147 views

I was interested in adding a google map to a page on a RadMultiPage.  How do I get the javascript to execute whenever the specific RadPageView is actually visible?

* At its core, the google map is an image attached to a DIV tag.  Here's a decent introduction to an older version (http://www.codeproject.com/Articles/291499/Google-Maps-API-V-for-ASP-NET).

Ivan Danchev
Telerik team
 answered on 13 Jul 2015
3 answers
53 views
Can you provide an example on how to have page numbers on the exported pdf?
Aneliya Petkova
Telerik team
 answered on 13 Jul 2015
3 answers
225 views

I am doing the following at the moment and it seems to work, not sure there is not a method I could use.

 
var dataSource;
        function RequestStart(sender, args) {
            dataSource = $find('<%= RadClientDataSource1.ClientID %>');
            dataSource._transport.read.url = dataSource._transport.baseUrl + "GetListProducts/3";
        };

 Thanks, Marty

 

Marin
Telerik team
 answered on 13 Jul 2015
1 answer
95 views

I have the following Radgrid control with AllowPaging = true. The Items in the Radgrid are sorted in decreasing order after the date in the second column. After I insert a row, I want the focus to be set on the page where the item was inserted. I have tried the following code in the Insert_Command event:

<telerik:RadGrid ID="rgCondica"
            runat="server"
            AllowPaging="true"
            AllowCustomPaging="true"
            AllowSorting="True"
            AutoGenerateColumns="False"
            Skin="Windows7"
            OnItemCommand="rgCondica_ItemCommand"
            OnItemDataBound="rgCondica_ItemDataBound"
            OnInsertCommand="rgCondica_InsertCommand"
            OnUpdateCommand="rgCondica_UpdateCommand"
            OnDeleteCommand="rgCondica_DeleteCommand"
            OnNeedDataSource="rgCondica_NeedDataSource"
            CellSpacing="0"
            CssClass="c1grid"
            GridLines="None"
            PageSize="5" PagerStyle-ShowPagerText="False"
            PagerStyle-AlwaysVisible="true" MasterTableView-NoMasterRecordsText="Nu exista inregistrari" PagerStyle-FirstPageToolTip="Prima pagina"
            PagerStyle-LastPageToolTip="Ultima pagina" PagerStyle-PageSizeLabelText="Nr. inregistrari:" PagerStyle-PrevPagesToolTip="Paginile anterioare"
            PagerStyle-PrevPageToolTip="Pagina anterioara" PagerStyle-NextPagesToolTip="Paginile urmatoare" PagerStyle-NextPageToolTip="Pagina anterioara">
            </telerik:RadGrid​>
protected void rgCondica_InsertCommand(object sender,GridCommandEventArgs e){
GridDataItem item = rgCondica.MasterTableView.FindItemByKeyValue("IdCondica", c.IdCondica);
 rgCondica.CurrentPageIndex = item.RowIndex;
 rgCondica.Rebind();}

but it remains on the last page.

 

Any help is appreciated. Thank you.

Eyup
Telerik team
 answered on 13 Jul 2015
1 answer
146 views

Hi,

 I just want to change color for "Week,Day,Month,Year" buttons to white because its unreadable. I couldn't find any property to change them please find the attached image of RadGantt and here is my code

    <telerik:RadGantt ID="RadGantt1" runat="server"  Height="245px"  Width="1122px"
         AutoGenerateColumns="false" ReadOnly="true" SelectedView="MonthView">
            <YearView UserSelectable="true"  />
               <Columns>
                 <telerik:GanttBoundColumn DataField="Title" DataType="String"></telerik:GanttBoundColumn>
              </Columns> 
           <DataBindings >
                <TasksDataBindings IdField="ID"   TitleField="Title"  StartField="Start"  EndField="End" 
                    PercentCompleteField="PercentComplete"  OrderIdField="OrderID"  SummaryField="Summary"  ParentIdField="ParentID" />
                <DependenciesDataBindings  IdField="ID"  PredecessorIdField="PredecessorID" 
                    SuccessorIdField="SuccessorID"  TypeField="Type" />
            </DataBindings>
        </telerik:RadGantt> 

  

Aneliya Petkova
Telerik team
 answered on 13 Jul 2015
1 answer
122 views

I have hierarchy grid. I am able to edit\delete parent grid but not child grid (second grid). I using the same code behind and subs for both the grids. When I click on edit button for row of second grid, it enables edit mode but when I click on update button, it is not changing values on UI nor in database tables. And build is correct, it is not giving any error. Following is my code. If anybody can please help me!

 

<%@ Page Language="vb" AutoEventWireup="false" Inherits="WebApplication1.invoice_details" CodeBehind="invoice_details.aspx.vb" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <div>
        <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" ShowStatusBar="true"
            AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
            AllowAutomaticDeletes="True" 
            AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" OnItemDeleted="RadGrid1_ItemDeleted">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataSourceID="SqlDataSource1" EditMode = "InPlace" DataKeyNames="case_id" AllowMultiColumnSorting="True"
                Width="100%" CommandItemDisplay="Top" Name="Cases">
                <DetailTables>
                    <telerik:GridTableView EditMode = "InPlace" DataKeyNames="item_id" DataSourceID="SqlDataSource2" Width="100%"
                        runat="server" CommandItemDisplay="Top" Name="Items">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="case_id" MasterKeyField="case_id"></telerik:GridRelationFields>
                        </ParentTableRelation>                        
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn2">
                                <HeaderStyle Width="20px"></HeaderStyle>
                                <ItemStyle CssClass="MyImageButton"></ItemStyle>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn SortExpression="grp_id" HeaderText="Group" HeaderButtonType="TextButton"
                                DataField="grp_id" UniqueName="grp_id" ReadOnly = "True">
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn SortExpression="item_id" HeaderText="Item ID" HeaderButtonType="TextButton"
                                DataField="item_id" UniqueName="item_id" ReadOnly = "True" Visible = "False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="inv_item_desc" HeaderText="Item Description" HeaderButtonType="TextButton"
                                DataField="inv_item_desc" UniqueName="inv_item_desc">
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn SortExpression="inv_item_rate" HeaderText="Rate" HeaderButtonType="TextButton"
                                DataField="inv_item_rate" UniqueName="inv_item_rate">
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn SortExpression="inv_item_qty" HeaderText="Quantity" HeaderButtonType="TextButton"
                                DataField="inv_item_qty" UniqueName="inv_item_qty">
                            </telerik:GridBoundColumn>   
                            <telerik:GridBoundColumn SortExpression="total" HeaderText="Total" HeaderButtonType="TextButton"
                                DataField="total" UniqueName="total" ReadOnly = "True">
                            </telerik:GridBoundColumn>                         
                            <telerik:GridButtonColumn ConfirmText="Delete these details record?" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn2">
                                <HeaderStyle Width="20px"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                            </telerik:GridButtonColumn>
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <HeaderStyle Width="20px"></HeaderStyle>
                        <ItemStyle CssClass="MyImageButton"></ItemStyle>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn SortExpression="case_id" HeaderText="Case ID" HeaderButtonType="TextButton"
                        DataField="case_id" UniqueName="case_id" MaxLength="5" ReadOnly = "True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="case_file_nbr" HeaderText="Case File Number" HeaderButtonType="TextButton"
                        DataField="case_file_nbr" UniqueName="case_file_nbr">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="case_desc" HeaderText="Case Description" HeaderButtonType="TextButton"
                        DataField="case_desc" UniqueName="case_desc">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this case?" ButtonType="ImageButton"
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                        <HeaderStyle Width="20px"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                    </telerik:GridButtonColumn>
                </Columns>
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="case_desc"></telerik:GridSortExpression>
                </SortExpressions>
            </MasterTableView>
        </telerik:RadGrid>
    </div>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
        DeleteCommand="DELETE FROM tbl_inv_case WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id"
        SelectCommand="SELECT case_id,case_file_nbr,case_desc from tbl_inv_case where org_id='Oindem' and inv_no=31"
        UpdateCommand="UPDATE tbl_inv_case SET case_file_nbr = @case_file_nbr, case_desc = @case_desc WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id">
        <DeleteParameters>
            <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="org_id" Type="String"></asp:Parameter>
            <asp:Parameter Name="inv_no" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_amnt" Type="String"></asp:Parameter>
                <asp:SessionParameter Name="login_id" Type="string"  SessionField="loginid" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_file_nbr" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_desc" Type="String"></asp:Parameter>
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="Server=172.18.1.11;Database=ent64ast;user id=entqalogin;password=en7qal8g1n5"
        DeleteCommand="DELETE FROM tbl_inv_case_items WHERE org_id= 'Oindem' and inv_no=31 and case_id = @case_id and item_id = @item_id"
        SelectCommand="SELECT grp_id,case_id,item_id,inv_item_desc,inv_item_rate,inv_item_qty, cast(inv_item_rate*inv_item_qty as decimal(18,2)) 'total' FROM tbl_inv_case_items WHERE org_id='Oindem' AND inv_no=31 AND case_id = @case_id ORDER BY grp_id,case_id, inv_item_seqn"
        UpdateCommand="UPDATE tbl_inv_case_items SET inv_item_desc = @inv_item_desc, inv_item_rate = @inv_item_rate, inv_item_qty = @inv_item_qty WHERE org_id= 'Oindem' AND inv_no=31 AND case_id = @case_id AND item_id = @item_id">
        <DeleteParameters>
            <asp:Parameter Name="item_id" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
        </DeleteParameters>
        <SelectParameters>
        <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="inv_item_desc" Type="String"></asp:Parameter>
            <asp:Parameter Name="inv_item_rate" Type="Double"></asp:Parameter>
            <asp:Parameter Name="inv_item_qty" Type="Double"></asp:Parameter>
            <asp:Parameter Name="item_id" Type="String"></asp:Parameter>
            <asp:Parameter Name="case_id" Type="String"></asp:Parameter>
        </UpdateParameters>
    </asp:SqlDataSource>    
    </form>
</body>
</html>

Viktor Tachev
Telerik team
 answered on 13 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?