Hi
I have the following:
(Global.Master) => MasterPage
(LoginValidationLayer.Master) => Nasted Master Page (To check login sessions...) from the above Master "Global.Master"
(CarsAndMachines.aspx) => Web form With Master Page from the Above Master "LoginValidationLayer.Master"
this form contents :
RadScriptManager (RadScriptManager1)
RadCodeBlock (RadCodeBlock1)
RadAjaxManager (RadAjaxManager1)
RadAjaxLoadingPanel (RadAjaxLoadingPanel1)
RadWindowManager (RadWindowManager1)
Panel (MainPanel)
The RadCodeBlock declared as following:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function ShowOpenJobForm(machineId, rowIndex, companyId) {
var grid = $find("<%= CarsAndMachinesGrid.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("EditOpenJobForm_csharp.aspx?MachineId=" + machineId + "&CompanyId=" + companyId, "OpenJobDialog");
return false;
}
</script>
</telerik:RadCodeBlock>
the RadAjaxManager declared as following :
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="MainPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="MainPanel" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
to ajaxfy the updates and show progress when updating grid.
the RadWindowManager declared as following:
<telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true">
</telerik:RadWindowManager>
the Panel contains RadGrid
Inside this Web form I have RadGrid that set to show RadWindow when I click on one of it's columns (OpenJobsColumn) it is a GridTemplateColumn that has HyperLink that has OpenJobLink Id (it is an ItemTemplate)
I have set the link of the HyperLink control in the ItemCreated event as following :
HyperLink openJobLink = (HyperLink)e.Item.FindControl("OpenJobLink");
if (openJobLink != null)
{
openJobLink .Attributes["href"] = "javascript:void(0);";
openJobLink .Attributes["onclick"] = String.Format("return ShowOpenJobForm('{0}','{1}','{2}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"], e.Item.ItemIndex, Request.QueryString["CompanyId"]);
}
now when I click on the HyperLink (OpenJobLink) it shows the RadWindow and everything is great until here
inside the RadWindow I'm showing a Web Form which contains: (EditOpenJobForm_csharp.aspx)
RadScriptManager (RadScriptManager1)
RadCodeBlock (RadCodeBlock1)
RadAjaxManager (RadAjaxManager1)
RadAjaxLoadingPanel (RadAjaxLoadingPanel1)
RadWindowManager (RadWindowManager1)
RadGrid (PartsGrid)
ScriptManager(ScriptManager1)
the RadCodeBlock declared as following:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function ShowEditForm(id, rowIndex) {
var grid = $find("<%= PartsGrid.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("EditOpenJobPartsForm_csharp.aspx?InvoiceId=" + id, "OpenJobPartsDialog");
return false;
}
function ShowInsertForm() {
window.radopen("EditOpenJobPartsForm_csharp.aspx?InvoiceId", "OpenJobPartsDialog");
return false;
}
function refreshGrid(arg) {
if (!arg) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
function RowDblClick(sender, eventArgs) {
window.radopen("EditOpenJobPartsForm_csharp.aspx?InvoiceId=" + eventArgs.getDataKeyValue("InvoiceId"), "OpenJobPartsDialog");
return false;
}
</script>
</telerik:RadCodeBlock>
the RadAjaxManager declared as following:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="PartsGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PartsGrid" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
in the ASPX I declared a script as following :
<script type="text/javascript">
function CloseAndRebind(args)
{
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().close();
}
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit()
{
GetRadWindow().close();
}
</script>
The RadGrid (PartsGrid) has a column for edit (GridTemplateColumn) declared as following:
<telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
<ItemTemplate>
<asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
</ItemTemplate>
</telerik:GridTemplateColumn>
and I set to show RadWindow to edit the selected record in the grid (PartsGrid) using ItemCreated event as following :
if (e.Item is GridDataItem)
{
HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
editLink.Attributes["href"] = "javascript:void(0);";
editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"], e.Item.ItemIndex);
}
and the AjaxRequest of RadAjaxManager is declared in code behind as following:
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
PartsGrid.MasterTableView.SortExpressions.Clear();
PartsGrid.MasterTableView.GroupByExpressions.Clear();
PartsGrid.Rebind();
}
else if (e.Argument == "RebindAndNavigate")
{
PartsGrid.MasterTableView.SortExpressions.Clear();
PartsGrid.MasterTableView.GroupByExpressions.Clear();
PartsGrid.MasterTableView.CurrentPageIndex = PartsGrid.MasterTableView.PageCount - 1;
PartsGrid.Rebind();
}
}
now when I click on Edit a RadWindow appears over the previous RadWindow and shows a DetailsView to update the selected record of PartsGrid
When I click on update this RadWindow it doesn't update the RadGrid while in database I can see the record updated and the updates doesn't appear until I do a full refresh (close the Previous RadWindow and open it again)
although in detailsview I set the following:
protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
if (e.CommandName == "Update")
{
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebindA();", true);
}
else if (e.CommandName == "Insert")
{
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebindA('navigateToInserted');", true);
}
else
{
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", true);
}
}
and it contains :
<script type="text/javascript">
function CloseAndRebindA(args)
{
var oWnd = GetRadWindowA();
var DialogB = oWnd.get_windowManager().getWindowByName("OpenJobDialog");
DialogB.refreshGrid(args);
window.close();
}
function alerto()
{
alert("this is a test");
}
function GetRadWindowA()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit()
{
GetRadWindow().close();
}
</script>
<asp:ScriptManager ID="ScriptManager3" runat="server" />
I need to update a RadGrid located in a RadWindow using a DetailsView in another RadWindw and apply the updates to appear directly
I'm not sure if it is about ajax or I don't know
Thank you.
I have a form with a few textboxes and a save button. I want RadSpellCheck to launch when the save button is clicked and then on the server execute the click event for the save button. I don't want a separate button for the spell check. When I run the page the RadSpellCheck dialog box appears and finds the misspellings but doesn't correct them when the form is submitted.
I appreciate any ideas you all have.
Here's the .aspx markup file:
<head runat="server"> <title></title> <telerik:RadScriptBlock ID="script1" runat="server"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> function check() { Page_ClientValidate(); if (Page_IsValid) { var spell = $find('<%= RadSpell1.ClientID %>'); spell.startSpellCheck(); return false; } } function RadSpell1_OnClientCheckFinished() { $("#<% =btnSaveReal.ClientID %>").trigger('click'); } </script> </telerik:RadScriptBlock></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <div> <asp:TextBox id="txt1" runat="server">My firzt client side TEXTAREA with some delibirate mistakees.</asp:TextBox> <br /> <asp:TextBox id="txt2" runat="server">My secont client side TEXTAREA with some delibirate mistakees.</asp:TextBox> <br /> <asp:Textbox id="txt3" runat="server">My thirdth client side TEXTAREA with some delibirate mistakees.</asp:Textbox> <br /> <asp:TextBox ID="txtTest" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="reqTest" ControlToValidate="txtTest" ErrorMessage="Required" runat="server"></asp:RequiredFieldValidator> <br /> <telerik:RadSpell RenderMode="Lightweight" ID="RadSpell1" runat="server" ControlsToCheck="txt1,txt2,txt3" OnClientCheckFinished="RadSpell1_OnClientCheckFinished" IsClientID="true" ButtonType="None"></telerik:RadSpell> <asp:Button ID="btnSave" Text="Save" OnClientClick="return check()" runat="server" /> <asp:Button ID="btnSaveReal" Text="Save" OnClick="btnSave_Click" style="display:none;" runat="server" /> <asp:Button ID="btnDelete" Text="Delete" OnClick="btnDelete_Click" runat="server" /> </div> </form></body></html>
Code Behind:
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Response.Write(txt1.Text);
}
}
protected void btnDelete_Click(object sender, EventArgs e)
{
Response.Write("Delete");
}
}

