Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
93 views
Hi,
We're using telerik version 2009.2.826.35

We've just upgrade (from .net 3.5) to .Net 4.0 and asp.net 4.0
The Radcombo, sits inside asp undatepanel, postbacks after the selected item changes.
(Attaching the s-shot for the error) This is occuring after the results comes back from the server.

Becasue of this error, our submit button is not enabled(ie this is enabled from the server side code)
This was working fine with .net 3.5

Please treat this as an urgent issue.

Thanks for the help.

Gopi
Gopinath
Top achievements
Rank 1
 asked on 02 Mar 2011
4 answers
177 views

I wish to use a single RadListBox as a replacement for a CheckBoxListControl. I am only really interested in the Checked functionality of the listbox items. Their selected state is irelevant. Therefore, I would like to prevent the items from ever being "Selected" and force users to use the checkboxes. I found a handy example which allows me to check/uncheck the checkboxes if the user clicks on an item by handling the selectedindexchanged event:
 

var sema_used; 
       function listItemClicked_BSC(sender, eventArgs) {
           if (!sema_used) {  
               sema_used = true;
               var item = eventArgs.get_item();  
               if (item.get_checked()) {  
                   item.uncheck();  
               }  
               else {  
                   item.check();   
               }
               item.set_selected(false);
               sema_used = false;  
           }  
       }


However, even though I call item.set_selected(false), the item still apears to be highlighted in the listbox. I believe this is probably because the selectedindex does not always change when a user clicks on an item. Is there a way to make sure all items are unselected (unhighlighted) in a listbox. Or is there a way to disable item selectiong, but keep the checkbox functionality? Ideally, there should be a client-side event for ItemClicked and ItemClicking, rather than just the current SelectedIndexChanged.

Thad
Top achievements
Rank 2
 answered on 02 Mar 2011
6 answers
188 views
When using the rad grid I dont see the columns until I bind.  I have AutoGenerateColumns="False".  Any way to see the columns?
John Giblin
Top achievements
Rank 1
 answered on 01 Mar 2011
0 answers
95 views
I don't see a delete post option...
sqlgod
Top achievements
Rank 1
 asked on 01 Mar 2011
3 answers
133 views
On the Day, Week, and Month buttons located at the top right corner of the scheduler, we see black dots appear over the text.  Is there any resolution to this?

Thanks in advance.
André
Top achievements
Rank 1
 answered on 01 Mar 2011
4 answers
452 views
hi. I've got a asp:button on my formtemplate. when i call it from the insert form, i get passed a grideditform item. but when i call it from the update form, i get passed a griddataitem. i need to access the controls on this form and can't seem to get to them from the griddataitem. please help.

thanks!

.aspx
    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    <telerik:RadGrid ID="RadGrid4" runat="server"
    AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource4" OnNeedDataSource="RadGrid4_NeedDataSource"
    OnItemCreated="RadGrid4_ItemCreated" OnInsertCommand="RadGrid4_InsertCommand" OnUpdateCommand="RadGrid4_UpdateCommand" OnDeleteCommand="RadGrid4_DeleteCommand"
    OnItemCommand="RadGrid4_ItemCommand"
    GridLines="None">
