Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
I have a RadGrid that loads from a DataTable pulled from my database.  The user can click a "Refresh" button on the page that will update the database behind the scenes, then update various labels on the page as well as the RadGrid from the new database entries, all through RadAjax.  The labels correctly update, but the problem comes when I call RadGrid1.Rebind();

The "Refresh" click code sets two global variables in the codebehind and then uses those values in updating the page.  Then Rebind() gets called at the end of the function, and in the process, processes each row of the grid.  One column in each row calls a function that uses one of the global variabes set earlier to genereate an image URL.  However, even though the same global variable was accessible in the Callback code, in the Rebind code it is suddenly NULL.  I get a Javascript error and the RadGrid doesn't get updated.

Summary: How do I set variables in my RadAjax callback function that will be accessable by the functions Rebind calls when repopulating my RadGrid?

Thanks in advance for your help.
Veli
Telerik team
 answered on 07 Oct 2011
1 answer
154 views
i have a grid with editmode="inPlace" for textboxes.i m not able to perform javascript validation on update and insert.can u share a sample code for the same validation.here i m attaching screen shot of grid
Iana Tsolova
Telerik team
 answered on 07 Oct 2011
2 answers
78 views
Hi All,

Sorting does not work in my radgrid when I paginate it. If I keep AllowPaging=false, then columns are properly sorted. I tried to sort it using sort expression as well as code-behind but same issue. I also referred to official example given online, but it did not help.

Please guide if I am missing something. Thanks in advance!!!

Dhaval
Dhaval
Top achievements
Rank 1
 answered on 07 Oct 2011
1 answer
85 views

Hi I started with your

Grid / User Control Edit Form

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultvb.aspx

I have altered it with comboboxes for form values to add or alter, they show up fine. but when I hit insert or update, the values are not nothing.

from user control
combo
<telerik:RadComboBox ID="rcbclient" runat="server" DataMember="id" DataTextField="client_name"
                             AutoPostBack="true" AllowCustomText="true" Width="275px">
                        </telerik:RadComboBox>
  
databind
rcbclient.DataSource = getClients()
        rcbclient.DataBind()
  
from Default.vb
 Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim userControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
  
        'Prepare new row to add it in the DataSource
        Dim newRow As DataRow = Me.Staging.NewRow
  
        'Insert new values
        Dim newValues As Hashtable = New Hashtable
        newValues("id") = CType(userControl.FindControl("rcbclient"), RadComboBox).SelectedItem.Value
        newValues("client_id") = CType(userControl.FindControl("rcbclient"), RadComboBox).DataMember
        newValues("client_name") = CType(userControl.FindControl("rcbclient"), RadComboBox).SelectedValue.ToString


thank you.
regina
Top achievements
Rank 1
 answered on 06 Oct 2011
4 answers
125 views
Hi,
I've just downloaded the latest version (DEMO) of Telerik ASP.NET AJAX controls.
I wanted to check if there is the option to use UpdatePanel or RadAjaxPanel to submit the content from the editor in AJAX postback.

Generally it is possible. But it doesn't work in my Firefox. I have Firefox 6.0.2 and each button in my example makes classic postback.
I did it on the basis of that page.

Here you have my code. All the 4 clicks make classic postback in FF. I need to use AJAX and it should work in the latest FF, IE (7,8,9), the latest Chrome, and the latest Safari.

