Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
49 views

Hello

Could You help me How can I get correct currentpageindex and Itemindex after filtering?

When I filter Grid column my Itemindex and currentpageindex Missed.

Thanks for your help

bahar kashani
Top achievements
Rank 1
 asked on 05 Feb 2017
15 answers
655 views
Hi,
I have a radGrid with an attachment column visible only in form edit mode. The attachment is saved in a folder not in the db.
I would like to generate an hyperlink when an attachment is loaded and place it somewhere in the edit form of the record so that the user can simply click on the link and visualize the attachment.
The user may load more than one attachment so every time a new one is loaded, a new link should be generated.
How can I do something like that? I am completely lost on this one!

I think I should set the DataNavigateUrlFields of the dynamically generated attachmentcolumn to the path/filename of the new loaded/selected file. But I do not know how to get such url.
Moreover how do I generate dynamically a new column every time I load a new file pointing to such url?



Thanks
Olanrewaju
Top achievements
Rank 1
 answered on 04 Feb 2017
0 answers
182 views

1. I am trying to add validate a textbox with Custom Validator in the Add New Record mode for a radgrid. The server validate method is called on Insert button click rather than lost focus for the textbox.

2. I want to keep the radgrid in insert mode if validation fails. e.Canceled = true keeps the grid in Insert mode but the user entered values are lost. How can I keep the user entered values in the insert mode if custom validation fails?

 

Thanks

Priya
Top achievements
Rank 1
 asked on 04 Feb 2017
1 answer
108 views

I have an ObjectDataSource bound to my Grid, and the Automatic Updating works fine for all controls except for the RadComboBox in one of my columns as I'm not sure how to bind to it.  In my ObjectDataSource, the values that are selected from the RadComboBox are stored in a List.  In a regular ListView, I would just grab the selected values and put them in a List and assign them to e.NewValues() in the ListView's ItemUpdating event.  I can't seem to figure out how to do something similar in the Grid's UpdateCommand event.  Below is some abbreviated code to show what I'm trying to do.  Appreciate any help you can offer.

Public Class MyCase
    Public Sub New()
    End Sub
 
    Private intId As Nullable(Of Integer)
    Public Property Id() As Nullable(Of Integer)
        Get
            Return intId
        End Get
        Set(ByVal value As Nullable(Of Integer))
            intId = value
        End Set
    End Property
 
    Private strCaseName As String
    Public Property CaseName() As String
        Get
            Return strCaseName
        End Get
        Set(ByVal value As String)
            strCaseName = value
        End Set
    End Property
 
    Private objCodes As List(Of MyCode) = New List(Of MyCode)
    Public Property CodeList() As List(Of MyCode)
        Get
            Return objCodes
        End Get
        Set(ByVal value As List(Of MyCode))
            objCodes = value
        End Set
    End Property
End Class
 
Public Class MyCode
    Public Sub New()
    End Sub
 
    Private intId As Nullable(Of Integer)
    Public Property Id() As Nullable(Of Integer)
        Get
            Return intId
        End Get
        Set(ByVal value As Nullable(Of Integer))
            intId = value
        End Set
    End Property
 
    Private strName As String
    Public Property Name() As String
        Get
            Return strName
        End Get
        Set(ByVal value As String)
            strName = value
        End Set
    End Property
End Class
 
Protected Sub gridCases_UpdateCommand(sender As Object, e As GridCommandEventArgs)
 
End Sub

 

<telerik:RadGrid RenderMode="Lightweight" runat="server" ID="gridCases" AutoGenerateColumns="false" AllowPaging="true" DataSourceID="odsCases" AllowSorting="true" OnUpdateCommand="gridCases_UpdateCommand" AllowAutomaticUpdates="true">
    <MasterTableView DataSourceID="odsCases" DataKeyNames="Id" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="InPlace" CommandItemSettings-ShowRefreshButton="false">
        <Columns>
            <telerik:GridBoundColumn DataField="Id" ReadOnly="true" ForceExtractValue="Always" Visible="false" />
            <telerik:GridBoundColumn DataField="CaseName"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Codes">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container.DataItem, "Codes").ToString%>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox RenderMode="Lightweight" ID="ddlCodes" runat="server" CheckBoxes="true" DataSourceID="odsCodes" DataTextField="Name"
                        DataValueField="Id">
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
        </Columns>
    </MasterTableView>
    <PagerStyle Mode="NextPrevAndNumeric" />
</telerik:RadGrid>
<asp:ObjectDataSource ID="odsCases" runat="server" TypeName="MyCaseManager" DataObjectTypeName="MyCase" SelectMethod="GetList" UpdateMethod="Save">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsCodes" runat="server" DataObjectTypeName="MyCode" SelectMethod="GetCachedList" TypeName="MyCodeManager">
</asp:ObjectDataSource>
Michael
Top achievements
Rank 1
 answered on 03 Feb 2017
