Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
272 views
Hi,
i've got a RadTabStrip with few tabs, and i need to set a focus to a first element in javascript when clicking on tab.

already tryed solution provided in this thread :
but it throws me an exception :
 Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

Would be glad to hear any solituion or advice how to achieve such functionality.

Thank You !

Here is my code
        <table cellpadding="0" cellspacing="0" border="0" width="100%"
            <tr> 
                <td> 
                    <cc3:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0" 
                        Width="100%" OnTabClick="RadTabStrip1_OnTabClick"
                        <Tabs> 
                            <cc3:RadTab Value="Profiles"
                            </cc3:RadTab> 
                            <cc3:RadTab Value="OtherInfomations"
                            </cc3:RadTab> 
                            <cc3:RadTab Value="Location"
                            </cc3:RadTab> 
                        </Tabs> 
                    </cc3:RadTabStrip> 
                    <cc3:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Width="100%"
                        <cc3:RadPageView ID="RadPageView1" runat="server"
                            <table cellpadding="0" cellspacing="0" border="0" width="100%"
                                <tr> 
                                    <td> 
                                        <cc2:LabelUpdateStatus ID="lblUpdateStatus" runat="server"></cc2:LabelUpdateStatus> 
                                    </td> 
                                </tr> 
                            </table> 
                            <table cellpadding="2" cellspacing="2" border="0" width="100%" class="InputBox"
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreVisible" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <asp:CheckBox ID="chkStoreVisible" runat="server" Checked="true" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreOrder" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc3:RadNumericTextBox ID="txtStoreOrder" runat="server"
                                        </cc3:RadNumericTextBox> 
                                        <cc6:RequiredFieldValidator ID="RequiredField_StoreOrder" ControlToValidate="txtStoreOrder" 
                                            runat="server"></cc6:RequiredFieldValidator> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreName" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox150 ID="txtStoreName" runat="server"></cc4:TextBox150> 
                                        <cc6:RequiredFieldValidator ID="RequiredField_StoreName" ControlToValidate="txtStoreName" 
                                            runat="server"></cc6:RequiredFieldValidator> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreSlogan" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox150 ID="txtStoreSlogan" runat="server"></cc4:TextBox150> 
                                        <cc6:RequiredFieldValidator ID="RequiredField_StoreSlogan" ControlToValidate="txtStoreSlogan" 
                                            runat="server"></cc6:RequiredFieldValidator> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStorePhone" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox150 ID="txtStorePhone" runat="server"></cc4:TextBox150> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreFax" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox150 ID="txtStoreFax" runat="server"></cc4:TextBox150> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreType" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc3:RadComboBox ID="dropStoreTypes" runat="server"
                                        </cc3:RadComboBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreEmail" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox150 ID="txtStoreEmail" runat="server"></cc4:TextBox150> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreLogo" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <uc1:ChoseFile ID="txtStoreLogo" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreImage" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <uc1:ChoseFile ID="txtStoreImage" runat="server" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <cc2:LabelBold ID="lblStoreAddress" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc4:TextBox500 ID="txtStoreAddress" runat="server"></cc4:TextBox500> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td valign="top"
                                        <cc2:LabelBold ID="lblStoreDescription" runat="server"></cc2:LabelBold> 
                                    </td> 
                                    <td> 
                                        <cc3:RadEditor ID="txtStoreDescription" runat="server" Width="100%"
                                        </cc3:RadEditor> 
                                    </td> 
                                </tr> 
                            </table> 
                        </cc3:RadPageView> 
                        <cc3:RadPageView ID="RadPageView2" runat="server"
                            <table cellpadding="2" cellspacing="2" border="0" width="100%" class="InputBox"
                                <tr> 
                                    <td> 
                                        <cc7:DataList ID="dtlInfos" runat="server" DataKeyField="InfoID" OnItemDataBound="dtlInfos_ItemDataBound"
                                            <HeaderTemplate> 
                                                <table cellpadding="2" cellspacing="2" border="0" width="100%"
                                            </HeaderTemplate> 
                                            <ItemTemplate> 
                                                <tr> 
                                                    <td style="text-align: right; padding-right: 5px; width:120px;"
                                                        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("WebControl_ID") %>' /> 
                                                        <cc2:LabelBold ID="lblInfoName" runat="server" Text='<%# Eval("InfoName") %>'></cc2:LabelBold> 
                                                        <asp:CheckBox ID="chkInfoEnable" runat="server" /> 
                                                    </td> 
                                                    <td> 
                                                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> 
                                                </tr> 
                                            </ItemTemplate> 
                                            <FooterTemplate> 
                                                </table> 
                                            </FooterTemplate> 
                                        </cc7:DataList> 
                                    </td> 
                                </tr> 
                            </table> 
                        </cc3:RadPageView> 
                        <cc3:RadPageView ID="RadPageView3" runat="server"
 
                            <script type="text/javascript" language="javascript"
 
                                var geocoder = null
                                var map = null
 
                                function initialize() { 
                                    if (GBrowserIsCompatible()) { 
                                        geocoder = new GClientGeocoder(); 
 
                                        map = new GMap2(document.getElementById('map_canvas')); 
                                        map.setCenter(new GLatLng(45.05, 7.6667), 13); 
                                        //map.addControl(new GLargeMapControl()); 
                                        //map.addControl(new GMapTypeControl()); 
                                        map.setUIToDefault(); 
                                        geocoder = new GClientGeocoder(); 
                                    } 
                                } 
 
                                function showAddress() { 
                                    var address = document.getElementById('<%= txtAddress.ClientID %>').value; 
                                    //alert(address.value); 
 
                                    if (geocoder) { 
                                        geocoder.getLatLng(address, 
                        function(point) { 
                                if (!point) { 
                                    var hiddendField_AddressNotFound = document.getElementById('<%= HiddenField_AddressNotFound.ClientID %>').value; 
                                    alert(address + ' ' + hiddendField_AddressNotFound); 
                                } else { 
                                    map.setCenter(point, 13); 
 
                                    // Set up icon 
                                    var blueIcon = new GIcon(G_DEFAULT_ICON); 
                                    blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png"
                                    // Set up our GMarkerOptions object 
                                    markerOptions = { icon: blueIcon, draggable: true }; 
 
                                    var marker = new GMarker(point, markerOptions); 
                                    GEvent.addListener(marker, 'dragstart', function() { map.closeInfoWindow(); }); 
                                    GEvent.addListener(marker, 'dragend', function() { 
                                        var vitri = map.getCenter(); 
                                        var test = marker.getLatLng(); 
                                        var vido = test.lat().toString(); 
                                        var kinhdo = test.lng().toString(); 
 
                                        var txtLatitude = document.getElementById('<%= txtLatitude.ClientID %>'); 
                                        txtLatitude.value = vido
                                        var txtLongitude = document.getElementById('<%= txtLongitude.ClientID %>'); 
                                        txtLongitude.value = kinhdo
                                    }) 
                                    map.addOverlay(marker); 
 
                                    var hiddenField_InfoWindowHtml = document.getElementById('<%= HiddenField_InfoWindowHtml.ClientID %>').value; 
                                    marker.openInfoWindowHtml(hiddenField_InfoWindowHtml); 
                                    } 
                                    }); 
                                    } 
                                } 
                            </script> 
 
                            <asp:HiddenField ID="HiddenField_AddressNotFound" runat="server" /> 
                            <asp:HiddenField ID="HiddenField_InfoWindowHtml" runat="server" /> 
                            <table cellpadding="2" cellspacing="2" border="0" width="100%" class="InputBox"
                                <tr> 
                                    <td> 
                                        <cc4:TextBox500 ID="txtAddress" runat="server"> Doan ke thien, Hanoi </cc4:TextBox500> 
                                        <cc5:Button ID="btnSearch" OnClientClick="showAddress(); return false;" runat="server" /><br /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <table cellpadding="2" cellspacing="2" border="0" width="100%"
                                            <tr> 
                                                <td> 
                                                    <cc2:LabelBold ID="lblLatitude" runat="server"></cc2:LabelBold> 
                                                </td> 
                                                <td> 
                                                    <cc4:TextBox150 ID="txtLatitude" Text="0" runat="server"></cc4:TextBox150> 
                                                </td> 
                                                <td> 
                                                    <cc2:LabelBold ID="lblLongitude" runat="server"></cc2:LabelBold> 
                                                </td> 
                                                <td> 
                                                    <cc4:TextBox150 ID="txtLongitude" Text="0" runat="server"></cc4:TextBox150> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        &nbsp; 
                                        <asp:Literal ID="js" runat="server"></asp:Literal> 
                                        <div id="map_canvas" style="width: 80%; height: 768px;"
                                        </div> 
                                    </td> 
                                </tr> 
                            </table> 
                        </cc3:RadPageView> 
                    </cc3:RadMultiPage> 
                </td> 
            </tr> 
        </table> 
        <table cellpadding="2" cellspacing="2" border="0" width="100%" class="InputBox" style="margin: 10px 0 0 0;"
            <tr> 
                <td> 
                    <cc5:ButtonAdd ID="btnAdd" runat="server" OnClick="btnAdd_Click" /> 
                    <cc5:ButtonDelete ID="btnDelete" runat="server" OnClick="btnDelete_Click" /> 
                    <cc5:ButtonCancel ID="btnCancel" runat="server" OnClick="btnCancel_Click" /> 
                    <cc5:ButtonBack ID="btnBack" runat="server" OnClick="btnBack_Click" /> 
                </td> 
            </tr> 
        </table> 


