Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
925 views
I have a grid that when you click an item it brings up a popup window that allows the user to edit the data for the item in the grid.  I have a callback function on the base page that I want to refresh the grid when the user hits the "save" button on the popup.  I have tried just about everything I can think of to get the grid to refresh.  How can I force the grid to update/rebind from the JavaScript callback? 

For some back ground I did do an AjaxManager.AjaxRequest();  I am getting to the NeedDataSource event on the server, but the grid is not refreshing when the AjaxRequest is finished.  How do you get this to work with Prometheus RadGrid?

Thanks,
Kevin

Code behind:
        #region Event: RadAjaxMgr_AjaxRequest  
        /// <summary>  
        /// Ajax manager request event delegate handler.  
        /// </summary>  
        /// <param name="sender">Event sender.</param>  
        /// <param name="e">Event arguments.</param>   
        private void RadAjaxMgr_AjaxRequest(object sender, AjaxRequestEventArgs e) {  
            if (e.Arguement == "RefreshGrid")  
               gridItems.Rebind();                  //  Gets here no problem  
        }
        #endregion  
 

JavaScript:
var winMgrName = "ctl00_ContentPlaceHolder1_RadWindowManager1";  
var gridUniqueID = "ctl00$ContentPlaceHolder1$gridItems";  
var gridClientID = "ctl00_ContentPlaceHolder1_gridItems";  
var ajaxManagerClientID = "ctl00_RadAjaxManager1";  
var winEditOrder = "winEditDepartment";  
 
//  Popup department editor page/window.  
function EditDepartment(deptID) {  
    OpenRadWindow(winMgrName, "EditDepartment.aspx?i=" + deptID, winEditOrder);  
}  
 
//  Callback handler from the window's OK button handler.  
function DepartmentChangeCallback() {  
    var ajaxMgr = $find(ajaxManagerClientID);  
    var gridItems = $find(gridClientID);  
      
    ajaxMgr.AjaxRequest("RefreshGrid");  
}  
 
David Simmonds
Top achievements
Rank 1
 answered on 26 May 2010
5 answers
177 views
Hi,

i use FileExplorer with Sharepoint 2007 and i want to display only the documents library and i have 5 Documents Library.

I think i must change my content provider but How ? and if its possible ?

Thanks for your answers.

Best Regards.
Tomas
Top achievements
Rank 1
 answered on 25 May 2010
3 answers
136 views

Hi,

I deployed an old application (Which was probably using the older version of Telerik controls) on my system and was able to run it. After adding a few features, I noticed it was throwing the following error whenever i tried opening any of the Telerik charts. I tried reverting the changes and then debugging it but it doesnt solve the issue. It still throws me the error when i open a chart.

Can Someone please tell me what might the issue be?


 Compiler Error Message: CS0433: The type 'Telerik.Charting.ChartSeriesType' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Charting\2.0.5.0__d14f3dcc8e3e8763\Telerik.Charting.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4ae23f82\69cb7c0a\assembly\dl3\f587864b\0cd3bbc5_8e88c901\Telerik.Charting.DLL'




Source Error:

Line 240:     <asp:Panel ID="pnlChart" runat="server" Visible="false">
Line 241:   <tr><td>
Line 242:    <telerik:RadChart ID="RadChart2" runat="server" DefaultType="Pie" Width="710px">
Line 243:</telerik:RadChart>
Line 244:    </td></tr>



Thanks,
Ketan
Jeff
Top achievements
Rank 1
 answered on 25 May 2010
2 answers
177 views
I am using RadWindowManager because I need to use radopen's "open from URL" capability. However, I am not using RadWindowManager's dialogs.  Is there a way for me to have the RadWindowManager not output the following code?  The RadWindowManager is on my master because because it is used in the header of my application, so this is a lot of unneeded HTML that gets put on every page. Thanks.

        
<div id="ctl00_StandardWindowManager" style="z-index:7001;display:none;">
<!-- 2010.1.415.40 --><div id="ctl00_StandardWindowManager_alerttemplate" style="display:none;">
<div class="rwDialogPopup radalert">
<div class="rwDialogText">
{1}
</div>

<div>
<a onclick="$find('{0}').close();"
class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan">
<span class="rwInnerSpan">##LOC[OK]##</span>

					</span>
				</a>				
			</div>
		</div>
		</div><div id="ctl00_StandardWindowManager_prompttemplate" style="display:none;">
		 <div class="rwDialogPopup radprompt">			
			    <div class="rwDialogText">
			    {1}				
			    </div>		
			    <div>
				    <script type="text/javascript">
				    function RadWindowprompt_detectenter(id, ev, input)
				    {							
					    if (!ev) ev = window.event;                
					    if (ev.keyCode == 13)
					    {															        
					        var but = input.parentNode.parentNode.getElementsByTagName("A")[0];					        
					        if (but)
						    {							
							    if (but.click) but.click();
							    else if (but.onclick)
							    {
							        but.focus(); var click = but.onclick; but.onclick = null; if (click) click.call(but);							 
							    }
						    }
					       return false;
					    } 
					    else return true;
				    }	 
				    </script>
				    <input  onkeydown="return RadWindowprompt_detectenter('{0}', event, this);" type="text"  class="rwDialogInput" value="{2}" />
			    </div>
			    <div>
				    <a onclick="$find('{0}').close(this.parentNode.parentNode.getElementsByTagName('input')[0].value);"				
					    class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
				    <a onclick="$find('{0}').close(null);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
			    </div>
		    </div>				       
		</div><div id="ctl00_StandardWindowManager_confirmtemplate" style="display:none;">
		<div class="rwDialogPopup radconfirm">			
			<div class="rwDialogText">
			{1}				
			</div>						
			<div>
				<a onclick="$find('{0}').close(true);"  class="rwPopupButton" href="javascript:void(0);" ><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
				<a onclick="$find('{0}').close(false);" class="rwPopupButton"  href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
			</div>
		</div>		
		</div><input id="ctl00_StandardWindowManager_ClientState" name="ctl00_StandardWindowManager_ClientState" type="hidden" />
