Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
Hi,

How to update one or more controls after postback of one or more controls ?

Thank for your help

Anne
Dan Lehmann
Top achievements
Rank 1
 answered on 07 Oct 2011
0 answers
59 views
Hello,
in a radgrid I have 3 columns in which I inserted a radcombobox for each column. The objectdatasources of each combo receives the values of all 3 selecteditem combos, in this way if I filter for the first combo, the other 2 are automatically updated and they shows only the values available for the filtered records. All works fine but...... if I filter for a combo, and then I use a text filter and in this second case there are no records to show, an error occurs because the selecteditem chosen for the combo is not available anymore (because the combo is automatically updated...)

So, how can I manage this case? Is there a way to say "If the combo has no items and I set a non existing value, go ahead anyway without thowing an exception?"

Thanks
Mario
Top achievements
Rank 1
 asked on 07 Oct 2011
1 answer
126 views
Is there a way to use a jquery dialog modal instead of the javascript confirm message with the Treeview? When a user drags a node to another on a tree I am executing the client side event "OnClientNodeDropping", what I want to do is show a jquery dialog asking the user to confirm the move. I would want the OK and Cancel button of the modal dialog to pass a value to args.set_cancel(dialog_result); When I try this the page execute before the dialog can return a true or false confirmation. How can I swap out the old school confirm for a jquery modal dialog


function OnNodeDropped(sender, args) {
            var srcNode = args.get_sourceNode();
            var destNode = args.get_destNode();
            var dNode = destNode._contentElement.innerHTML.indexOf("inActiveCategory");
            if (dNode >= 0) {
//Call a modal dialog here and return true of false instead of using the old school confirm
                var result = confirm("This category is inactive. Moving to " + destNode.get_text() + " will set " + srcNode.get_text() + " to inactive as well! ");
//get the return value from the dialog, is it canceled or ok 
                args.set_cancel(dialog_result);
            }
        }
Plamen
Telerik team
 answered on 07 Oct 2011
1 answer
63 views
Can I change navigation sequence?
For example, now "Day Week Month TimeLine" <-- by default, right?
So I want to change to "Day TimeLine Month ... ". Is that possible?
Ivan Zhekov
Telerik team
 answered on 07 Oct 2011
3 answers
54 views
I haven't used RadGrid for a while and I am spending a lot of time getting nowhere with something I know should be easy.

I don't care if I use a ListView or Grid - either will do the job. The datasource is a datasource control that works fine and I can get both a listview and a grid to display the data I want. However;

1. I only want a max of 1 row selected at a time
2. I want read the value of some cells/columns in the selected row

That's it. (2) is the priority.

I've tried everything I can think of and I've looked at all of the documentation and nothing seems to work. With the grid the grid is displaying the data and I can see that myGird.items has a count =2 but all of the dataItems=null. I'm obviously missing something obvious but I just cannot get anything to work at the moment.
Dan Lehmann
Top achievements
Rank 1
 answered on 07 Oct 2011
1 answer
414 views
Hi,

I have three table in my page. first table have radbutton for save with radtextbox using required field validator. first time error message displayed. i am using ajax loading panel for the particular table. first time record saved successfully with loading panel. but second time required field validator not firing. click event firing with empty radtextbox.

