Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
296 views
Hi,

How to set delete image from TempFolder after 20Munites.

Thanks
Yasin
Shinu
Top achievements
Rank 2
 answered on 26 May 2014
2 answers
207 views
Hi Telerik Team,

I would like to know if the UI design in "RadTimePicker (Winform)" is possible to replicate it for ASP.NET AJAX. I have tried but it seems that it need to have more complicated codes to generate this for ASP.NET Thanks for you time.

Regards
Irving
Top achievements
Rank 2
 answered on 26 May 2014
1 answer
163 views
Hi,
I am using the following snippet to hide the password in edit mode:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
        {
            GridEditFormItem editItem = (GridEditFormItem)e.Item;
            TextBox txtpwd = (TextBox)editItem["password"].Controls[0];
            txtpwd.TextMode = TextBoxMode.Password;
 
            if (!(e.Item.DataItem is GridInsertionObject))
            {
                txtpwd.Attributes.Add("value", txtpwd.Text);
            }
 
        }
    }
The problem I have is that when I open the record for modification, the password disappear. How can I hide the password in edit mode having all auto generated columns?
Princy
Top achievements
Rank 2
 answered on 26 May 2014
2 answers
187 views
Hi,

We have been using an older version of Telerik components (Telerik.Web.UI 2010.3.1317.20) in our web application and now we're looking into the latest one trial to upgrade.

One problem we're facing now is that in the same implementation of a RadGrid, getting the index of the selected row was zero based in our existing code (older version of Telerik). However, implementing the same using the new version of Telerik (2014.1.513.40) will return an incremented result. 
For example, if the first row of the grid is selected, in the old version the index value was zero, but in the new version it returns 1.

This is the implementation of my RadGrid:
<telerik:RadGrid GridLines="none" ID="RadGrid1" runat="server"
        AllowMultiRowSelection="true"
        AllowPaging="true"
        AllowCustomPaging="true"
        AllowSorting="true"
        AllowAutomaticDeletes="true"
        AutoGenerateColumns="true"
        ShowStatusBar="false"
        OnNeedDataSource="RadGrid1_NeedDataSource"
        OnItemDataBound="RadGrid1_ItemDataBound"
        OnItemCommand="RadGrid1_ItemCommand"
        OnGroupsChanging="RadGrid1_GroupsChanging"
        OnColumnCreated="RadGrid1_ColumnCreated"
        OnDataBound="RadGrid1_DataBound"
        OnSortCommand="RadGrid1_SortCommand"
        OnItemCreated="RadGrid1_ItemCreated"
        OnPreRender="RadGrid1_PreRender"
        HorizontalAlign="NotSet"
        Visible="false">
        <ClientSettings AllowColumnHide="true"
            AllowColumnsReorder="true"
            AllowDragToGroup="true"
            ReorderColumnsOnClient="true"
            AllowKeyboardNavigation="true"
            AllowRowsDragDrop="true"
            AllowAutoScrollOnDragDrop="false"
            EnablePostBackOnRowClick="false"
            EnableRowHoverStyle="true">
            <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" />
            <Selecting AllowRowSelect="true" />
            <Scrolling UseStaticHeaders="true" SaveScrollPosition="true" AllowScroll="true" />
            <ClientEvents OnRowContextMenu="RadGrid1_RowContextMenu"
                OnRowDropping="RadGrid1_RowDropping"
                OnActiveRowChanged="RadGrid1_ActiveRowChanged"
                OnRowSelected="RadGrid1_RowSelected"
                OnRowDblClick="RadGrid1_RowDblClick"
                OnKeyPress="RadGrid1_KeyPress"
                OnCommand="RadGrid1_Command"
                OnRowClick="rowClick"
                OnRowMouseOver="RowMouseOver"
                OnRowMouseOut="RowMouseOut"            
                OnMasterTableViewCreated="RadGrid1_MasterTableViewCreated" />
        </ClientSettings>
        <MasterTableView AllowMultiColumnSorting="false" DataKeyNames="ID,Unread,FolderPath" Width="100%"
            ClientDataKeyNames="ID,Unread,FolderPath" TableLayout="Fixed">
            <PagerStyle Mode="NextPrevNumericAndAdvanced" PageButtonCount="3" AlwaysVisible="true" />
        </MasterTableView>
     </telerik:RadGrid>


This is how I am getting the index from js:
function RadGrid1_RowSelected(sender, eventArgs)
{
    var mst = sender.get_masterTableView();
    var index = eventArgs.get_gridDataItem().get_element().rowIndex;
}

