Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
262 views
There is a radtextbox and a radsearchbox in my aspx page. The Javascript in this page has a getOrder() in which I want to access the width of the textbox and set it to searchbox using style.width. The width of searchbox increases to the stipulated width but the lens symbol position remains unchanged. If I set width in markup it works, but not in JavaScript.
Shinu
Top achievements
Rank 2
 answered on 06 Nov 2013
1 answer
184 views
Hi Team, 
I am working in RadAsyncUpload. My requirement is at a point of time I will upload only one file. While uploading the file I don't want other files to be selected or remove already selected file.

Here, I wanted to either disable the whole file name that is displayed above the inlineprogress of upload control or disable the remove button associated to the file name. Also I have to disable the select button of the control when other files are uploading to the server. 

When I use the following code when the file got selected

document.getElementById("<%# RadAsyncUpload1.ClientID%>").Enabled = false;

the whole control got disabled and the file is not getting uploaded. Hope you understand my question

Thanks & Regards,
Mohan
Princy
Top achievements
Rank 2
 answered on 06 Nov 2013
1 answer
132 views
I try to make like this example http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx

My problem is it not  <telerik:RadGrid> but it is
 <telerik:GridTableView>

Problem in here ...
<ItemTemplate>
                     <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %>
                      <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                    runat="server">
                      <asp:Image runat="server" style="float:left" Width="200px" Height="200px" ImageUrl='<%# Eval("Url")%>' />
                        </asp:Panel>
                       </ItemTemplate>

This is my full code:
<body>
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" Width="95%"
        AutoGenerateColumns="False" PageSize="7" AllowSorting="True" AllowPaging="True"
        GridLines="None" ShowStatusBar="true">
        <mastertableview datasourceid="SqlDataSource1" datakeynames="Id" allowmulticolumnsorting="True"
            width="100%">
            <Columns>
                <telerik:GridBoundColumn DataField="TT_TenMauVat" HeaderText="Tên mẫu vật" SortExpression="TenMauVat"
                    FilterDelay="1000" HeaderStyle-Width="200px" UniqueName="TenMauVat" CurrentFilterFunction="Contains"
                    ShowFilterIcon="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TT_SoHieuMauVat" HeaderText="Số hiệu mẫu vật"
                    SortExpression="SoHieuMauVat" FilterDelay="1000" HeaderStyle-Width="200px" UniqueName="SoHieuMauVat"
                    CurrentFilterFunction="StartsWith" ShowFilterIcon="false">
                </telerik:GridBoundColumn>
            </Columns>
            <DetailTables>
                <telerik:GridTableView AutoGenerateColumns="false" AllowSorting="false" DataSourceID="SqlDataSource2"
                    Width="100%" ShowHeader="false" PageSize="7">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id"></telerik:GridRelationFields>
                    </ParentTableRelation>
                    <Columns>
                        <telerik:GridBoundColumn DataField="TT_TenMauVat" HeaderText="Tên mẫu vật" SortExpression="TenMauVat"
                            FilterDelay="1000" HeaderStyle-Width="200px" UniqueName="TenMauVat" CurrentFilterFunction="Contains"
                            ShowFilterIcon="false">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <ItemTemplate>
                        <fieldset style="padding: 10px;">
                            <legend style="padding: 5px;"><b>Thông tin chi ti?t c?a m?u v?t:   <%#Eval("TT_TenMauVat")%></b>
                            </legend>
                            <table>
                                <tbody>
                                    <tr>
                                        <td>
                                            <table>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            S? hi?u m?u v?t:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="cityLabel" Text='<%#Bind("TT_SoHieuMauVat") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Tên m?u v?t:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label2" Text='<%#Bind("TT_TenMauVat") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Noi luu tr? hi?n t?i:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label3" Text='<%#Bind("TT_NoiLuuGiuHienTai") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Phuong th?c th?i di?m giao:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label4" Text='<%#Bind("TT_PhuongThucThoiDiemGiao") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            S? lu?ng:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label5" Text='<%#Bind("TT_SoLuong") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            S? hi?u b?o tàng:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label6" Text='<%#Bind("TT_SoHieuBaoTang") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Ð? b?o m?t:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="Label7" Text='<%#Bind("TT_DoBaoMat") %>' runat="server"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                        <td>
                                            <img width="200px" height="200px" src='<%#Eval("TT_HinhDaiDien")%>' alt="Hình d?i di?n" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </fieldset>
                    </ItemTemplate>
                </telerik:GridTableView>
                 
                
     
     
               <telerik:GridTableView AllowSorting="false" AutoGenerateColumns="false" ShowHeader="false" OnPreRender="RadGrid3_PreRender"
                    DataSourceID="SqlDataSource3" Width="100%">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id"></telerik:GridRelationFields>
                    </ParentTableRelation>
                     <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                    <Columns>
                        <telerik:GridImageColumn DataType="System.String" DataImageUrlFields="Url" Visible="false" AlternateText="Customer image"
                            DataAlternateTextField="Url" ImageAlign="Middle" ImageHeight="110px" ImageWidth="90px"
                            HeaderText="Image Column" FooterText="ImageColumn footer">
                        </telerik:GridImageColumn>
                    </Columns>
                     
                      <ItemTemplate>
                     <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %>
                      <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                    runat="server">
                      <asp:Image runat="server" style="float:left" Width="200px" Height="200px" ImageUrl='<%# Eval("Url")%>' />
                        </asp:Panel>
                       </ItemTemplate>
                </telerik:GridTableView>
                 
                 
            </DetailTables>
        </mastertableview>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:CoVatConnectionString %>"
        SelectCommand="SELECT * FROM [MauVat]" runat="server"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:CoVatConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [MauVat] where Id=@Id"
        runat="server">
        <SelectParameters>
            <asp:Parameter Name="Id" Type="string"></asp:Parameter>
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:CoVatConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [MauVatImage] where MauVatId=@Id "
        runat="server">
        <SelectParameters>
            <asp:Parameter Name="Id" Type="string"></asp:Parameter>
        </SelectParameters>
    </asp:SqlDataSource>
