Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
202 views

Hello Every one

This is my first post, In my Applictaion when i clicked on the Add button it will open a radwindow (New form), When i click on the save button it saves the record and back to the original Wizard Step, I would like to implement a logic in which when user clicked on save button it back to the original Wizard but skip that step and move to the next step Automatically, so user dont need to press the Next button,

Can any one please guide?

 

 //**// for NewForm Start
            function AddOrUpdateNewForm() {
                var eventID = document.getElementById('<%= EventID.ClientID %>').value;          
                var oWnd = window.radopen("NewForm.aspx?IsAmend=true&EventID=" + eventID, "BtnNewForm");
                oWnd.SetUrl(oWnd.GetUrl());
            }
            function OnNewFormClose(radWindow) {
                var arg = radWindow.Argument;
                if (!radWindow.Argument) {
                }
                else {
                    SelectSpecificDisableComboValue($find("<%=ABC.ClientID %>"), arg.ABC);
                  
                    SetValue(arg.BRSTotalScore, $find("<%=Total.ClientID %>"));                
                    MoveNextStep();                   
                }
            }
            //**// for NewForm End

I would like to implement the logic when user is on ABC Step and open the DEF form through ABC Step (RadWindow) and when saved the record through Radwindow then user is redirected to the XYZ (Next Step), rather than coming back to ABC Step.

 function MoveNextStep(sender, args) {
                alert("MoveStep1");
                var step = document.getElementById('<%=ActiveWizardStep.ClientID%>').innerText;
                //alert(step1);              
                alert(step);      

                var command = args.get_command();
                if (command == "1") {
                    var activeIndex = sender.get_activeIndex();
                    if (activeIndex > 0) {
                        sender.set_activeIndex(activeIndex + 1)
                    }
                }            

            }

 

 

Rumen
Telerik team
 answered on 02 May 2019
3 answers
379 views
Hi, all!
I've an RadGrid.
After I make filter, no loads this RadGrid. Because my event CarregaGrid() this inside "If(!IsPostBack)".
I load this RadGrid with SQL, in List (DataSource in my .cs)
If I call CarregaGrid() outside if (!IsPostBack), I've an error.
When I load this RadGrid after an filter? Or... When I call CarregaGrid() outside If(!IsPostBack) without error?


public void CarregaGrid()
    {
        var listaRequest = new Locations().ConsultLocations();
        if (listaRequest != null)
        {
            this.RadGrid1.DataSource = listaRequest;
            this.RadGrid1.DataBind();
        }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["idioma"] == null)
            {
                string idioma = CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToString();
                Idioma.MudaCultura(idioma);
                Session["idioma"] = idioma;
            }
 
            else if (Session["idioma"] != null)
            {
                string idioma = Session["idioma"].ToString();
                Idioma.MudaCultura(idioma);
            }
 
            IdiomaList.Items.Add("PORTUGUÊS");
            IdiomaList.Items.Add("ENGLISH");
            IdiomaList.Items.Add("ESPAÑOL");
 
            if (Session["idioma"].ToString() == "pt")
            {
                IdiomaList.SelectedValue = "PORTUGUÊS";
            }
 
            else if (Session["idioma"].ToString() == "en")
            {
                IdiomaList.SelectedValue = "ENGLISH";
            }
 
            else if (Session["idioma"].ToString() == "es")
            {
                IdiomaList.SelectedValue = "ESPAÑOL";
            }
 
            RadGrid1.Columns[1].HeaderText = Idioma.RetornaMensagem("location");
            RadGrid1.Columns[2].HeaderText = Idioma.RetornaMensagem("servername");
            CarregaGrid();
        }
    }

Eyup
Telerik team
 answered on 02 May 2019
1 answer
212 views

I have a screen with RadComboBox with these parameters:

<telerik:RadComboBox ID="RadComboBox1" runat="server"  
    OnClientItemsRequested="OnClientItemsRequestedHandler" 
    OnClientDropDownOpening="OnClientItemsRequestedHandler" 
    EnableLoadOnDemand="true"             
    OnItemsRequested="RadComboBox1_ItemsRequested"> 
    <ExpandAnimation Type="none" /> 
    <CollapseAnimation Type="none" /> 
</telerik:RadComboBox> 

 

 

and this code :

 

<script type="text/javascript"> 

function OnClientItemsRequestedHandler(sender, eventArgs) 

    //set the max allowed height of the combo  
    var MAX_ALLOWED_HEIGHT = 220; 
    //this is the single item's height  
    var SINGLE_ITEM_HEIGHT = 22; 

    var calculatedHeight = sender.get_items().get_count() * SINGLE_ITEM_HEIGHT; 
    var dropDownDiv = sender.get_dropDownElement(); 
    if (calculatedHeight > MAX_ALLOWED_HEIGHT)  
    {  
        setTimeout ( 
            function () { 
                dropDownDiv.firstChild.style.height = MAX_ALLOWED_HEIGHT + "px";  
            }, 20 
        );                 
    }  
    else  
    {  
        setTimeout ( 
            function () { 
                dropDownDiv.firstChild.style.height = calculatedHeight + "px";  
            }, 20 
        ); 
    } 
}         
</script> 

 

 