<MasterTableView datakeynames="GeoLocationId" datasourceid="SqlDataSource4" CommandItemDisplay="TopAndBottom">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column">
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn FilterControlAltText="Filter column column"
            Text="Delete" UniqueName="column" CommandName="Delete"
            ConfirmDialogType="Classic" ConfirmTitle="Confirm Data Center Delete" ConfirmText="Are you sure you want to delete this Data Center?">
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="GeoLocationId" DataType="System.Int32"
            FilterControlAltText="Filter GeoLocationId column" HeaderText="Data Center ID"
            ReadOnly="True" SortExpression="GeoLocationId" UniqueName="GeoLocationId">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Name"
            FilterControlAltText="Filter Name column" HeaderText="Location"
            SortExpression="Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description"
            FilterControlAltText="Filter Description column" HeaderText="Name"
            SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Latitude"
            FilterControlAltText="Filter Latitude column" HeaderText="Latitude"
            SortExpression="Latitude" UniqueName="Latitude">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Longitude"
            FilterControlAltText="Filter Longitude column" HeaderText="Longitude"
            SortExpression="Longitude" UniqueName="Longitude">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LoadBalancer"
            FilterControlAltText="Filter LoadBalancer column" HeaderText="LoadBalancer"
            SortExpression="LoadBalancer" UniqueName="LoadBalancer">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
    <FormTemplate>
        <table border="0" cellpadding="1" cellspacing="2" width="100%" rules="none" style="border-collapse: collapse; background: white;" id="table1">
            <tr>
                <td><asp:Label runat="server" ID="lblGeoLocationId" Text="Data Center ID:"></asp:Label></td>
                <td><asp:TextBox runat="server" ID="txtGeoLocationId" Enabled="false" Text='<%# Bind("GeoLocationId") %>'></asp:TextBox></td>
            </tr>
            <tr>
                <td>Name:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtDescription" Text='<%# Bind("Description") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtDescription" Text="The Name field is required!"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>Load Balancer:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtLoadBalancer" Text='<%# Bind("LoadBalancer") %>'></asp:TextBox>
                    <asp:Button runat="server" ID="btnLoadBalancer" Text="Get Geographic Data" CommandName="GeoLookup" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtLoadBalancer" Text="The Load Balancer field is required!"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revLoadBalancer" runat="server" ControlToValidate="txtLoadBalancer" ErrorMessage="Please enter a valid IP Address." ValidationExpression="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>Location:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtName" Enabled="false" Text='<%# Bind("Name") %>'></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>Latitude:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtLatitude" Enabled="false" Text='<%# Bind("Latitude") %>'></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>Longitude:</td>
                <td>
                    <asp:TextBox runat="server" ID="txtLongitude" Enabled="false" Text='<%# Bind("Longitude") %>'></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="2">
                    <asp:Button ID="btnUpdate" runat="server" Text='<%#  (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                      
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel" />
                </td>
            </tr>
        </table>
    </FormTemplate>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
 
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
    ConnectionString="<%$ ConnectionStrings:MgmtServerConnectionString %>"
    SelectCommand="SELECT [GeoLocationId], [Name], [Description], [Latitude], [Longitude], [LoadBalancer] FROM [GeoLocation] ORDER BY [GeoLocationId]"></asp:SqlDataSource>
.aspx.cs
protected void RadGrid4_ItemCommand(object source, GridCommandEventArgs e)
{
    string strCommandName = e.CommandName;
    if (e.CommandName == "GeoLookup")
    {
        if (e.Item is GridEditFormItem || e.Item is GridDataItem)
        {
            // instantiate form objects
            TextBox loadBalancer = null;
            TextBox location = null;
            TextBox latitude = null;
            TextBox longitude = null;
            RegularExpressionValidator revLoadBalancer = null;
 
            if (e.Item is GridEditFormItem)
            {
                GridEditFormItem item = e.Item as GridEditFormItem;
 
                // retrieve the controls from the edit form
                location = (TextBox)item.FindControl("txtName");
                latitude = (TextBox)item.FindControl("txtLatitude");
                longitude = (TextBox)item.FindControl("txtLongitude");
                loadBalancer = (TextBox)item.FindControl("txtLoadBalancer");
                revLoadBalancer = (RegularExpressionValidator)item.FindControl("revLoadBalancer");
            }
 
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
 
                // retrieve the controls from the edit form
                location = (TextBox)item.FindControl("txtName");
                latitude = (TextBox)item.FindControl("txtLatitude");
                longitude = (TextBox)item.FindControl("txtLongitude");
                loadBalancer = (TextBox)item.FindControl("txtLoadBalancer");
                revLoadBalancer = (RegularExpressionValidator)item.FindControl("revLoadBalancer");
            }
             
            string txtLoadBalancer = loadBalancer.Text;
            bool blnLoadBalancer = this.txtLoadBalancer_IsValidIP(txtLoadBalancer);
            if (blnLoadBalancer)
            {
                try
                {
                    string results = MgmtServer.App_Code.CalculateDistanceToCoast.GeoLookup(txtLoadBalancer);
                    if (results != "" && (results.IndexOf("IP_NOT_FOUND") == -1))
                    {
                        string[] Args = results.Split(new Char[] { ',' });
                        string strLocation = Convert.ToString(Args[0]) + "," + Convert.ToString(Args[1]) + "," + Convert.ToString(Args[2]);
                        string strLatitude = Convert.ToString(Args[4]);
                        string strLongitude = Convert.ToString(Args[5]);
 
                        // update the control values
                        location.Text = strLocation;
                        latitude.Text = strLatitude;
                        longitude.Text = strLongitude;
                    }
                    else
                    {
                        MgmtServer.App_Code.MgmtServerLib.SaveErrorTrackingOnTable(MgmtServer.App_Code.MgmtServerLib.Broad_CallingGeolookupReturn_Error);
                        Label1.Text = "Geographic Data Lookup returned nothing";
                    }
                }
                catch (Exception ex)
                {
                    MgmtServer.App_Code.MgmtServerLib.SaveErrorTrackingOnTable(MgmtServer.App_Code.MgmtServerLib.Broad_CallingGeolookup_Error, ex.Message, txtLoadBalancer);
                    Label1.Text = "An exception occurred calling geolookup: " + ex.Message + ":" + txtLoadBalancer;
                }
            }
            else
            {
                revLoadBalancer.ErrorMessage = "Please enter a valid IP Address.";
                revLoadBalancer.IsValid = false;
                revLoadBalancer.Validate();
            }
        }
    }
}
areen
Top achievements
Rank 1
 answered on 01 Mar 2011