</body>


Could you help me ? thanks 

Angel Petrov
Telerik team
 answered on 06 Nov 2013
9 answers
302 views

Everything was working but all of a sudden I am getting the following error on a radgrid in batch edit mode.

Unhandled exception at line 148, column 38 in http://aspnet-scripts.telerikstatic.com/ajaxz/2013.2.717/Grid/GridBatchEditingScripts.js

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property '_data': object is null or undefined

<telerik:RadGrid ID="dgCompGrid" runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False" BorderStyle="Solid" CellSpacing="0" GridLines="None" Skin="Sitefinity" Width="100%">
                                                    <ExportSettings>
                                                        <Pdf>
                                                            <PageHeader>
                                                                <LeftCell Text="" />
                                                                <MiddleCell Text="" />
                                                                <RightCell Text="" />
                                                            </PageHeader>
                                                            <PageFooter>
                                                                <LeftCell Text="" />
                                                                <MiddleCell Text="" />
                                                                <RightCell Text="" />
                                                            </PageFooter>
                                                        </Pdf>
                                                    </ExportSettings>
                                                    <ClientSettings>
                                                        <Selecting AllowRowSelect="True" />
                                                    </ClientSettings>
                                                    <MasterTableView AllowNaturalSort="False" EditMode="Batch" BatchEditingSettings-OpenEditingEvent ="DblClick" >
                                                        <BatchEditingSettings EditType="Row"  />
                                                    </MasterTableView>
                                                    <MultiHeaderItemStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" />
                                                </telerik:RadGrid>

VB CODE BEHIND ==========================================================

 

 

 

Public Sub Load_Component_NonGrid(ByVal iCompID As Int32, Init As Boolean)

 

 

 

If iCompID > 0 Then

 

 

 

 

 

 

 