7 answers
96 views

I have a RadGrid in Batch Edit mode with three drop down columns (I have tried this with both GridDropDownColumn and GridTemplateColumn containing a DropDownList control).  The problem is that I need to populate each subsequent column based on what is selected in the previous one.

For example, if the first column has options A, B and C, and the user picks A, the second column is populated with D and E.  If the user picks B, the second column is populated with F, G and H.  And if the user picks A is the first column, and E in the second column, the third column is populated with I, J, K and L.

The datasource for the RadGrid is a List<class> structure where each row is an instance of the class.  The class contains the selected value and options for the first dropdownlist.  When the value of the first column is set in the class, the class setter for it updates the option values used in the second column and if the current second column value is no longer an option, sets it to the first entry in the second column options.  Once the second column is set, the same thing happens for the third column's value and options.  Therefore, each row could have different values for the second and third dropdownlists based on what is selected in the first dropdownlist of each row.

Can I do this in Batch Edit mode or do I have to do something like InPlace mode instead?  I prefer the user experience in Batch Edit mode, but JavaScript is not my strong point.  Using the pre-render event (either RadGrid's when I use GridDropDownColumns or the DropDownList control's when I use a template column), I can easily populate the first column with the right options, but I am having trouble populating and setting values in the subsequent columns.

Jay
Top achievements
Rank 1
 answered on 03 Feb 2017
0 answers
50 views

Hello,
I'm trying to dynamically create multiple asyncupload controls. The creation happens without problems. When I try to send the files to the folder, they are not sent. I made some basic settings but I was not able to identify the problem.

There is no error return, just does not send the file to the folder.
Note: the file is loaded in the temporary folder.

I ask for help, please.

My code below.

Sub CarregaItensLicitacao(lcID As String)
        If Not String.IsNullOrEmpty(lcID) Then
            Dim strSQL As String = Vazio
            strSQL += " select *"
            strSQL += " from ItemLicitacao"
            strSQL += " where"
            strSQL += " ilLcID in ("
            strSQL += lcID
            strSQL += " )"

            Dim lc As New Licitacaocliente
            lc.Read(lcID)

            Dim dt As New DataTable
            ExecutaSQL(strSQL, dt)


            Dim c As Integer = 1
            For Each Item As DataRow In dt.Rows
                DoEvents()
                If Not Directory.Exists(lc.lcDiretorio & "\Itens\" & Item("ilDescricao")) Then
                    Directory.CreateDirectory(lc.lcDiretorio & "\Itens\" & Item("ilDescricao"))
                End If

                Dim upload As New RadAsyncUpload()
                upload.ID = "upload" & c
                upload.TargetFolder = lc.lcDiretorio & "\Itens\" & Item("ilDescricao")

                Dim lbl As New Label
                lbl.Text = Item("ilDescricao")

                pvItem.Controls.Add(lbl)
                pvItem.Controls.Add(upload)

                RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnEnviarItem, upload, Nothing)
                c += 1
            Next
        End If
    End Sub

Ney
Top achievements
Rank 1
 asked on 03 Feb 2017
1 answer
90 views

Hi,

We notice some inconsistency in the RadEditor toolbar buttons pointers on hover.

We tested some skins on your site and it happens in all of them.

Please refer to attached screenshot for explanation.

Marc

Vessy
Telerik team
 answered on 03 Feb 2017
5 answers
102 views
Is this possible to use page break in the Rad Editor, if not is there any other control available in telerik with these features?
Rumen
Telerik team
 answered on 03 Feb 2017
1 answer
141 views

I'm creating a DNN module that uses the Notification control to either extend the session or redirect to the Login page using /logoff.aspx in the RadNotification Value property.  It works except that the Login page URL always has the Home page as the returnurl, no which page it originated from.

 I haven't been able to capture the page's url in order for it to show up as the return url.  And yes, I'm also posting this over on DNN.

 

Thank you!

Marin Bratanov
Telerik team
 answered on 03 Feb 2017
2 answers
422 views

Getting frustrated - 

Long time user of Telerik. I have a new Windows 10 build. clean installation of Visual Studio 2013. The only version of Telerik on this computer is 2017.1.118.45. I used the Telerik Control Panel to install Telerik into VS 2013. 

New Telerik Web Project. Give it a name. Select the Responsive web app. Compile and test - works great. Add a new page. Drop a radgrid on the page. 

'Could not load file or assembly 'Telerik.Web.UI, Version=2017.1.118.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'\\XXXXX\LCxxxxx

Delete the newly added page. Same problem. Permissions all seem OK on the Telerik files. Same result if I run Visual Studio as an admin or regular user. 

Thanks,

 

Dan

Marin Bratanov
Telerik team
 answered on 03 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?