How to fix this problem. i have attached code. please check and let me know.

  <telerik:AjaxSetting AjaxControlID="rbSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tblAttachFiles"  LoadingPanelID="ralpAttachment"  />              
                </UpdatedControls>
            </telerik:AjaxSetting>


   <asp:Table ID="tblSaveAttachment" runat="server" border="2" Style="font-family: Segoe UI;
                                        font-size: 12px; font-weight: bold" Width="600px">
                                        <asp:TableRow>
                                            <asp:TableCell ID="tblAttachSaveFirst" Width="100px" runat="server" Text="FileName: "></asp:TableCell>
                                            <asp:TableCell>
                                                <asp:Label ID="lblFileName" runat="server"></asp:Label>
                                                <asp:HiddenField ID="hfFileName" runat="server" />
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow>
                                            <asp:TableCell ID="tcSSN_GrpNum_Tin" runat="server" Text="SSN: "></asp:TableCell>
                                            <asp:TableCell>
                                                <asp:HiddenField ID="hf_Pty_payinfo_id" runat="server" />
                                                <telerik:RadTextBox ID="txtSSN_GrpNum_Tin" runat="server" onblur="ssn_onBlur()" Width="191px">
                                                </telerik:RadTextBox>
                                                <asp:Label ID="lblSSN_GrpNum_Tin" runat="server" style="display:none;visibility:hidden"></asp:Label>
                                                <asp:Label ID="lblMantxtSSN_GrpNum_Tin" runat="server" Text=" * "
                                                    ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvtxtSSN_GrpNum_Tin" runat="server" ControlToValidate="txtSSN_GrpNum_Tin"
                                                    Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
                                                    Text="Please enter SSN"></asp:RequiredFieldValidator>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow>
                                            <asp:TableCell ID="tcCliam_Group_SSN_Provider_Name" runat="server" Text="Name:">
            <%--<asp:Label ID="lblCliam_Group_SSN_Provider_Name" runat="server" Text="Name:"></asp:Label>--%>
                                            </asp:TableCell><asp:TableCell>
                                                <telerik:RadComboBox ID="rcbCliam_Group_SSN_Provider_Name" runat="server" Width="195px"
                                                    AutoPostBack="false" OnClientSelectedIndexChanged="rcbCliam_Group_SSN_Provider_Name_OnClientSelectedIndexChanged">
                                                    <Items>
                                                        <telerik:RadComboBoxItem Text="" Value="" />
                                                    </Items>
                                                </telerik:RadComboBox>
                                                <label id="lblCliam_Group_SSN_Provider_Name" runat="server" style="display:none;visibility:hidden"></label>
                                                <asp:Label ID="lblManCliam_Group_SSN_Provider_Name" runat="server" Text=" * " ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvCliam_Group_SSN_Provider_Name" runat="server"
                                                    ControlToValidate="rcbCliam_Group_SSN_Provider_Name" Display="Static" ForeColor="Red"
                                                    Font-Bold="false" InitialValue="" ValidationGroup="Validate" Text="Please select Name"></asp:RequiredFieldValidator>
                                            </asp:TableCell></asp:TableRow>
                                        <asp:TableRow>
                                            <asp:TableCell ID="tclDocType" runat="server" Text="Document Type:">
          <%--  <asp:Label ID="lblDocType" runat="server" Text="Document Type:"></asp:Label>--%>
                                            </asp:TableCell><asp:TableCell>
                                                <telerik:RadComboBox ID="rcbDocType" runat="server" Width="195px">
                                                    <Items>
                                                        <telerik:RadComboBoxItem Text="" Value="" />
                                                    </Items>
                                                </telerik:RadComboBox>
                                                <label id="lblDocType" runat="server" style="display:none;visibility:hidden"></label>
                                                <asp:Label ID="lblManDocType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvDocType" runat="server" ControlToValidate="rcbDocType"
                                                    Display="Static" ForeColor="Red" Font-Bold="false" InitialValue=""
                                                    ValidationGroup="Validate" Text="Please select Document Type"></asp:RequiredFieldValidator>
                                            </asp:TableCell></asp:TableRow>
                                        <asp:TableRow ID="trCliamId" runat="server">
                                            <asp:TableCell ID="tcCliamId" runat="server" Text="Cliam Id:">
             <%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
                                            </asp:TableCell><asp:TableCell>
                                                <telerik:RadTextBox ID="txtCliamId" runat="server" onblur="CliamId_onBlur()" Width="191px">
                                                </telerik:RadTextBox>
                                                <asp:Label ID="lblCliamId" runat="server" style="display:none;visibility:hidden"></asp:Label>
                                                <asp:Label ID="lblManCliamId" runat="server" Text=" * " ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvCliamId" runat="server" ControlToValidate="txtCliamId"
                                                    Enabled="false" Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
                                                    Text="Please enter Cliam Id"></asp:RequiredFieldValidator>
                                            </asp:TableCell></asp:TableRow>
                                        <asp:TableRow ID="trPlanType" runat="server">
                                            <asp:TableCell ID="tcPlanType" runat="server" Text="Plan Type:">
             <%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
                                            </asp:TableCell><asp:TableCell>
                                                <telerik:RadComboBox ID="rcPlanType" runat="server" Width="195px">
                                                    <Items>
                                                        <telerik:RadComboBoxItem Text="" Value="" />
                                                    </Items>
                                                </telerik:RadComboBox>
                                                 <asp:Label ID="lblPlanType" runat="server" style="display:none;visibility:hidden"></asp:Label>
                                                <asp:Label ID="lblManPlanType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvPlanType" runat="server" ControlToValidate="rcPlanType"
                                                    Display="Static" ForeColor="Red" Font-Bold="false" InitialValue="" ValidationGroup="Validate"
                                                    Text="Please Select Plan Type"></asp:RequiredFieldValidator>
                                            </asp:TableCell></asp:TableRow>
                                        <asp:TableRow>
                                            <asp:TableCell>
                                                <asp:Label ID="lblDesc" runat="server" Text="Discription:"></asp:Label>
                                            </asp:TableCell><asp:TableCell>
                                                <telerik:RadTextBox ID="txt_Discription" runat="server" Width="250px" ClientEvents-OnKeyPress="txtSaveBtn_OnKeyPress">
                                                </telerik:RadTextBox>
                                                 <asp:Label ID="lblDiscription" runat="server" style="display:none;visibility:hidden"></asp:Label>
                                                <asp:Label ID="lblManDesc" runat="server" Text=" * " ForeColor="Red"></asp:Label>
                                                <asp:RequiredFieldValidator ID="rfvDescrip" runat="server" ControlToValidate="txt_Discription"
                                                    Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
                                                    Text="Please enter Description"></asp:RequiredFieldValidator>
                                            </asp:TableCell></asp:TableRow>
                                        <asp:TableRow ID="trBtn" runat="server">
                                            <asp:TableCell ColumnSpan="2" HorizontalAlign="Center">
                                                <telerik:RadButton ID="rbSave" runat="server" Text="Save" Width="75px" OnClientClicked="rbSave_OnClientClicked"
                                                    ValidationGroup="Validate" CausesValidation="false" UseSubmitBehavior="false">
                                                </telerik:RadButton>
                                                &nbsp;&nbsp;
                                                <telerik:RadButton ID="rbCancel" runat="server" Text="Cancel" Width="75px" OnClientClicked="rbCancel_OnClientClicked">
                                                </telerik:RadButton>
                                            </asp:TableCell></asp:TableRow>
                                    </asp:Table>


