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

I have created a grid with 3 columns and I am able to detect a row selection on the client side.

I want to query the row for an ID attribute, so that I can pass this ID to a server function.

I have tried using a hidden column but when I do that my call to

getCellByColumnUniqueName fails because the cell doesn't exist.

surely this is a fairly common requirement.

Gimmik
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
96 views
I have a simple RadGrid with a GridCheckBoxColumn and a GridTemplateColumn with an asp:CheckBox in the EditItemTemplate.  So every row has two checkboxes on it.

When I finished work Tuesday, these checkboxes displayed.  When I next started work on the grid Thursday, they did not.

I cannot figure out why they do not display.

Points On This:
1. When I display the page containing the grid in FireFox, the checkboxes display..
2. When I use View Source to save the HTML of the page that is not displaying the checkboxes and then I open that page in IE8, the checkboxes display.
3. In the debugger in the code behind, the visible property of the asp:checkbox is true.
4. I put an asp:textbox in the same EditItemTemplate as the asp:checkbox and the asp:textbox displays.

5. In the debugger on the client, I can see that the width of the asp:checkbox is set to 0.  I tried manually changing the width in the debugger - it seemed to work but when I rechecked the width, it was still 0.

The HTML sent to the browser for the two columns is the following:

<td style="width:80px;">
  <input id="RadGrid1_ctl00_ctl04_ctl00" type="checkbox" name="RadGrid1$ctl00$ctl04$ctl00" onclick="SelectDeselectRow(0, this);" />
</td>
<td style="width:80px;">
  <span style="display:inline-block;width:50px;">
    <input id="RadGrid1_ctl00_ctl04_chkSelected_2" type="checkbox" name="RadGrid1$ctl00$ctl04$chkSelected_2" />
  </span>
  <input name="RadGrid1$ctl00$ctl04$txtSelected_2" type="text" value="1" id="RadGrid1_ctl00_ctl04_txtSelected_2" onclick="SelectDeselectRow_2(0);" style="width:30px;" />
</td>

The best idea I have on what is happening is that there a script (generated by the RadGrid or by ASP.Net) that runs after the page is loaded that sets the width to 0, causing the checkbox to not be visible.  And that this script only runs in IE8.  I have looked at the script at the end of the page (which I believe is where the registered scripts go) and do not see anything that looks suspicious.

Anyone have any ideas on why the checkboxes do not display?

Thanks,

John

John
Top achievements
Rank 1
 answered on 24 May 2011
4 answers
153 views

 

Hi,

I am using grid inside combobox. Grid has the grouping and the pager. The scenario is when user selects the item of the group the selected item value is set, the combobox is collapsed, and the user is redirected to the specific places. However, when the user clicks on the group header or anywhere on the pager, the action must be completely ignored. Currently the combobox is collapsed with the empty selected value. Could you please help me to achieve the desire behavior?

Thank you, 

Tatiana

P.S. I am using v. 2009 Q3

DW Web Team Member
Top achievements
Rank 2
 answered on 24 May 2011
11 answers
172 views
Hi,
I am using OnClientAppointmentMoveEnd to determine if the user is trying to move an appointment to a disabled timeslot:

function onAppointmentMoveEnd(sender, args) {
    var start = args.get_targetSlot().get_startTime();
    var end = new Date(start.getTime() + args.get_appointment().get_duration());
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
         
    warnIfOccupied(start, end, sender, args);
}

It runs without an error but it also skips over the conditional statement when it shouldn't.

I can verify that this works when I use it on the event OnClientAppointmentResizeEnd. This code works correctly and stops the user dragging the appointment into a disabled area:

function onAppointmentResizeEnd(sender, args) {
    var start = args.get_appointment().get_start();
    var end = args.get_targetSlot().get_endTime();
 
    warnIfOccupied(start, end, sender, args);
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
}

It seems that the (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) is not available to the OnClientAppointmentMoveEnd event.

Please advise if I am simply "doing it wrong" or, if this is in fact, a bug.

Thanks.
Kevin Kembel
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
105 views
Hi

I have a little problem. I have a grid and I want to show a context menu when I click inside the grid, but if I click on a row of the grid, I want to show the context menu A and if I click in the grid, but not on a row, I want to show the context menu B. For doing that, I tried to make a context menu for when I click on a row and I created another context menu who target the entire grid. So, it okay when I don't click on a row, but when I do, two context menu appears and it's the wrong that stay. May someone help me with this ? Thanks.
David
Top achievements
Rank 1
 answered on 24 May 2011
5 answers
216 views
Hi,

I'm using a grid and I followed this demo to make a context menu wich allow to add, edit or delete a user. The problem is that I want that a confirm window appears when I click on the delete item. So, I used a WindowManger.RadConfirm(), wich call a JS function. There, I verified if the paramater is true or false. If true, so it mean the user click on okay and then, with a ajaxRequest, I call a function in the code-behind who delete the user. Everything will be just find, if it wasn't for just one thing : the grid isn't automatically update and the user stay in the list even after it is delete. I had to close my window and open it again to show my grid with the correct data. I tried to do a dataRebind, but it doesn't work. Can someone tell me what to do to refresh my grid. Thanks !!!    

David
David
Top achievements
Rank 1
 answered on 24 May 2011
5 answers
170 views
Hi,

I open  a traditional child window via javascript but I can't return data to my radeditor. I can successfully return to a textbox, but can't to the radeditor. I'm using window.opener.  


I am using master pages as well.

Thanks,


Mike
Rumen
Telerik team
 answered on 24 May 2011
5 answers
246 views
Hello!

I'm using the ViewState, I added paging to Radgrid. When I change page, ViewState is lost. What I can do to avoid this incident happen?

Greetings
Carlos Rodríguez
Carlos Rodriguez
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
200 views
i made this post in the asp.net forum and that might have been the wrong place so i'm adding it here too....

I'm trying to enable drag and drop from RadTreeView to RadEditor following the demo, but i also need to be able to insert text in HTML view. When i call $telerik.getBounds() on the return of editor.get_textArea(), the .x and .y are incorrect, something like 0,1. I am checking prior to this that they are indeed in html mode. This works fine for the alternative in design view and get_contentAreaElement(). Is there a way to get the bounds of the textArea, or just the entire control when in HTML view? ( i dont care if they are over the text box or the entire radEditor).

version 2011 q1 sp2
visual studio 2010 premium/c#
IE9 in standard and compatibility mode, IE8, firefox all do the same thing

function isMouseOverEditorCodeView(editor, events) {  
var textFrame= editor.get_textArea(); 
var textRect= $telerik.getBounds(textFrame); 
var mouseX = events.clientX;
var mouseY = events.clientY; 
if (mouseX < (textRect.x + textRect.width) && mouseX > textRect.x &&  
    mouseY < (textRect.y + xtRect.height) && mouseY > textRect.y) {  
return true;  
return false;  
}
Rumen
Telerik team
 answered on 24 May 2011
5 answers
268 views
Is there a way I can catch hold of the next 10 upcoming events for a user and display them in a listbox? The Recurrence rule poses a major roadblock here. Any light on this will be appreciated.

Sanjeev
Peter
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?