0 answers
85 views
Looking for a way to store open tabs names in a database so they can be restored upon reopening in the event of a browser or computer crash. 

I would like to use C# functions which would make or delete entries in the database when the user opens or closes a tab. Running into issues calling a C# function from JavaScript. Any idea's?

Also is there an option which would allow the user to reorder the tabs?

Thanks,

Geoff
Geoffrey
Top achievements
Rank 1
 asked on 01 Mar 2011
5 answers
123 views
Hi,

I have a treeview inside a combobox, and i have hooked up a javasript that uncheckes any previus nodes, according to this article,
http://www.telerik.com/help/aspnet/treeview/tree_unchecknodebycheckinganothernode.html

But i cant get the script working, could it be becouse of the treeview being inside of a panelbar and/or a combobox, and if so, would anyone have a solution for this?

<asp:Content ID="Content3" ContentPlaceHolderID="phContent" Runat="Server">
<script type="text/javascript" language="javascript">
   var oldNode;
   function UpdateStatus(node)
   {
       if(oldNode != null)
       {
       oldNode.UnCheck();
       }
       node.Check();
       oldNode = node;
   }
</script>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    </telerik:RadAjaxManagerProxy>
      
    <table cellspacing="0" width="100%">
  
<%--
Om man är inloggad som Admin ska man komma direkt till Steg 2
--%>
<tr align="center">
<td align="center" style="padding-top:100px;">
    <telerik:RadPanelBar ID="pbCaseRegistration" Runat="server" Skin="Windows7" 
        Width="500px" ExpandMode="SingleExpandedItem">
        <Items>
              
            <telerik:RadPanelItem runat="server" Text="1 - Ärendeinformation" Expanded="true">
                <Items>
                    <telerik:RadPanelItem runat="server" Value="panCaseinfo">
                        <ItemTemplate>
                            <table class="text" style="padding:10px;" cellspacing=0 width=100%>
                            <tr>
                            <td align=center>
                                <asp:Image ID="imgCaseType" runat="server" ImageUrl="images/infoIcon2.jpg" /><asp:Label ID="Label1" runat="server" Text="Ärendetyp"></asp:Label><br />
                                  
                                       <telerik:RadComboBox ID="cmbCaseType" runat="server" Skin="Windows7" Height="160px" Style="vertical-align: middle;" Width="225px">
                                            <ItemTemplate>
                                                <div id="div1">
                                                  
                                                    <telerik:RadTreeView ID="tvCaseType" runat="server" CheckBoxes="True" 
                                                        Height="160px" Width="100%" AfterClientCheck="UpdateStatus">
                                                          
                                                    </telerik:RadTreeView>
Christian
Top achievements
Rank 1
 answered on 01 Mar 2011
5 answers
268 views
Hi There,

I have a RadCombobox that is placed on a CommandItemTemplate and in my SqlDataSource Selecting event there I need to get the SelectedValue from the RadCombobox. I have tried to use the FindControl function but I can't get it to work so I would be happy if you could tell me how this is done :)

Thanks
Hendrik Johns

Shumaila Imran
Top achievements
Rank 1
 answered on 01 Mar 2011
3 answers
734 views
Hi

In radgrid i'm rebinding data in edit. so i couldn't maintain its scroll postion.

Even i've set "SaveScrollPosition=true"

NOTE : its working fine when i take off ajax setting to rad grid and Load button. but its not tracking its scroll position while controls where loaded in ajax panel.

regards,

Baaje
Pavlina
Telerik team
 answered on 01 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?