VnDevil
Top achievements
Rank 2
 answered on 29 Apr 2010
1 answer
39 views
Hello,

I have a strange problem, maybe someone else encountered it.
I'm using a RadGrid with a NestedTemplate for each row, inside the NestedTemplate I'm displaying a DetailsView control with Edit and Delete buttons.
The Edit button works fine, but the Delete button doesn't work at first! If the user enter the edit mode, even if only to press Cancel, the Delete button works fine, but otherwise it doesn't work.
I tried to catch the Delete button OnClick event but there is no event. The button itself has an OnClientClick event that does work everytime.
Another strange feature is, then I remove the AjaxManager that enable the RadGrid to update the Delete Button works fine. But I must use it for other controls.

I hope it makes sense to someone

Thanks

Eyal
Yavor
Telerik team
 answered on 29 Apr 2010
7 answers
126 views
I am trying to set the Box2's value to (100 - Box1.value). I tried several things but it seems that OnTextChanged does not work as expected. I get method not supported error. In other cases i get an error } is missing. Any ideas? Link? thanks

Dimo
Telerik team
 answered on 29 Apr 2010
4 answers
131 views
Hi,
When i go to tools in IDE of VS2008 and click on generate local resources, a .resx file is created. but it contains entries of only asp controls.Is there any tool or any setting that i can do to get the entries for telerik controls as well as the as controls inside the telerik controls? Please help
Manasi Vartak
Top achievements
Rank 1
 answered on 29 Apr 2010
