Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
402 views
How do I get value (that is checked) from GridClientSelectColumn, and how do I save the ones I selected after a postback?

When i submit i always get dataitem.Selected = false/nothing...

Protected Sub rbFelAnmal_Click(sender As Object, e As EventArgs) Handles rbFelAnmal.Click
 
    For Each item As GridItem In RadGrid1.MasterTableView.Items
        Dim dataitem As GridDataItem = DirectCast(item, GridDataItem)
        If dataitem.Selected Then
            value = value & dataitem.GetDataKeyValue("DateOfBirth").ToString() & "<br>"
        Else
 
        End If
    Next
 
    lblCheck.Text = value
 
End Sub
Shinu
Top achievements
Rank 2
 answered on 07 Apr 2014
3 answers
109 views
Hello Forum,

We have been using Rad Asycn Upload to upload the files to the server. The control is working with Chrome and FireFox and IE10. But as we switch to IE9 or Lower versions of Internet Explorer, the control no longer works. Please find the web site project created in reference to the problem that we are facing at our end. Also the screen snaps have been attached with the problem when the file is uploaded to the server on IE9 or IE8. Can anyone please help or guide me through the issue?


Thanks
Bas
Shinu
Top achievements
Rank 2
 answered on 07 Apr 2014
5 answers
1.4K+ views
Hi,

We are using Telerik RadControls for ASP.NET Ajax version 2013.3.1114.45.
I have a radgrid with GridClientSelectColumn as first column to select rows, a checkbox column and Gridboundcolumn and the grid is in edit mode.
How to make a particular row read-only based on some condition ?

When the row becomes read-only, the following things should happen.
1. GridClientSelectColumn should not be visible for that row. 
2. Checkbox should not be displayed, Yes or No text should be displayed instead of a tick-able checkbox
3. Editable textbox in gridboundcolumn should become readonly 

Can you please help how to achieve ?

To hide the GridClientSelectColumn  for some of the rows based on some condition, I did it as below in ItemDataBound event.
e.Item.Cells[2].Controls[0].visible = false;

But when the user clicks on the row (anywhere in the row), though the clientselectcheckbox is not visible, it is getting selected.
The following property returns true when the clientselectcolumn is not visible in a row and the user just clicked anywhere in the readonly row.

((System.Web.UI.WebControls.CheckBox)(gridDataItem.Cells[2].Controls[0])).Checked







Princy
Top achievements
Rank 2
 answered on 07 Apr 2014
1 answer
177 views
Hi

i have 5 controls

two of them hidden on some conditions on page load

    <telerik:RadAjaxManager ID="WAjaxman" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="WAjaxman">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Cont1" />
                    <telerik:AjaxUpdatedControl ControlID="Cont2" />
                    <telerik:AjaxUpdatedControl ControlID="Cont3" />
                </UpdatedControls>
        </AjaxSettings>
    </telerik:RadAjaxManager>


on code behind i added

WAjaxman.AjaxSettings.AddAjaxSetting(WAjaxman, Cont4, null);
WAjaxman.AjaxSettings.AddAjaxSetting(WAjaxman, Cont5, null);

but it doesn't effect the manager.
the cont4 and cont5 aren't updated
 



Shinu
Top achievements
Rank 2
 answered on 07 Apr 2014
3 answers
234 views
I am attempting to add mouseover activation of tabs, per the following article:

http://www.telerik.com/help/aspnet-ajax/tabstrip-change-tabs-mouseover.html

I copied the code, the page loads without error, and the tabs change as intended.

However I get "Line: 75 Error: Unable to get property 'selectParents' of undefined or null reference" as soon as the mouse moves out of the tabstrip control..

Running Win 8.1 with I.E. 11 when the error occurs.

No error with Firefox.