<form id="form1" runat="server">
   <asp:ScriptManager ID="ScriptManager1" runat="server" />
   <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
       <asp:Panel ID="pnlRadEditor" runat="server">
           <div>
               Standard Button:  <asp:Button ID="btnSave" UseSubmitBehavior="false" runat="server"
                   OnClick="btnSave_Click" Text="Save" /></div>
           <div style="margin-top: 10px;">
               Image Button: <asp:ImageButton ID="ImageButton1" runat="server" OnClientClick="javascript:__doPostBack(this.id,'');return false;"
                   OnClick="btnSave_Click" ImageUrl="http://www.telerik.com/DEMOS/ASPNET/RadControls/Editor/Skins/Default/buttons/save.gif" /></div>
           <div style="margin-top: 10px;">
               <telerik:RadEditor ID="RadEditor1" runat="server" EnableViewState="false">
               </telerik:RadEditor>
           </div>
       </asp:Panel>
   </telerik:RadAjaxPanel>
   <div>
       Standard Button:  <asp:Button UseSubmitBehavior="false" ID="Button1" runat="server"
           OnClick="btnSave_Click" Text="Save" /></div>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <Triggers>
           <asp:AsyncPostBackTrigger ControlID="Button1" />
       </Triggers>
       <ContentTemplate>
           <div style="margin-top: 10px;">
               Image Button: <asp:ImageButton ID="ImageButton2" runat="server" OnClientClick="javascript:__doPostBack(this.id,'');return false;"
                   OnClick="btnSave_Click" ImageUrl="http://www.telerik.com/DEMOS/ASPNET/RadControls/Editor/Skins/Default/buttons/save.gif" /></div>
           <div style="margin-top: 10px;">
               <telerik:RadEditor ID="RadEditor2" runat="server" EnableViewState="false">
               </telerik:RadEditor>
           </div>
       </ContentTemplate>
   </asp:UpdatePanel>
   </form>

Regards,
Dawid Niedzwiedz
Dawid Niedzwiedz
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
125 views
Hi,

I have a asp gridview on the parent page and there is a button outside of the grid. On button click, radwindow popup appears. When the user closes the popup, it invokes the RadajaxManager's ajaxrequest on the parent page. The code steps into the _ajaxrequest and does gridview.databind. I can see that the number of rows are correct in the grid but when the process is complete, the grid does not refresh. I tried by replacing the asp gridview with Radgrid but still had no success.
I am pasting my code here. Please let me know if I need to give more information.

Any help is greatly appreciated..

btnDelegate lauches the radwindow.
function 
  
openRadWindow(args) { 
var EmpID = $find("<%=cboEmployee.ClientID %>")._value; 
window.radopen("AdminDelegationPopup.aspx?EmpID=" + EmpID + "&Type=" + args, "RadWindow1"); }
  
   
  
   
  
function refreshGrid(arg) {  
if (arg == 'Delegation') { 
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Delegation"); // Invoking ajaxRequest }
  
   
  
}

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
  
 <AjaxSettings> 
  
  <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
  
  <UpdatedControls> 
  
  <telerik:AjaxUpdatedControl ControlID="grdDelegatedRights" /> 
  
  <telerik:AjaxUpdatedControl ControlID="btnDelegate" /> 
  
  </UpdatedControls> 
  
 </telerik:AjaxSetting> 
  
<telerik:AjaxSetting AjaxControlID="grdDelegatedRights"> 
  
 <UpdatedControls> 
  
 <telerik:AjaxUpdatedControl ControlID="grdDelegatedRights" /> 
  
 </UpdatedControls> 
  
 </telerik:AjaxSetting> 
  
 <telerik:AjaxSetting AjaxControlID="btnDelegate"> 
  
 <UpdatedControls> 
  
 <telerik:AjaxUpdatedControl ControlID="grdDelegatedRights" /> 
  
 <telerik:AjaxUpdatedControl ControlID="btnDelegate" /> 
  
 </UpdatedControls> 
  
 </telerik:AjaxSetting> 
  
 </AjaxSettings> 
  
 </telerik:RadAjaxManager> 
  
 <asp:GridView ID="grdDelegatedRights" runat="server" AutoGenerateColumns="False" CellPadding="4" Font-Names="Tahoma,Verdana" Font-Size="10px" ForeColor="#333333" Width="825px" AllowPaging="True" DataKeyNames="EmpDelegationId">  
<Columns> 
  
 <asp:BoundField DataField = "EmpName" HeaderText = "Employee Name" /> 
  
<asp:BoundField DataField="EmpId" HeaderText="Employee Id" /> 
  
 <asp:BoundField DataField="FullName" HeaderText="Delegated Employee" /> 
  
 <asp:BoundField DataField="SecurityRole" HeaderText="Role" /> 
  
 <asp:BoundField DataField="DateDelegated" HeaderText="Date Delegated" /> 
  
 <asp:TemplateField ShowHeader="False"> 
  
 <ItemTemplate> 
  
 <asp:ImageButton ID="imgRemoveDelegation" runat="server" CausesValidation="False" 
  
 CommandName="Delete" ImageUrl="~/Images/document_delete_small.gif" OnClientClick="return confirm('Are you sure you want to remove the delegation?');"  ToolTip="Remove the delegated rights" /> 
  
</ItemTemplate> 
  
 <ItemStyle HorizontalAlign="Center" /> 
  
 </asp:TemplateField> 
  
 </Columns> 
  
 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> 
  
 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> 
  
 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> 
  
 <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> 
  
 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> 
  
 <EditRowStyle BackColor="#999999" /> 
  
 <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> 
  
 <PagerSettings Mode="NumericFirstLast" /> 
  
 </asp:GridView> 

 
AjaxRequest..I am able to step into the following code succesfully.

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) 
  