1 answer
120 views
I am using radcalendar with multi-month view. When a date is selected, I can use the following code to obtain the exact date selected:

e.SelectedDates[e.SelectedDates.Count - 1].Date

However, if the user clicks on the same date again to de-select it, how do I obtain that date? I need to get that date to continue with some business logic.

Thanks!

Frank
Maria Ilieva
Telerik team
 answered on 29 Apr 2010
1 answer
154 views
Hello,

I have a RadChart in Gantt Mode showing project management related information
I am opening a Radalert window when user clicks on different zones of this chart, that shows some additional information.

I am building a Java Script in the 'code behind' module following the known method documented on the site, i.e.:
(http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind.aspx). Works ok.

What I would like to do is to show the radalert window as non-modal so that the user can have several windows opened at the same time. Is this possible or should  to use a different technique and not a radAlert?
If this is the case, then  can you please provide a resource showing how to do it?
Please note that I don't click a control (button, etc) it's just a zone on the chart.

Thank you,
M. Rusu

Georgi Tunev
Telerik team
 answered on 29 Apr 2010
1 answer
141 views
Hello All ,

While assigning the DataField ( Date Time Object from Data Source ) how just i can format the date , it takes up the default style ( as store in database )

here is my code excerpt

                        oBoundColumn = new GridBoundColumn();
                        oBoundColumn.DataType = Type.GetType("System.DateTime");
                        oBoundColumn.UniqueName = "EndDate";
                        oBoundColumn.HeaderText = "End Date";
                        oBoundColumn.DataField = "EndDate";

Thanks
-Prince



Shinu
Top achievements
Rank 2
 answered on 29 Apr 2010
2 answers
111 views
I want to have a validator trigger an error when SOME (any) value exists in the panel.  If everything is good, the webservice just returns "";

How can I get that?  get_html(), get_value(), html() dont seem to work or be right, and the documentation is pretty gimped for the RadXmlHttpPanel.
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 29 Apr 2010
1 answer
472 views
i am trying to develop a custom tree view web part  using telerik Rad controls in visual studio 2008 and iam getting fallowing warnings


Warning   1   Could not resolve this reference. Could not locate the assembly "Telerik.Web.UI, Version=2009.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.   SFALibrary_DragnDrop

Warning   2   The referenced component 'Telerik.Web.UI' could not be found.    


in my assembly i hav differnt version of Telerik.Web.UI.

how can i replace the version?

any thoughts?

sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 29 Apr 2010
1 answer
130 views
I want to hide the textbox and button after a file is uploaded so that the only thing showing is the filename and remove link. This is going to be in every row of a table and the user can only upload one file per row. Is there a way to do this?
Paul
Top achievements
Rank 1
 answered on 29 Apr 2010
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?