Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
197 views
Hi Guys

I have a requirement to have a context menu on a grid row triggered when a cell is clicked.

I have this working, using the following :

​
RowDataItem("Event").Attributes("href") = "#"
RowDataItem("Event").Attributes("onclick") = [String].Format("return showPriorityMenu(event)")
 
 
function showPriorityMenu(e) {
 
    var contextMenu = $find("<%= rmPriority.ClientID%>");
                    $telerik.cancelRawEvent(e);
                    if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) {
                        contextMenu.show(e);
                    }
                }

What I can't seem to do is get a handle in the idex and at the server the row(ID) data.

I have also had a play by setting the clientEvents on the grid - this works following your examples where I can get the row id server side and update the row and perform the AJAX update.

The trouble with this approach is that the entire row is the trigger for the event, not just a targeted cell.

I have tried playing with the JS to get (Sender, EventArg) in to the JS from my posted code, btu can't figure it out.

How can I do this.

Andy  
Konstantin Dikov
Telerik team
 answered on 08 Apr 2014
1 answer
69 views


I am trying to add multiple Telerik RadGrid to a listView.
On the initial addition it fires the RadGrid ItemDataBound event.
However, when users click to add another, nothing gets added on the
screen since the event is not fired if there are multiple grids.

'// This is called after users click to add a new grid
Protected Sub LVScenarios_ItemDataBound(sender As Object, e As RadListViewItemEventArgs) Handles LVScenarios.ItemDataBound
    If TypeOf e.Item Is RadListViewDataItem Then
        Dim scenarioGrid As RadGrid = DirectCast(e.Item.FindControl("GVScenarios"), RadGrid)
        If Not scenarioGrid Is Nothing Then
 
            AddHandler scenarioGrid.ItemDataBound, AddressOf scenarioGrid_ItemDataBound
 
            scenarioGrid.DataSource = scenarioDataSource
            scenarioGrid.DataBind()
 
             '// If only one gird in the LVScenarios datasource, then the grid itemDataBound is fired, if more than one it is skipped and nothing ends up on the screen
 
        End If
    End If
End Sub
Kostadin
Telerik team
 answered on 08 Apr 2014
1 answer
203 views
Does anyone know how i can have the file list upload show in a row much like Outlook etc.
instead of then displaying vertically, i'd like them to list side by side in a horizontal row.

Princy
Top achievements
Rank 2
 answered on 08 Apr 2014
1 answer
118 views
I'm not sure whether I have a Telerik problem or a more generic Asp.Net problem.  (I'm getting that 'Failed to load viewstate' error.)

I have a RadComboBox set up in the RadAjaxManager.  The box in turn has a RadTabStrip and an Asp:Panel as it's updated controls.

What I would like to do is when certain values of the box are selected, is to load one of several ASCXs I have defined.  If I change the value of the dropdown to a value that does not have an ASCX associated with it, I want to dispose of whatever ASCX has already been loaded. Or if a different ASCX is selected, I want to unload the old ASCX and load the new.  The ASCX is to be loaded into the Asp:Panel.   In order to capture the values entered into the form, I reload the form on the Page_Load postback event (using the viewstate to get the values).  Up till now I haven't had to worry about this because I simple loaded all the forms at once and simply used AJAX to show/hide them as necessary.

This scheme works fine if I select a single ASCX related value, load the control, and then immediately hit save or cancel.

However if I change the dropdown multiple times, things seem to break down.  I seem to lose the Ajax if that's the right way to put it.  (In any case it seems to stop loading the form I've selected and if I hit cancel, I get that 'Failed to load viewstate' error.

How do I keep the viewstate under control?  Suggestions?
Krishnaprabhuraja
Top achievements
Rank 1
 answered on 08 Apr 2014
3 answers
206 views
  I want to persist the autoCompleteBox text after clicking outside of it.Is it possible? If yes, how?
Plamen
Telerik team
 answered on 08 Apr 2014
2 answers
461 views
Hello

I would be grateful if you someone could provide a simple menu example, could be this example: http://demos.telerik.com/aspnet-ajax/menu/examples/overview/defaultcs.aspx. Cannot seem to extract just the menu pages from the Live Demos example

do I have to use user controls for each tab? I want a web site with a home, product, about sections

thanks

graham 
Graham
Top achievements
Rank 1
 answered on 08 Apr 2014
3 answers
154 views
Hallo everyone,
I immediately explain my problem. In RadGrid I am using the tag CommandItemTemplate and  in this tag I put the following controls:

<asp:LinkButton ID="multipleUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleUpdate" Text="Edit"></asp:LinkButton>
<asp:LinkButton ID="salvaUpdate" ClientIDMode="Static" runat="server" CommandName="MultipleSave"  Text="Save"></asp:LinkButton>

When I click on Edit the following code behind  is ran:
        protected void GridFasce_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "MultipleUpdate")
            {
                GridFasce.AllowMultiRowEdit = true;
                for (int i = 0; i < GridFasce.SelectedItems.Count; i++)
                {
                    GridFasce.SelectedItems[i].Edit = true;
                  
                }
                
                GridFasce.MasterTableView.Rebind(); 
            }
}
Now, all selected rows of the radgrid are editable, but all controls of the page are not available or thery are blocked. For example if I click on MultipleSave, it does not call the postback. It also happes for each controls show on page.
Please, can someone help me?


Regrads,
Achille


Princy
Top achievements
Rank 2
 answered on 08 Apr 2014
1 answer
103 views
How can I make my chart look like the one below it in the attachement?
Danail Vasilev
Telerik team
 answered on 08 Apr 2014
9 answers
220 views

Hello,

I am using rad recurrence editor in which Saturday checkbox is checked by default. In order to resolve this issue I used below script 

 string scriptToRegister = "$('.rsAdvWeekly_WeekDays input:checkbox').each(function (index) { $(this).attr('checked', false); });";
 ScriptManager.RegisterStartupScript(this, this.GetType(), "RecurranceKey", scriptToRegister, true);

Using above script checkbox is getting unchecked but after that when I want to bind 'RecurrenceRuleText' to recurrence editor, it is not binding the rule properly. That means at the time of editing when I want Saturday checkbox as checked, so because above script it is unchecking the checkbox.

Could you please assists me on this issue?

Thanks and Regards,
Deepti
Plamen
Telerik team
 answered on 08 Apr 2014
1 answer
261 views

Hi,

I have a problem with your RadAsyncUpload.

When a download a large file, I disable my save button. But, if I cancel my download, how to enable my save button ?

I use this even

$telerik.$(".ruCancel").on('click', function() {
    enableButtons();
});

for dectect the cancel button click, but if I use RadAsyncUpload
when download 2 large file simultaneous, If I cancel my first file, my save
button is enable, but the second file has not finished to downloading. 

Are you an event to detect the cancel button ? I use
OnClientFileUploadedFailed but is not fired when I cancel my download.

I check your demo, and this link

http://www.telerik.com/forums/how-to-trap-when-user-clicks-on-cancel-button

but it’s not works.

Browser used : IE9, Chrome, Firefox.

 
Thank’s

Shinu
Top achievements
Rank 2
 answered on 08 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?