The problem is when the dropdown is expanding Up and the height of the dropdown is reduced, the dropdown is render far from the combo box input field.

Like that:

 


Vessy
Telerik team
 answered on 01 May 2019
7 answers
1.9K+ views
I use GridHyperLinkColumn  on the radgrid, the grid has id, date, amount1, amount2 columns,
amount1 and amount2 columns are GridHyperLinkColumn, I want to click on amount1 columns but pass date and amount on the URL
if I set DataNavigateUrlFormatString="Detail.aspx?amount={0}", it will pass amount1 on the url, but not date, how I pass date on the URL when click on the amount1, since I want to go to a detailed screen for amount1 for the specific date (same for amount2 column).

Thanks,
Jessie

Eyup
Telerik team
 answered on 01 May 2019
1 answer
79 views
I'm working on an application that allows multiple people to collaborate on a document. Ultimately, the document has a single document owner, and multiple contributors. The document owner is the only one that can accept/reject changes.  I've found the client-side method set_canAcceptTrackChanges, but I'd still like for the user to be able to remove their own comments/changes. I was hoping there was some client-side method I could use to check when the context menu pops up. Any suggestions?
Rumen
Telerik team
 answered on 30 Apr 2019
2 answers
289 views

I am using RadGrid (2018.3.910.40) with the EnableHeaderContextMenu="true" to allow user to show/hide any columns of the grid.  Due to the number of columns being displayed in the grid vertical scrolling is needed.  On first load the grid displays 5 columns, if I right-click on any of these columns I can select the option "Select Columns" and a list of all the columns appear and each one is checked.  Now if I scroll to display the next 5 columns and right-click to select columns, the columns 2-4 are shown but are not checked anymore.  if I scroll again to display the next five, then columns 2-10 are no longer checked and this continue.  If I scroll to show the previous columns then those columns are shown as checked.  This happens on all browsers.

Any ideas?

 

John
Top achievements
Rank 1
 answered on 30 Apr 2019
3 answers
102 views

Is it possible to drag lines similar to following example?

https://bl.ocks.org/denisemauldin/538bfab8378ac9c3a32187b4d7aed2c2

Thank you

Vessy
Telerik team
 answered on 30 Apr 2019
3 answers
161 views

Hello,

I'm trying to use ImageEditor in one of our projects.

I would need to draw a line (or rectangle) over an existing image but without the mouse. The user will have to specify the coordinates in an input box and then a line is drawn.

So far, I've been able from client side to change the tool to pencil : radImageEditor1.editImageOnServer("Pencil", commandText, customArgument, callbackFunction);

But I can't found a way to draw from the client code.

Could you please tell me if this is possible or drawing is only allowed by using the mouse?

Regards,

Sabine

 

Vessy
Telerik team
 answered on 30 Apr 2019
4 answers
689 views
Hi,

I'm new user of the Telerik Controls and I have a question . . . 

I have a search screen where users can search data using various criteria.  One of the criterion is specified by making a choice in an asp.net dropdownlist.  When a certain choice is made I want to do a postback from the dropdownlist.  However, when I do this the Radgrid "NeedDataSource" Event fires.  Is there any way I can prevent the "NeedDataSource" Event from firing?  Or, is there a way to determine where the "NeedDataSource" Event was called from?  I don't need this event to fire in this case.

Thanks,

Andy 
Peter Milchev
Telerik team
 answered on 30 Apr 2019
1 answer
475 views

I have a wizard that will step users through an application and we allow users to leave the application process and return later.  We obviously don't want them to lose any progress they made previously so we store the data in the database.  What I am looking to do is if data exists for step 1, load it, Save data on clicking "Next", then load step 2 (if data exists), save on "Next", etc.. through the process.  I have the code to save the data but not sure of what RadWizard Function I should be referencing to load current step data.  Here is what I have for when they click "Next"

Private Sub RadWizard1_ActiveStepChanged(sender As Object, e As EventArgs) Handles RadWizard1.ActiveStepChanged
    Dim activeStepIndex As Integer = TryCast(sender, RadWizard).ActiveStep.Index
    If activeStepIndex = 1 Then
        SaveStep1()
    ElseIf activeStepIndex = 2 Then
        SaveStep2()
    ElseIf activeStepIndex = 3 Then
        'UploadFiles()
    End If
 
End Sub
Peter Milchev
Telerik team
 answered on 30 Apr 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?