I would like to know what this error is and how I might adjust the code to prevent or ignore.


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="tabstrip_mouseover.aspx.vb" Inherits="tabstrip_mouseover" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
<form id="form1" runat="server">
   <asp:ScriptManager ID="ScriptManager1" runat="server" />
   <script type="text/javascript" language="javascript">
       function SelectMyTab(sender, args) {
           var multiPageID = sender.get_multiPageID();
           sender.set_multiPageID(null);
           args.get_tab().select();
           sender.set_multiPageID(multiPageID);
       }
 
       function UnSelectMyTab(e) {
           var tabStrip = $find('<%= RadTabStrip1.ClientID%>');
       //Find the element which the mouse is over
       var destElement = e.relatedTarget || e.toElement;
       if ($telerik.isDescendant(tabStrip.get_element(), destElement))
           return;
       var initialTab = tabStrip.findTabByText("<%= MyTab %>");
       //initialTab.unselect();
       initialTab.selectParents();
   }
   </script>
   <telerik:RadTabStrip ID="RadTabStrip1" runat="server" UnSelectChildren="true" OnClientMouseOver="SelectMyTab" ClickSelectedTab="True" AutoPostBack="True" onmouseout="UnSelectMyTab(event)" SelectedIndex="0" Skin="Outlook" MultiPageID="RadMultiPage1">
       <Tabs>
           <telerik:RadTab ID="Tab1" runat="server" Text="Root Tab 1">
               <Tabs>
                   <telerik:RadTab ID="Tab2" runat="server" Text="Child Tab 1.1" PageViewID="PageView1">
                   </telerik:RadTab>
                   <telerik:RadTab ID="Tab3" runat="server" Text="Child Tab 1.2" PageViewID="PageView2">
                   </telerik:RadTab>
               </Tabs>
           </telerik:RadTab>
           <telerik:RadTab ID="Tab4" runat="server" Text="Root Tab 2">
               <Tabs>
                   <telerik:RadTab ID="Tab5" runat="server" Text="Child Tab 2.1" PageViewID="PageView3">
                   </telerik:RadTab>
                   <telerik:RadTab ID="Tab6" runat="server" Text="Child Tab 2.2" PageViewID="PageView4">
                   </telerik:RadTab>
                   <telerik:RadTab ID="Tab7" runat="server" Text="Child Tab 2.3" PageViewID="PageView5">
                   </telerik:RadTab>
               </Tabs>
           </telerik:RadTab>
           <telerik:RadTab ID="Tab8" runat="server" Text="Root Tab 3">
               <Tabs>
                   <telerik:RadTab ID="Tab9" runat="server" Text="Child Tab 3.1" PageViewID="PageView6">
                   </telerik:RadTab>
               </Tabs>
           </telerik:RadTab>
       </Tabs>
   </telerik:RadTabStrip>
   <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Height="454px" Width="737px">
       <telerik:RadPageView ID="PageView1" runat="server">
           Child Tab 1.1</telerik:RadPageView>
       <telerik:RadPageView ID="PageView2" runat="server" Width="100%">
           Child Tab 1.2</telerik:RadPageView>
       <telerik:RadPageView ID="PageView3" runat="server" Width="100%">
           Child Tab 2.1</telerik:RadPageView>
       <telerik:RadPageView ID="PageView4" runat="server" Width="100%">
           Child Tab 2.2</telerik:RadPageView>
       <telerik:RadPageView ID="PageView5" runat="server" Width="100%">
           Child Tab 2.3</telerik:RadPageView>
       <telerik:RadPageView ID="PageView6" runat="server" Width="100%">
           Child Tab 3.1</telerik:RadPageView>
   </telerik:RadMultiPage>
</form>
</body>
</html>


Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports Telerik.Web.UI
 
 
 
Partial Public Class tabstrip_mouseover
    Inherits System.Web.UI.Page
    Protected MyTab As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        MyTab = RadTabStrip1.InnermostSelectedTab.Text
    End Sub
End Class







Tomica
Top achievements
Rank 2
 answered on 06 Apr 2014
5 answers
1.6K+ views
I have one or two files uploaded on RadAsyncUpload control. I would like how to programmatically remove the item (Like clicking on red "Remove" link next to each file on the RadAsyncUpload control).

My scenario is that when user click "Process" button below, one or two file will be remove from the list.

Thanks,

Lamk.
Bas
Top achievements
Rank 1
 answered on 06 Apr 2014
3 answers
278 views
I'm using a radlistview w/ a pagesize of 1 to simulate a winforms data entry screen for data collection on an ipad.

When I click to have the user add a new record, the current record is displayed at the top of the screen and a second insert record is displayed at the bottom.

Is there a way for me to only show the insertitemtemplate and hide the other templates when doing an insert?

Thanks,
Mike
Bill Dowis
Top achievements
Rank 1
 answered on 06 Apr 2014
1 answer
207 views
Hi,

I am using Rad Combo Box in my website. I am populating the Combo box with some data. It is working fine for drop-down the Items in Fire Fox. But in chrome it takes a lot of time to drop-down the Items.

Please help me to avoid the Issue.

Thanks,
Shinu
Top achievements
Rank 2
 answered on 05 Apr 2014
1 answer
263 views
I am trying to make a more generic method to attach to 3 grids on the same page and would like for the PageSizeChanged event to used by all three grids, but have the code inside the event figure out the grid that called the event...  I am sure this can be done, but I have not been able to drill down through the sender object to get the ID..

So I took this approach (Does it look safe enough?)...

var Sender = ((RadGrid)sender);
string GridName = Sender.ID;


public void Grid_PageSizeChanged(object sender, GridPageSizeChangedEventArgs e)
       {
           
            
           //get the current page name
           string pageName = Path.GetFileNameWithoutExtension(Request.Path);
           string GridName = {Here is where I want to use sender to get the actual grid.id}
           int newPageSize = e.NewPageSize;
           var pagerHelper = new GridPagerSizeHelper();
           pagerHelper.saveSelectedPageSize(pageName, GridName, newPageSize, (User)Session["currentUser"]);
           var Nav = new  Common.MasterPages.Nav();
           Nav.ReloadUserPreferences((User)Session["currentUser"]);  // To avoid DB hit with each page load.
       }
Shinu
Top achievements
Rank 2
 answered on 05 Apr 2014
2 answers
113 views
I get a "DataSource not set" error when I bind a RadPanelBar.
To reproduce the bug, it must contain a RadPanelItem that contains a RadAutoCompleteBox.
The problem appeared in version 2014.1.225 and is still visible in the hotfix 2014.1.326

protected string RadPanelItemValue = "RadPanelItem1";
 
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        RadPanelBar1.DataBind(); // Generates an error: "DataSource not set"
    }
}


<telerik:RadPanelBar ID="RadPanelBar1" runat="server" >
    <Items>
        <telerik:RadPanelItem Value='<%# RadPanelItemValue %>' >
            <ItemTemplate>
                <telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1"></telerik:RadAutoCompleteBox>
            </ItemTemplate>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
Veronique
Top achievements
Rank 1
 answered on 04 Apr 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?