Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
150 views
The current findItemByText client-side function looks for items with exact text match. Is it possible to use it (or another function) more like a "StartsWith" function?
Ivana
Telerik team
 answered on 23 Aug 2011
1 answer
79 views
Hi, I've got a problem with deleting items in Grid. The issue is only on ie 8 build 6001, others browser work fine. The scenario is: 
1. Click on delete icon on grid row, then the modal popup shows
2. The default generated buttons (Ok and Cancel) doesn't work (there is no postback).

Here's the aspx source code:
<telerik:RadGrid ID="rgEmployees" OnSortCommand="rgEmployees_SortCommand" OnPageIndexChanged="rgEmployees_PageIndexChanged"
            OnPageSizeChanged="rgEmployees_PageSizeChanged" AllowSorting="True" PageSize="15"
            OnItemCommand="rgEmployees_ItemCommand" AllowPaging="True" AllowMultiRowSelection="True"
            AllowFilteringByColumn="True" OnNeedDataSource="rgEmployees_OnNeddDataSource"
            OnUpdateCommand="rgEmployees_UpdateCommand" OnDeleteCommand="rgEmployees_DeleteCommand"
            ShowStatusBar="true" runat="server" GridLines="None">
            <GroupingSettings CaseSensitive="false" />
            <ClientSettings EnablePostBackOnRowClick="true">
            </ClientSettings>
            <MasterTableView DataKeyNames="E_Id" AutoGenerateColumns="false">
                <Columns>
                    <%--  <telerik:GridBoundColumn DataField="E_Id" HeaderText="Identyfikator" UniqueName="E_Id" FilterControlWidth="50px">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="E_Name" HeaderText="Imię" UniqueName="E_Name"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Surname" HeaderText="Nazwisko" UniqueName="E_Surname"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Address" HeaderText="Adres" UniqueName="E_Address"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_City" HeaderText="Miasto" UniqueName="E_City"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Function" HeaderText="Funkcja" UniqueName="E_Function"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_LandlinePhone" HeaderText="Tel. stacjonarny"
                        UniqueName="E_LandlinePhone" FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_MobilePhone" HeaderText="Tel. komórkowy" UniqueName="E_MobilePhone"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Email" HeaderText="E-mail" UniqueName="E_Email"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                        ItemStyle-Width="15" />
                    <telerik:GridButtonColumn ConfirmText="Usunąć pracownika?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Usuwanie" Text="Usuń" ButtonType="ImageButton" CommandName="Delete"
                        ConfirmDialogHeight="150px" ConfirmDialogWidth="260px" ItemStyle-Width="15" />
                </Columns>
                <EditItemStyle ForeColor="Gray" />
                <EditFormSettings>
                    <FormTableItemStyle Wrap="False" Width="100%"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2" CssClass="module"
                        Height="30" BackColor="White" Width="60" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <FormStyle Width="100%"></FormStyle>
                    <EditColumn ButtonType="ImageButton" UpdateText="Uaktualnij wiersz" UniqueName="EditCommandColumn1"
                        CancelText="Anuluj edycję">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
        </telerik:RadGrid>

And here's the delete event code:

protected void rgEmployees_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            LogManager.GetCurrentClassLogger().Info("Usuwam pracownika");
  
            var gridDataItem = e.Item as GridDataItem;
            if (gridDataItem == null)
            {
                LogManager.GetCurrentClassLogger().Info("gridDataItem jest null");
                return;
            }
  
            var id = Convert.ToInt32(gridDataItem.GetDataKeyValue("E_Id").ToString());
  
            _db.DeleteEmployee(id);
            LogManager.GetCurrentClassLogger().Info("Usunąłem pracownika o id = " + id.ToString());
        }

Thank you in advance!
Michal
Top achievements
Rank 1
 answered on 23 Aug 2011
0 answers
89 views
Hello,

I have a few questions about the autosize property of radwindow control:
1) How can set an auto height for radwindow control in case the minimum height which is allowed is 300px?
2) How can set an auto height for radwindow control in case the maximum height which is allowed is 300px?
3) How can set an auto width for radwindow control in case the minimum width which is allowed is 300px?
4) How can set an auto width for radwindow control in case the maximum width which is allowed is 300px?

Please, I need your help,
It is very appreciated to send me a sample code which demonstrates the above issue.

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 23 Aug 2011
1 answer
57 views
We've had users complaining of a sequence of events in our application that was somehow causing Internet Explorer to not just throw a javascript error, but to actually crash completely.  I've narrowed it down to the following recreatable situation.

1) Need 2 pages.  The First page just includes an IFRAME whose source is the second page

2) The Second page has the Rad Editor with content that contains an image. 

3) The Second page contains a button that posts back.

4) Run the First page.  The IFrame loads up the Second page.

5) Right Click on the image in the editor and select "Properties".  After the properties window loads, hit the "Cancel Button"

6) Click the button to initiate a post back.

7) After it comes back, push it a second time.  The browser will crash.  Happens in both IE 8 and IE 9.

Heres my sample pages I used to create this:

Main.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Iframe is Below<br />
    <iframe id="main" frameborder="0" width="800px" height = "500px" src="frame.aspx">
    </iframe>
    </div>
    </form>
</body>
</html>