With dgCompNonGrid

 

.Columns.Clear()

.DataSource =

 

Nothing

 

 

 

 

 

.DataSource = ippService.PlanDetails(iCompID)

.MasterTableView.DataKeyNames =

 

New String() {"ippComponentID", "ippComponentSeq"}

 

 

 

End With

 

 

 

 

 

 

 

End If

 

 

 

 

 

 

 

Dim boundColumn As GridBoundColumn

 

 

 

 

 

boundColumn =

 

New GridBoundColumn()

 

dgCompNonGrid.MasterTableView.Columns.Add(boundColumn)

 

 

With boundColumn

 

.DataField =

 

"ippComponentSrcValue"

 

 

 

 

 

.UniqueName =

 

"dgippComponentSrcValue"

 

 

 

 

 

.Display =

 

True

 

 

 

 

 

.HeaderText =

 

"Value"

 

 

 

 

 

.ItemStyle.Font.Size = 8

.HeaderStyle.Font.Bold =

 

True

 

 

 

 

 

.HeaderStyle.ForeColor =

 

Color.Black

 

.HeaderStyle.BackColor =

 

Color.White

 

.ReadOnly =

 

False

 

 

 

 

 

.ItemStyle.HorizontalAlign =

 

HorizontalAlign.Left

 

 

 

End With

 

 

 

 

 

boundColumn =

 

New GridBoundColumn()

 

dgCompNonGrid.MasterTableView.Columns.Add(boundColumn)

 

 

With boundColumn

 

.DataField =

 

"ippComponentBonusPct"

 

 

 

 

 

.UniqueName =

 

"dgippComponentBonusPct"

 

 

 

 

 

.Display =

 

True

 

 

 

 

 

.HeaderText =

 

"Bonus %"

 

 

 

 

 

.ItemStyle.Font.Size = 8

.HeaderStyle.Font.Bold =

 

True

 

 

 

 

 

.HeaderStyle.ForeColor =

 

Color.Black

 

.HeaderStyle.BackColor =

 

Color.White

 

.ReadOnly =

 

False

 

 

 

 

 

.ItemStyle.HorizontalAlign =

 

HorizontalAlign.Left

 

 

 

End With

 

 

 

 

 

 

 

Dim oDeleteColumn As New GridButtonColumn

 

 

 

 

 

dgCompNonGrid.MasterTableView.Columns.Add(oDeleteColumn)

 

 

With oDeleteColumn

 

.UniqueName =

 

"DeleteColumn"

 

 

 

 

 

.HeaderText =

 

"Remove"

 

 

 

 

 

.ItemStyle.Font.Size = 8

.HeaderStyle.Font.Bold =

 

True

 

 

 

 

 

.ButtonType =

 

GridButtonColumnType.ImageButton

 

.ImageUrl =

 

"~/Images/style7/cancel.gif"

 

 

 

 

 

.Display =

 

True

 

 

 

 

 

.CommandName =

 

"Delete"

 

 

 

 

 

.CommandArgument =

 

"Delete"

 

 

 

 

 

.ConfirmText =

 

"Delete this increment?"

 

 

 

 

 

.ConfirmDialogType =

 

GridConfirmDialogType.RadWindow

 

.ItemStyle.HorizontalAlign =

 

HorizontalAlign.Left

 

.HeaderStyle.Font.Bold =

 

True

 

 

 

 

 

.HeaderStyle.ForeColor =

 

Color.Black

 

.HeaderStyle.BackColor =

 

Color.White

 

 

 

End With

 

 

 

 

 

 

 

With dgCompNonGrid.MasterTableView

 

.CommandItemDisplay =

 

GridCommandItemDisplay.Bottom

 

.BatchEditingSettings.EditType =

 

GridBatchEditingType.Row

 

.CommandItemSettings.ShowRefreshButton =

 

False

 

 

 

 

 

 

 

End With

 

 

 

 

 

 

 

End Sub

 

 

 

 