</div>

Cory Benjamin
Top achievements
Rank 2
 answered on 25 May 2010
2 answers
68 views
On clicking Add New Record, grid show the last page always.

My code excerpt for the gridview is like below:

<

telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="LinqDataSource2" Skin="Office2007" 
ShowStatusBar="True" Width="100%" AutoGenerateColumns="False" AllowSorting="True"  
AllowAutomaticDeletes="true" AllowPaging="true" GridLines="None" AllowAutomaticInserts="false"
AllowAutomaticUpdates="True" OnItemInserted="RadGrid2_ItemInserted" OnItemUpdated="RadGrid2_ItemUpdated"
OnItemDeleted="RadGrid2_ItemDeleted" OnInsertCommand="RadGrid2_InsertCommand"
OnUpdateCommand="RadGrid2_UpdateCommand" OnDeleteCommand="RadGrid2_DeleteCommand"
OnItemDataBound="RadGrid2_ItemDataBound" OnItemCommand="RadGrid2_ItemCommand"
OnSortCommand="RadGrid2_SortCommand" OnCancelCommand="RadGrid2_CancelCommand"
OnEditCommand="RadGrid2_EditCommand" BorderColor="#bbd9ee" OnPageIndexChanged="RadGrid2_PageIndexChanged">
<HeaderContextMenu EnableTheming="True" Skin="Office2007">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
<MasterTableView DataKeyNames="ExerciseID" DataSourceID="LinqDataSource2" Width="100%"
CommandItemDisplay="Top">
<CommandItemSettings AddNewRecordImageUrl="images/AddNew.gif" AddNewRecordText="Add New Exercise" />
<CommandItemStyle CssClass="green_heading_underline" />
.....
.....

Code for ItemCommand is like below:
protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e)
{
if ((e.CommandName == "ExpandCollapse") || (e.CommandName == "InitInsert"))
{
UpdatePanel2.Update();
}
}

Can anybody help?

 

 

 

PatD
Top achievements
Rank 1
 answered on 25 May 2010
1 answer
170 views
Hi,
I have required field validator in a form to save the data.It works fine. In the same form, I have a radgrid,when I edit and click the update button in radgrid, it doesn't allow me to update the data.How can I set causeValidation property to false for radgrid.Pls help me in this issue.
Kevin
Top achievements
Rank 1
 answered on 25 May 2010
3 answers
303 views
hi
I have radcombobox.
now when my page loads some values are selected in the combobox.
now i m checking client side that if  something is selected in the combobox then i disable a radtextbox and if nothing is selected then i enable the same.

now i have added a custom validator on another combobox which is dependent on the first combobox.
if first combobox is not selected then no validation and if the first combobox have selected value and second combo have not any selected value then i show error.

i used
function validate(sender,args)
{
args>IsValid=true;
cmb1=$find("<%= cmb1ID.ClientID%>");

cmb2=$find("<%= cmb2ID.ClientID%>");

if(cmb1.get_selectedIndex()>0 && cmb2.get_selectedIndex()<0) // I have also used cmb1.get_value() and cmb1.get_selectedItem()
{
args.IsValid=false;
return
}

and the first item in my combobox is null and second item is "Please Select" and the remaining items are there.
alnd aloow custom text is true.

please help me to validate the above problem
its urgent.
}
}

Kalina
Telerik team
 answered on 25 May 2010
2 answers
214 views
Probably a stupid newbie question, but here goes.  I have a Panel Bar with 2 Panel Items.  Very simple controls.  Panel Item [0] has a radtextbox.  Panel Item [1] has a numeric textbox.

When I load the page, I disable the Panel Item [1].  I expand and select Panel [0].
When the page posts back, I Enable, Select, and Expand Panel Item [1]. 

Problem:  the numeric textbox is in Panel [1] is disabled after postback
Puzzle:  I added a Date Picker control to Panel [1].  It is not disabled after postback.

This seems like arbitrary behavior to me.  Anyone have an answer?




Nikolay Tsenkov
Telerik team
 answered on 25 May 2010
2 answers
160 views
Hi,

I am using radprompt feature. By default it is displaying '' [two quotes] in textbox. How can I remove this defualt quotes in the radprompt. Please anybody help me....

Regards,
Medac
Kevin
Top achievements
Rank 1
 answered on 25 May 2010
5 answers
167 views
Hi there,

I have a radcombobox which displays the items correctly with scrollbar when the items exceeds its height in firefox; However when I tried it in IE8 it doesn't display its scrollbar, the radcombobox is locked up with its preloaded top items.

By the way my Telerik.Web.UI version is 2009.1.402.35.

Hope I can get help and resolve this issue.


Regards,

Reynald.
Simon
Telerik team
 answered on 25 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?