I would like to know if the behavior of the RadGrid has been changed since the older version, or I am doing something wrong here.

Thank you.



Ali
Top achievements
Rank 1
 answered on 26 May 2014
1 answer
224 views
hello,
i want to add a check box on the each tab in a tabstrip in front of the tab text can i do that and user can check or uncheck this also.

Regards.
Sotir
Top achievements
Rank 1
 answered on 25 May 2014
18 answers
1.2K+ views

After a lot of searching and hair pulling I have tracked down what seems to be a real deal breaker issue with a lot of rad controls especially radgrid, sorry for the vagueness of this post but it has been a long few days of deadlines :)

When using IE11 preview to view sites with enablepostbackonrowclick set on a radgrid -  clicking on the rows does not work and rather raises a hidden away JavaScript error of: if($telerik.isIE){document.attachEvent("onmousedown",this._onDocumentClickDelegate);

The problem is particular to IE11 and it is not just related to it being in preview.

It is discussed at http://msdn.microsoft.com/en-us/library/ie/ms536343(v=vs.85).aspx 

In this post it says:

attachEvent method

[attachEvent is no longer supported. Starting with Internet Explorer 11 Preview, use addEventListener. For info, see Compatibility changes.]

Binds the specified function to an event, so that the function gets called whenever the event fires on the object.

So it seems that until there is an update to the core way rad controls handle mouse clicks they will not work even on IE final.

Mike Hobbs
Top achievements
Rank 1
 answered on 25 May 2014
1 answer
145 views
Hi,

I am trying to programmatically (Server side) to filter a rad grid based on combo boxes and radio buttons and before the page loads for the user.

using VB.NET I am using this on LoadComplete (I know this is two different methods, but neither work to an extent).
Dim rowStateColumn As GridColumn = RadGrid1.MasterTableView.GetColumnSafe("Comp_ProjectCount")
 
        rowStateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThan
        rowStateColumn.CurrentFilterValue = 0
 
        RadGrid1.MasterTableView.FilterExpression = "([Comp_ProjectCount] > 0 ')"
        RadGrid1.Rebind()


The first option puts in the value of 0 in that column but doesn't display the results filtered only the entire data source.
The second option just doesn't do anything from what I can tell. (I had to sent LINQ to False as it just errored out as I found out in a previous thread).

Any ideas why this doesn't work? Or how to get it to work please?

Thanks,
Alex
Alex
Top achievements
Rank 1
 answered on 24 May 2014
9 answers
604 views
I'm using a RadGrid with the theme Web20 and I'm having trouble changing the color for a specific cell in the RadGrid header. I noticed the header is using an image to create the gradient look, but I need to create the look of a spacer. I was able to accomplish this with the tree list, but I'm having issues doing this with the radgrid. See the pictures attached. 

I'm looking to do this in CSS on inline style or something that doesn't require a reference to System.Drawing in the VS project. Capture1.png below is the radgrid. Capture2.png is the treelist.

Thanks,

Derek
Logan Marshall
Top achievements
Rank 2
Iron
 answered on 24 May 2014
4 answers
248 views
Hi all,

I am working with a RadGrid with a NestedView that has Client row-selecting enabled and has EnablePostBackOnRowClick set to True.  When I attempt to expand a row (either by the Client "RowClick" or by using the expand column), I am handling the ItemCommand event server side to attempt to close any currently expanded rows, and expand only the currently clicked row (like in the "Overview" demo for the RadGrid).  Here is the RadGrid:

<telerik:RadGrid ID="gridShipmentsToBill" runat="server" Width="100%" DataSourceID="ShipmentsToBill" AllowSorting="True" AutoGenerateColumns="False" GridLines="Vertical">
                <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="True">
                    <Scrolling AllowScroll="True" ScrollHeight="500px" UseStaticHeaders="true"></Scrolling>
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
                 
                <MasterTableView HierarchyLoadMode="ServerBind" DataKeyNames="Shipment_Key" DataSourceID="ShipmentsToBill" RetainExpandStateOnRebind="false">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Shipment_Key" ReadOnly="True" HeaderText="CPU #" SortExpression="Shipment_Key" UniqueName="Shipment_Key">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Shipment_AWorBOL" HeaderText="AWB/BOL #" SortExpression="Shipment_AWorBOL" UniqueName="Shipment_AWorBOL">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Customer_Name" HeaderText="Customer" SortExpression="Customer_Name" UniqueName="Customer_Name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Shipment_Description" HeaderText="Description" SortExpression="Shipment_Description" UniqueName="Shipment_Description">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Voyage_ArriveDate" HeaderText="Arrival Date" SortExpression="Voyage_ArriveDate" DataFormatString="{0:MM/dd/yyyy}" UniqueName="Voyage_ArriveDate" DataType="System.DateTime">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <NestedViewSettings DataSourceID="GeneralShipmentData">
                        <ParentTableRelation>
                            <telerik:GridRelationFields MasterKeyField="Shipment_Key" DetailKeyField="Shipment_Key"></telerik:GridRelationFields>
                        </ParentTableRelation>
                    </NestedViewSettings>
                    <NestedViewTemplate>
                        <div class="generalInfoForm">
                            <div class="leftForm">
                                <span>
                                    <label>Customer:</label>
                                    <%# Eval("Customer_Num")%> <%# Eval("Customer_Name") %></span>
                                <span>
                                    <label>Consignee:</label>
                                    <%# Eval("Consignee_Num")%> <%# Eval("Consignee_Name") %></span>
                                <span>
                                    <label>Arrival Date:</label>
                                    <%# Eval("Voyage_ArriveDate", "{0:MM/dd/yyyy}")%></span>
                            </div>
 
                            <div class="rightForm">
                                <span>
                                    <label>AWB/BOL:</label>
                                    <%# Eval("Shipment_AWorBOL")%></span>
                                <span>
                                    <label>Carrier:</label>
                                    <%# Eval("Carrier_Name")%></span>
                                <span>
                                    <label>Vessel:</label>
                                    <%# Eval("Vessel_Name") %></span>
                                <span>
                                    <label>Forwarding Agent:</label>
                                    <%# Eval("ForwardingAgent_Name") %></span>
                            </div>
 
                            <div class="middleForm"><%# Eval("Shipment_Description")%></div>
 
                            <div class="leftForm">
                                <span>
                                    <label>Volume Weight:</label>
                                    <%# Eval("ShipPackage_VolumeWeight")%></span>
                                <span>
                                    <label>Weight:</label>
                                    <%# Eval("ShipPackage_TotalWeight")%></span>
                                <span>
                                    <label>Cube:</label>
                                    <%# Eval("ShipPackage_TotalVolume")%></span>
                                <span>
                                    <label>Freight:</label>
                                    <%# Eval("ShipmentCover_FaceFreight")%></span>
                            </div>
                        </div>
                    </NestedViewTemplate>
                </MasterTableView>
            </telerik:RadGrid>
And here is the ItemCommand event handler:

Protected Sub gridShipmentsToBill_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles gridShipmentsToBill.ItemCommand
        If e.CommandName = "RowClick" OrElse e.CommandName = RadGrid.ExpandCollapseCommandName Then
            Dim previousState As Boolean = e.Item.Expanded
 
            If e.CommandName = "ExpandCollapse" Then
                previousState = Not previousState
            End If
 
            CollapseAllRows()
            e.Item.Expanded = Not previousState
        End If
    End Sub
 
    Private Sub CollapseAllRows()
        For Each item As GridItem In gridShipmentsToBill.MasterTableView.Items
            item.Expanded = False
        Next
    End Sub

If I was to only click on the expand/collapse column to open the rows, I would have no issue and the Grid would behave as I expect.  But if I click on a row (which should expand that Row's NestedView), I see that the following uncaught exception is displayed in my browser's console:

"Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: DataBinding: 'ToString()' is not a valid indexed expression."

If, however, I change AllowRowSelect to be set to False (while leaving EnablePostbackOnRowClick set to True), the program works as I would expect (when clicking the expand/collapse column or clicking the row).

While I could probably work with this, I'm wondering why it is not working when AllowRowSelect is set to True.  (Also, the default styling for the SelectedRow is not applied when AllowRowSelect is set to False).

I'm fairly new to Telerik's controls, so I may be missing something obvious, but thanks for any help/suggestions.
Benjamin
Top achievements
Rank 1
 answered on 23 May 2014
2 answers
336 views
Hi ,

I have two Rad list box . On is the source and the other is the destination. The source list box is bound with data and on transfer to Destination i wanted a jquery event to fire so that the items in the Radlist Destination would refresh the Grid to the those items which are moved from source to destination. For example I Have selected Employee 2 and employee 4 to be moved to destination my rad grid should refresh and display data with employees 2 and 4. Please help me out i am not able to choose the proper even. I have used on client load but it works but it continuously loads without stopping.The page is continuously refreshed.

Thanks in advance.

Vvamc
Top achievements
Rank 1
 answered on 23 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?