If I set the <BatchEditingSettings EditType="Cell" /> then it works but when set to row I get the error above?  Soon as I doubleClick on the row to edit.  All the data loads just fine and even the Delete works.  The Edit and Add New causes the error.  Its like it is not putting the grid into EDIT mode when I BatchEditingSettings-OpenEditingEvent ="DblClick" ?

thanks.

Antonio Stoilkov
Telerik team
 answered on 06 Nov 2013
2 answers
624 views
Hi,

I want to open Radwindow while clicking on asp:Image within Templatecolumn in Radgrid.

I have pasted my code below.

please help me to get this done.

Thanks in advance.
aspx:
<
telerik:GridTemplateColumn HeaderText="Image" UniqueName="image_file_location"> 
<
ItemTemplate>
<
asp:Image ID="ImgSign" Width="70" Height="80" runat="server" ImageUrl="test.png" />
</
ItemTemplate>
</
telerik:GridTemplateColumn>

c#:
protected void RadGrid_tab1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            
            DataRowView drv = (DataRowView)e.Item.DataItem;
            GridDataItem item = (GridDataItem)e.Item;
            Image img = (Image)item.Controls[0].FindControl("ImgSign");
    string from=txt_test.Text;
            string url = "test.png_"+from;
            img.Attributes["onclick"] = "return ShowForm("+url+");";
        }
        
    }
Javascript:
<script type="text/javascript">
    function ShowForm(url) {
        alert(url);
        window.radopen(url, "");
    } 
</script> 

Regards,
AGM Raja
Agm
Top achievements
Rank 1
 answered on 05 Nov 2013
1 answer
91 views
Hi,

We use RadEditor. Toggling to FullScreen works fine. Toggling back to design mode is not working correctly. The input field is getting huge (two screen pages) and scrolling will not work anymore.

Using F11, everything works fine. Even back from fullscreen mode work! Any hints?
Version is 2013.1.417.35.

Is there a way to simulate F11 instead?

Best Regards, Claude
Ianko
Telerik team
 answered on 05 Nov 2013
1 answer
291 views
Hello,

Is is possible to use a RadEditor control as Web Browser control? I want to show a second web side inside the one of my web pages. At this time I use IFRAME but there is java script issue : access is denied when use second site. I also tring to use Windows Forms Web Browser control but don't have any success to display it. Also try to create a class library and use it as object inside asp.net but warning message is shown every time.
So is is possible to use RadEditor as Windows Forms Web Browser control?

Thank you
Ianko
Telerik team
 answered on 05 Nov 2013
4 answers
207 views
Greetings!

I am unable to get a consistent header/column width in my radgrid (see attachment).

The columns are auto generated. After viewing a number of posts, it appears the best practice is to merely set the the HeaderStyle Width, and set the TableLayout to Fixed. And this I have done:

<MasterTableView EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="True" TableLayout="Fixed">
    <HeaderStyle Width="100px" />

Is there something else I need to do?

Thanks,

Karl
Karl
Top achievements
Rank 1
 answered on 05 Nov 2013
1 answer
61 views
We are having issues with grabbing user content from a rad editor when inside a Rad Update panel using IE.  it works fine in firefox and chrome.  I have read and applied the fixes listed in other articles but they have not worked.  I am using Q3 2013 version of the controls.

please let me know if there is something else i can be doing.
Rumen
Telerik team
 answered on 05 Nov 2013
1 answer
96 views
Hi,

I am trying to create a page similar to the below demo page, that load the data from webservices. When the webservices returns the data after 10-12 seconds, and the grid doesn't show any loading panel. I tried attaching an AjaxLoadingPanel to the grid, but the request is in not a ajax request and hence it wasn't displayed. Also, I don't see any api for data service in client side to manually show the loading panel. Can anyone recommend a way to display a loading panel?

http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/declarative/defaultcs.aspx


Thanks,
Shhan
Maria Ilieva
Telerik team
 answered on 05 Nov 2013
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?