Hi,
please help.
<telerik:GridBoundColumn DataField="ID" HeaderStyle-Width="80px" HeaderText="ID"
UniqueName="ID">
</telerik:GridBoundColumn>
<telerik:GridNumericColumn DataField="Value" HeaderStyle-Width="80px" HeaderText="Value"
UniqueName="Value">
</telerik:GridNumericColumn>
<telerik:GridBoundColumn DataField="Formual" HeaderStyle-Width="80px" HeaderText="Formual"
UniqueName="Formual">
</telerik:GridBoundColumn> //formula example 1+2 . 1 and 2 are an ID and those get values from GridNumericColumn and set it to column "Value" where Column formula exist
Many Thanks
Please visit this demo URL and set theme to MetroTouch Theme and Render Modes to Classic
http://demos.telerik.com/aspnet-ajax/orgchart/examples/rendermodes/defaultcs.aspx
I guess it is UI issue of OrgChart - Render Modes Classic in MetroTouch Theme (UI for ASP.NET AJAX R1 2017 (version 2017.1.118))
I am using GroupByField in my GroupHeaderTemplate like this:
<telerik:RadGrid ID="grdBookingItems" runat="server"> <MasterTableView DataKeyNames="ID" ShowFooter="True" ClientDataKeyNames="ID" Font-Size="9"> <GroupHeaderTemplate> <table class="header-template-table" style="display: inline-block"> <tr> <td> <b><%#Eval("EventName") %></b> <%#Eval("ArticleName") %> (<%#Eval("ID") %> items.) </td> <td style="border: none"> <%#Eval("Price") %> </td> </tr> </table> </GroupHeaderTemplate> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="EventName" /> <telerik:GridGroupByField FieldName="ArticleName" /> <telerik:GridGroupByField FieldName="Price" Aggregate="Sum" /> <telerik:GridGroupByField FieldName="ID" Aggregate="Count" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="ArticleName" /> <telerik:GridGroupByField FieldName="EventName" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <RowIndicatorColumn Visible="False" FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn Visible="False" FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn Visible="True" DataField="ID" UniqueName="colID" HeaderText="ID"> <HeaderStyle Width="0" /> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="" UniqueName="checkCol" HeaderStyle-Width="50px"> <HeaderTemplate> <asp:CheckBox ID="chbMasterSelector" runat="server" Checked="True" AutoPostBack="True" OnCheckedChanged="grdBookingItems_masterCheckChanged" Text="" CssClass="sb-up-book" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="chbSelectRow" runat="server" Checked="true" AutoPostBack="True" CssClass="sb-up-book" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Move" UniqueName="colMove"> <ItemTemplate> <asp:Panel CssClass="popup-bookingcard-move-button" runat="server" ID="MoveButton" /> </ItemTemplate> <FooterTemplate> <asp:Panel CssClass="popup-bookingcard-move-button" runat="server" ID="MoveAllButton" ToolTip="Move selected booking"/> </FooterTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="Amount" Aggregate="Sum" FooterAggregateFormatString="{0:g}" FilterControlAltText="Filter column column" HeaderText="Num" UniqueName="colAmount" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right"> <HeaderStyle Width="36px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EventName" FilterControlAltText="Filter column2 column" HeaderText="Activity" UniqueName="colEventName"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StartTime" DataType="System.DateTime" FilterControlAltText="Filter column3 column" HeaderText="Start time" UniqueName="colEventDate" HeaderStyle-Width="112px" DataFormatString="{0:d} {0:t}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SectionName" HeaderText="Resource" UniqueName="colSectionName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ArticleName" FilterControlAltText="Filter column1 column" HeaderText="Article" UniqueName="colArticleName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Price" FilterControlAltText="Filter column3 column" Aggregate="Sum" FooterAggregateFormatString="{0:g}" HeaderText="Price" UniqueName="colPrice" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StatusText" FilterControlAltText="Filter column4 column" HeaderText="Status" UniqueName="colStatus" > </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Barcode" FilterControlAltText="Filter column4 column" HeaderText="Barcode" UniqueName="barCode" HeaderStyle-Width="72px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="NewTime" Visible="False" FilterControlAltText="Filter column4 column" HeaderText="Ny tid" UniqueName="newTime" HeaderStyle-Width="112px" DataFormatString="{0:d} {0:t}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Seatinformation" FilterControlAltText="Filter column1 column" HeaderText="Extra info" UniqueName="colSeatinformation"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"> </EditColumn> </EditFormSettings> <BatchEditingSettings EditType="Cell"></BatchEditingSettings> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> </MasterTableView> <ClientSettings> <ClientEvents OnRowContextMenu="rowContextMenu" OnRowCreated="grdBookingItems_rowCreated" /> </ClientSettings> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> <FilterMenu EnableImageSprites="False"> </FilterMenu></telerik:RadGrid>
expecting sum and count to become a summation and a count of the grouped items, but they become 0.
It will look like the attached screenshot.
Maybe this error has been introduced by upgrading the telerik components?
(We are now into version UI for ASP.NET AJAX R3 2016)
I have implemented grid drag and drop reordering of telerik grid in my application, similar to the demo given in
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/rows/drag-and-drop/defaultcs.aspx
This is working fine in chrome when the resolution is 100%. But if the resolution is changed to 90% or 110%, drag and drop is NOT working. There is NO issue in any other browser with any resolution.
The issue even exist in the demo given in the site mentioned above.
I work in an hosted forms auth environment where we are not allowed to store direct connection strings in the .config. As such I can't have the config section/provider information int he config either. I have been working with the scheduler for half day and figured of most of the crashes. I have configured my scheduler work with Webservice based on demo (all demos are strictly hardcoded to look for conn string from config).
Even after based on this article [using resourcepopulationmode in service and authentication], I was unable to get all the values from the forms ticket. I took a different step of implementing custom class with"ISchedulerInfo" with additional data. Even then I was unable to access basic properties I sent to the webserivce. I am trying to avoid binding a sql data source directly to the control.
Once again, the connection string is different based on the user.
Can someone please direct me in the correct direction.
I am going to do my best to explain my current issue.
I am currently have a hierarchy radgrid in batch edit mode. I am trying to update all child rows based on a value in the parent row. For instance, lest's say my parent row has a column: "Qty". My child row or nested row has two columns: "Percent", "NewQty". When I update my "Qty" it calculates and updates my "NewQty" for each nested/child row. The calculation would simply be "Qty" * "Percent". I currently have this working using the OnBatchEditValueChanged event using the code below:
var row = args.get_row();var editorValue = args.get_editorValue();var batchManager = sender.get_batchEditingManager();var dataItem = $find(row.id);if (dataItem.get_nestedViews().length > 0) { var nestedView = dataItem.get_nestedViews()[0]; var nestedDataItems = nestedView.get_dataItems(); for (var i = 0; i < nestedDataItems.length; i++) { var percent = batchManager.getCellValue(nestedDataItems[i].get_cell("Percent")); var newQtyId = nestedDataItems[i].get_cell("newQty"); var newQty = editorValue * percent; batchManager.changeCellValue(newQtyId, newQty); } }
This loops through my nested view and and updates each row and cell with the calculated value. This seems to work great, however if I change my "Qty" value back to it's original value, for instance if it was set to 100 then set to 200 then back to 100, it will only update the first nested/child row but not any row after that. It's like it doesn't allow you to edit those cells when the original value is changed back.
I'm not sure if this is a bug or the way it is supposed to be. Or if I am just doing it the wrong way. Any help on this would be great.
Thanks,
Tony
Hi
I have a problem with user control which contains RadGrid. When used on modal popup extender displayed over aspx page, everything works. But, when control containing RadGrid is shown on modal popup which is on top of another modal popup, grid rows are hidden.
Grid i populated with List<>, successfully bound (on button click). Header, footer, page slider, total rows and page number are shown as usual.
After inspection with developer tools, I found out that the rows are there (with TGridItemStyle class), but with inline CSS attribute display set to none. Also, header grid has margin-right set to 17px (I saw that some users had problem with that margin reserved for scroll bar). Changing display attribute to (in example) inline or block shows rows. Also, if I set ItemStyle in markup to some class which defines display as inline !important, rows will be shown. However, cells are not same size in all the rows.
I have tried setting visibility on client side (I have used set_visible(true) on RowCreated and RowDataBound events) and even tried to cancel RowHiding event, but nothing worked. Events are normally fired, properties were set, but the rows still weren't displayed.
And, of course, I have run out of ideas... So, does anyone have some hints, ideas or (ideally) solution to this behavior? Any help or suggestion is appreciated.
Thanks in advance.