If e.Argument = "Delegation" Then 
  
 Dim oDelegation As New Delegation 
  
 Dim dsDelegatedRights As DataSetdsDelegatedRights = oDelegation.GetDelegatedRights(cboEmployee.SelectedValue)grdDelegatedRights.DataSource = dsDelegatedRights
  
grdDelegatedRights.DataBind()
End If 
End Sub

this is on the radwindow.

 

function
  
 CloseAndRebindGrid(args) { 
  
 GetRadWindow().Close();
  
GetRadWindow().BrowserWindow.refreshGrid(args);
  
}
Vijetha
Top achievements
Rank 1
 answered on 06 Oct 2011
7 answers
708 views
I like to use the Web20 skin for the popup calendar itself in a RadDatePicker, but I prefer the calendar popup icons from the other skins. I know I can change the icon with the DatePopupButton-ImageUrl property, but I don't know how to reference the icons that are now embedded. Of course with the old ASP.NET controls, I had a folder and a file to point at. How do I access that resource now?

Thanks!
Bevan
Top achievements
Rank 1
 answered on 06 Oct 2011
2 answers
111 views
Hi,

I am having a problem with the RadGrid and data binding from a web service.

The data is loaded in correctly but the styles are not set correctly for any items that appear after the items in the initial load.

For example, the Grid has 10 items when the page loads, all 10 items are displayed correctly, with Item height, CSS classes and Align working as they should.

However after the WebService update, all new items (any items above the first 10) will not be displayed correctly.

I've put together a simple project to demonstrate this problem, it seems to apply to all browsers.  I'll see if I can upload it here somehow.

Thanks

Mike

nb, I cant see to be able to upload the project file here, any suggestions on how I can get it to you?
Ben
Top achievements
Rank 1
 answered on 06 Oct 2011
4 answers
157 views
When the page is loaded initially the tab strip get cut off in IE8.  Once a postback or ajax request is made the full tabstrip is visible.  The tabs are created dynamically in the code behind.

 
<telerik:RadTabStrip runat="server" ID="rtsDocs" Width="100%" Orientation="HorizontalTop" CausesValidation="false" OnTabClick="rtsDocs_TabClick" />


The attached image has a view of the tabs in IE9 on the top and IE8 on the bottom.  You can see the scroll buttons of the tabs on the IE8 version on the far right, but you cannot see the missing tabs when performing a scroll.
Shonda
Top achievements
Rank 1
 answered on 06 Oct 2011
0 answers
174 views
Hello,

I am evaluating asp.net ajax and asp.net mvc for our present project requirement.

In the case of asp.net ajax I am getting an error while using RadPanel, here I am using 2011.Q2 version .dll

I have attached this project at:
Test Project link

My design works fine when I am not using RadPanel. After using RadPanel
I am dividing view into three region and placing inside RadPaneItem. After
that when i run the application I am getting an error.

assertion failed:
Length of elements and json must be the same!
 
Break into debugger?


Please help me,

Regards,
        Gautham
gautham
Top achievements
Rank 1
 asked on 06 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?