Frame.aspx
%@ Page Language="VB" AutoEventWireup="false" CodeFile="frame.aspx.vb" Inherits="frame" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <div>
    <asp:Button ID="postit" Text="Cause Postback" runat=server />
    <telerik:RadEditor ID="RadEditor1" Runat="server">
    <Content>Test<br />
        <img alt="" src="/RadControlsWebSite1/e3cat.jpg" /></Content>
        <ImageManager ViewPaths="~/"
                                UploadPaths="~/"
                                DeletePaths="~/">
                            </ImageManager>
    </telerik:RadEditor>
    </div>
    
    </form>
</body>
</html>
Dobromir
Telerik team
 answered on 23 Aug 2011
1 answer
68 views
My user's are restricted to using IE7, and the RadMaskedTextBox is behaving very weird in this browser.  When focused on the control, the insertion point moves to the end of the masked characters when a button is pressed.  For example, if my mask is "(###) ### - ###", and the insertion point is at the beginning and I press "1", then the text displayed in the box becomes "(1##) ### - ###" and the insertion point moves to the very end and no more text is able to be typed in.  Now if I move the insertion point with the mouse cursor to the proper place after the "1", then I can type the next character but only to get booted back to the end of the mask all over again.

Here is my markup:
<telerik:RadMaskedTextBox ID="rmt_Phone_Number" runat="server"
      Mask="(###) ### - ####" PromptChar="#" HideOnBlur="true">                           
</telerik:RadMaskedTextBox>
Shinu
Top achievements
Rank 2
 answered on 23 Aug 2011
1 answer
126 views
hi,
I have this rad grid:
                                                                <telerik:RadGrid ID="RadGrid1"
                        AllowSorting="True"
                        AllowPaging="True" PageSize="5" runat="server" GridLines="None" Width="95%"
                        OnItemCommand="RadGrid1_ItemCommand"
                        OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Sunset">
                        <ExportSettings HideStructureColumns="true" />
                             <MasterTableView Width="100%" CommandItemDisplay="Top"   >


                             <Columns>
                                <telerik:GridBoundColumn DataField="SerialNum" />
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  />
                                <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" />
                                <telerik:GridBoundColumn DataField="Phone1" HeaderText="Phone-1-"  />
                                <telerik:GridBoundColumn DataField="Email" HeaderText="Email" />
                                <telerik:GridBoundColumn DataField="Phone2" HeaderText="Phone-2-" />
                                <telerik:GridBoundColumn DataField="ActiveState" HeaderText="Active State" />
                                <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" />
                                <telerik:GridTemplateColumn>
                                    <ItemTemplate>
                                            <asp:LinkButton ID="lnkbdeactive" runat="server" CommandArgument='<%# eval("User_ID") %>'
                                                CommandName="Deactive" CssClass='<%# ShowIfNotActive(Eval("Active"), "lnkbdeactive") %>'>De-activate</asp:LinkButton>
                                            <asp:LinkButton ID="lnkbactive" runat="server" CommandArgument='<%# eval("User_ID") %>'
                                                CommandName="Active" CssClass='<%# ShowIfNotActive(Eval("Active"), "lnkbactive") %>'>Activate</asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                             </Columns>


                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false"
                                    ShowExportToCsvButton="true" ExportToCsvText='<%= "CSV_" & ExportSubFileName %>'    />
                            </MasterTableView>
                        </telerik:RadGrid>


now the problem when I am filling data using OnNeedDataSource
I got the grid rendered two times, I can see the grid like this:


Princy
Top achievements
Rank 2
 answered on 23 Aug 2011
1 answer
141 views
Hi,

I have a GridNumericColumn whose Header text has to be dynamic. However, when I add the dynamic code block as the header text

HeaderText='<%# GetFYString(DateTime.Now, true) %> <br/> <%#GetFYSpan(true)%>'

I get a message: Databinding expressions are only supported on objects that have a DataBinding event. Telerik.Web.UI.GridNumericColumn does not have a DataBinding event.

Does this mean I will have to use  template column to get my header right? Or am I missing something?

Thanks

Princy
Top achievements
Rank 2
 answered on 23 Aug 2011
2 answers
203 views
hi,

setting empty message of a text box onClientSelectedIndexChanged by jQuery??

$(

 

'#txtSearchCriteria').attr('emptymessage' , 'hello')

says property or method not found

thanks

Amit
Top achievements
Rank 1
 answered on 23 Aug 2011
7 answers
198 views
Hi. Is it possible to expand a hierarchical grid via a hyperlink column? I noticed you can create a GridExpandColumn but I need a DataField or value instead of the expand arrow, hopefully a hyperlink of some sort. Also, if this is possible, how do I hide the default expand column for just that grid and not any other? Thanks.

Daniel
Doug
Top achievements
Rank 1
 answered on 23 Aug 2011
2 answers
114 views
Hey Guys,
Got a small problem with my radGrid.
I'm using a pdf production component to produce pdf output from a byte stream.
I launch this method from a standard button click and the pdf is streamed to the browser.
However, when I attempt this from a Button column in my radGrid, the call errors with:

"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this
are when the response is modified by calls to Response.Write(), response filters, HttpModules or server trace is enabled"

Which makes sense because I'm intercepting the response and setting content-type, adding headers and BinaryWriting the data.

So as this works just fine outside of the RadGrid, is there something I can do to make the request happy with with calling it from within? I really need to bind things from the current row to make the call.

Many thanks
Mark.

Simon
Top achievements
Rank 1
 answered on 23 Aug 2011
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?