Thanks,
Dhamu
Slav
Telerik team
 answered on 07 Oct 2011
9 answers
176 views
I have a radgrid. A couple of columns require tooltip. I am using web service to load data into my tooltip instead of pre-loading them during grid load.

Here's my grid and radtooltip manager.
<telrik:RadGrid ID="rg" runat="server" ....> 
    <MasterTableview DataSourceId="odsProducts"
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="Product"
                <ItemTemplate> 
                    <asp:HyperLink ID="hlProduct" runat="server" /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Price"
                <ItemTemplate> 
                    <asp:HyperLink ID="hlPrice" runat="server" /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView 
</telerik:RadGrid> 
 
<telerik:RadToolTipManager ID="rttManager" runat="server" Position="BottomCenter" RelativeTo="Element" Animation="Fade" /> 


On the codebehind I'm settng the tooltip manager info.
rttManager.WebServiceSettings.Path = "~/WebServices/AppWebService.asmx"
rttManager.WebServiceSettings.Method = "GetProductToolTips"
rttManager.HideEvent = ToolTipHideEvent.LeaveTargetAndToolTip; 


Now, I'm setting the tooltip info in the grid itemcreated method
rttManager.TargetControls.Add(hlProducts.ClientID, productId.ToString(), true); 


Here's my webservice method if you think it helps you:
[WebMethod] 
public string GetProductToolTips (object context) 
    IDictionary<stringobject> contextDictionary = (IDictionary<stringobject>)context; 
    string productId = ((string)contextDictionary["Value"]); 
     
    if (String.IsNullOrEmpty(productId)) 
        return String.Empty; 
    else 
        return RenderViewManager.RenderView("~/Products/UserControls/ProductToolTip.ascx"); 


So far so fine. The hlProduct element now shows tooltip. Now, I want the hlPrice element to show tooltip as well. Problem is I can't have another tooltipmanager in the page. I don't know if it is possible to create a new method for the new element.

Can somebody help me with it.

Thanks.
Baal
Top achievements
Rank 1
 answered on 07 Oct 2011
9 answers
865 views
Greetings all,

I have been using Datepicker & Timepicker from Jquery for some months but since Telerik provides the same controls i would like to know how i could implement both in a Radgrid while trying to add a row.

I have a field which expect to get a date and a field a time.

I would like, as JQuery proposed, to be able to pick the date/time when i click on the  textbox.

thanks for the help !
Adigard
Top achievements
Rank 1
 answered on 07 Oct 2011
5 answers
70 views
I'm using a stored procedure that returns an error message if the inserted/updated data violates certain criteria. (name already exists...etc)

I'm able to get the message back fine using
Protected Sub GridViewDataSource_Inserted(ByVal sender As Object, ByVal e As SqlDataSourceStatusEventArgs) Handles GridViewDataSource.Inserted
        Dim command As DbCommand
        command = e.Command
 
        If Not e.Exception Is Nothing Then
            e.ExceptionHandled = True
            SetMessage("Data cannot be inserted. Reason: " + e.Exception.Message)
        Else
            If command.Parameters("@RetMsg").Value.ToString().Length > 0 Then
                SetMessage("Data cannot be inserted. Reason: " + command.Parameters("@RetMsg").Value.ToString())
            Else
                SetMessage("New data has been inserted")
            End If
        End If
    End Sub

...but I also want to keep the insert/edit form in the grid from clearing the data the user was trying to enter.

Any ideas on how to accomplish this?

Once again, thanks to everyone for the continued guidance.
Tsvetina
Telerik team
 answered on 07 Oct 2011
1 answer
230 views
Hi,
I have a repeter control which have HTML button. On click of that button I am showing RadToolTip.Code is :

    <telerik:RadToolTip ManualClose="true" ShowEvent="FromCode" ID="RadToolTip2" Skin="Vista" RelativeTo="Mouse"   
    runat="server" TargetControlID="btnTooltipView" IsClientID="true">   
    <div style="margin:5px 5px 0px 5pxfont-size:12pxpadding-bottom10px;">
    <div style="border-bottom:solid 1px #ccc;margin-bottom:9px;font-size:11px;">First Name: Elizabeth <br /> Last Name: Jones <br /></div>
    Notes:<br />
     <asp:Label runat="server" ID="StartingOn" Text="Another general note added to appointment."></asp:Label>
   </div>
</telerik:RadToolTip> 
Here btnTooltipView is id of button in repeter template. My problem is that on browser there is many buttons with 
same name appears.so when i click on any button tooltip appears always on first button,because it pick first button id as target. Please help me...
Marin Bratanov
Telerik team
 answered on 07 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?