Hi - I've been searching for the way to do this and haven't found it yet.
I have a grid defined on my page in the normal fashion - with bound columns that allow editing:
<asp:DataGrid id="dgActivityGroup" runat="server" ForeColor="Black" GridLines="Vertical" CellPadding="3"
AutoGenerateColumns="False" BackColor="White" Width="704px" BorderWidth="1px" BorderStyle="Solid"
BorderColor="Silver" Font-Names="Arial">
<FooterStyle Font-Bold="True" ForeColor="#244272" BorderColor="#B3C5E1" BackColor="#E0EEFE"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#6699CC"></SelectedItemStyle>
<EditItemStyle BackColor="#6699CC"></EditItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#244272" BorderColor="#B3C5E1" BackColor="#E0EEFE"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="ItemIndex" ReadOnly="True" HeaderText="ItemIndex"></asp:BoundColumn>
<asp:BoundColumn DataField="ActivityGroup" HeaderText="Activity Group"></asp:BoundColumn>
<asp:BoundColumn DataField="Description" HeaderText="Description"></asp:BoundColumn>
<asp:BoundColumn DataField="ReportGroup" HeaderText="Report Group"></asp:BoundColumn>
<asp:BoundColumn DataField="TrendTotalGroup" HeaderText="Trend Total Group"></asp:BoundColumn>
<asp:BoundColumn DataField="UnitOfMeasure" HeaderText="Unit of Measure"></asp:BoundColumn>
<asp:BoundColumn DataField="SortOrder" HeaderText="Sort Order"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" HeaderText="Edit" CancelText="Cancel"
EditText="Edit"></asp:EditCommandColumn>
<asp:ButtonColumn Text="Delete" HeaderText="Delete" CommandName="Delete"></asp:ButtonColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black" BackColor="#999999"></PagerStyle>
</asp:DataGrid>
I also have an additional INPUT field on the page that tracks if someone is making changes to the data so I can pop up an "Are you sure" message.
<INPUT id="hdnPageChange" style="WIDTH: 40px; HEIGHT: 19px" type="hidden" size="1" value="false" name="hdnPageChange" runat="server">
In the older version of the Telerik controls that I was using with VisualStudio 2003, I used to prerender event to add client script as such:
private void dgActivityGroup_PreRender(object sender, System.EventArgs e)
{
if (dgActivityGroup.EditItemIndex > -1)
{
int currentIndex = int.Parse(dgActivityGroup.Items[dgActivityGroup.EditItemIndex].Cells[CELL_ITEM_INDEX].Text);
((LinkButton)dgActivityGroup.Items[dgActivityGroup.EditItemIndex].Cells[CELL_EDIT_LINK].Controls[0]).Attributes.Add("onclick", "checkScrollPos(); hdnPageChange.value = 'false'");
((LinkButton)dgActivityGroup.Items[dgActivityGroup.EditItemIndex].Cells[CELL_EDIT_LINK].Controls[2]).Attributes.Add("onclick", "checkScrollPos(); hdnPageChange.value = 'false'");
((LinkButton)dgActivityGroup.Items[dgActivityGroup.EditItemIndex].Cells[CELL_DELETE_LINK].Controls[0]).Enabled = false;
}
}
This code worked perfectly before - when the person clicked the Edit button - it would call the client code to set the hdnPageChange.value = false. But now in the new version of the controls, I get an error:
Unhandled exception at line 103, column 948 in http://localhost:5040/ActivityGroup.aspx
0x800a1391 - JavaScript runtime error: 'hdnPageChange' is undefined
But hdnPageChange definitely exists... even when I do a view source on the page I can see it. Any idea what I'm doing wrong? Is there a better way to solve the problem with the new version of the code?
Thanks!

hello,
I'm trying to reproduce this KendoUI example:
http://demos.telerik.com/aspnet-mvc/html5-dashboard-sample-app/Home/ProductsAndOrders
using programmatic client side data binding like this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/programmatic/defaultcs.aspx
Could you provide an example?
what I like of this kendoUI sample is the filtering style (excel style), 100% width and height container fill, Client-side Hierarchy Loading. I do not want to use KendoUI.
I know I could figure out how to have it working myself as I wish, but a working example would be very useful.
thank you
Hi - we've been experiencing a problem using rad controls where CSS styles (served up from Telerik.Web.UI.WebResource.axd) are intermittently not being served up or loaded on pages. This causes buttons to be present on the page but not visible.
They are being served up from a load balanced environment; I checked each of the servers individually and I'm not able to reproduce the issue. Do you have any suggestions as to what to investigate?
Pretty much as the title, I am trying to find a way to use a time span as the y axis. So the data is hh:mm:ss.
Is this possible?
Hi
When using form decorator with Internet Explorer 11 to decorate asp checkboxes, if I try to set the checked property using JavaScript;
var list = document.getElementById("<%=CheckBoxList1.ClientID%>");var chklist = list.getElementsByTagName("input");for (var i = 0; i < chklist.length; i++) { if (chklist[i].type === "checkbox") { chklist[i].checked = false; }}
the action gets executed but the checks remain on the boxes. If I take the decoration off it works as usual. This only happens on IE 11, it works fine on Firefox and Chrome as well as older versions of IE.
Is there a work around besides taking decoration off?
thanks
Hello,
I was looking this post above, and was near that i need.... but i need send return of clicked to function C# to show in ToolTip.
Can help?
http://www.telerik.com/forums/make-xaxis-labels-clickable-links-in-bar-chart#syNAWhndc0a7av9UEqqSng
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script>
function pageLoad() {
var chart = $find("<%=RadHtmlChart5_3.ClientID%>");
chart._chartObject.bind("axisLabelClick", chart_axisLabelClick);
}
function chart_axisLabelClick(e) {
//alert(e.value);
TestCodeBehind(e.value);
var oWnd = $find("<%= RadToolTip.ClientID %>");
oWnd.show();
}
function TestCodeBehind(valor) {
// __doPostBack('SetSessionVariable', valor);
document.getElementById('<%= RadToolTip.ClientID %>').innerHTML = '<%= CodeBehind() %>';
return false;
}
</script>
</telerik:RadCodeBlock>
protected string CodeBehind(string valor)
{
//string eventTarget = (this.Request["__EVENTTARGET"] == null) ? string.Empty : this.Request["__EVENTTARGET"];
//string eventArgument = (this.Request["__EVENTARGUMENT"] == null) ? string.Empty : this.Request["__EVENTARGUMENT"];
//if (eventTarget == "SetSessionVariable")
//{
// if (eventArgument == "1")
// {
// return "Aleluia";
// }
//}
if (Label1.Text == "1")
{
return "Aleluia";
}
else
{
return "Error";
}
}
<td>
<asp:Label ID="Label1" runat="server" Visible="true" Text=""></asp:Label>
<asp:Label ID="lbl" runat="server" Visible="true" Text=""></asp:Label>
<telerik:RadToolTip ID="RadToolTip" runat="server" TargetControlID="lbl"
Width="200px" RelativeTo="Element" Position="TopCenter" AutoCloseDelay="5000">
teste
</telerik:RadToolTip>
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart5_3" Width="350px" Visible="false" Skin="Silk" Height="300px" Transitions="true" OnDataBound="RadHtmlChart5_3_DataBound">
<PlotArea>
<Series>
<telerik:RadarLineSeries Name="Avaliação do Docente" DataFieldY="media_docente" MissingValues="Gap">
<Appearance>
<FillStyle BackgroundColor="#00adcc"></FillStyle>
</Appearance>
<LabelsAppearance Visible="false">
</LabelsAppearance>
<LineAppearance Width="2" />
<MarkersAppearance Visible="false"></MarkersAppearance>
</telerik:RadarLineSeries>
</Series>
<Series>
<telerik:RadarLineSeries Name="Media Geral da Questão" DataFieldY="media_geral" MissingValues="Gap">
<Appearance>
<FillStyle BackgroundColor="Red"></FillStyle>
</Appearance>
<LabelsAppearance Visible="false">
</LabelsAppearance>
<LineAppearance Width="2" />
<MarkersAppearance Visible="false"></MarkersAppearance>
</telerik:RadarLineSeries>
</Series>
<XAxis DataLabelsField="nr_pergunta" Color="Black" Reversed="true" StartAngle="90">
<MinorGridLines Visible="true"></MinorGridLines>
<MajorGridLines Visible="true" Color="#EFEFEF" Width="1"></MajorGridLines>
</XAxis>
<YAxis MinValue="0" MaxValue="100" Step="25" Visible="true" Color="Black" MajorTickType="Outside" Reversed="true">
<MinorGridLines Visible="true"></MinorGridLines>
<MajorGridLines Visible="true" Color="#EFEFEF" Width="1"></MajorGridLines>
</YAxis>
</PlotArea>
<ChartTitle Text="">
<Appearance Align="Center" BackgroundColor="White" Position="Top">
</Appearance>
</ChartTitle>
<Legend>
<Appearance Visible="true" Position="Bottom" BackgroundColor="White">
</Appearance>
</Legend>
</telerik:RadHtmlChart>
<asp:ObjectDataSource ID="odsTab5_3" runat="server" OnSelecting="odsTab5_3_Selecting" SelectMethod="listRadarDocente"
TypeName="T_Quest.Data.F_Resposta_Questao_Docente_Vertical">
<SelectParameters>
<asp:Parameter Name="IdEdicao" Type="Int32" />
<asp:Parameter Name="IdDocente" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</td>
​​​
Hello
I am trying to set different colors for specific days (only using MonthView) in the Scheduler based on some variables.
I am handling the TimeSlotCreated event:
Protected Sub calendar_TimeSlotCreated(sender As Object, e As TimeSlotCreatedEventArgs) Handles calendar.TimeSlotCreated If ScheduleDates.Contains(e.TimeSlot.Start) Then e.TimeSlot.CssClass = "lightSalmon" End IfEnd SubI have another user control which is a dropdownlist of employees. When the dropdownlist fires the changed event, I populate a variable stored in ViewState with the dates that the employee is working. As I understand, the TimeSlotCreated event fires after the Page Load event, but before my other user control event fires. I need to change the colors of the days after my user control fires. I implemented a not-so-great solution, by calling the RadAjaxPanel to reload after the user control event fires.
Private Sub DDLEmployee_Changed(sender As Object, e As EventArgs) Handles DDLEmployee.EmployeeChanged PopulateSchedule() RadAjaxPanel1.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel1.ClientID))End Sub
The problem is that the RadAjaxPanel load fires twice so it looks like it's flickering. Is there any way to change the colors of days after any other events have fired?
Hi,
i have 4 radcombobox on my pages.when i change any of the combobox value (selectedindexchanges event) it is firing other combobx selectedindexchanged events.so all the combobox values is reseting to their defaults.i am using telerik controls 2015 (v2).This behavir is occurs only on this version.
when i used old versions it is function correctly help me on this.
/Bharath

Hello,
I'm having a bit of an issue with combining a TabStrip, RadPageView and RadGrid elements all on the same AJAX page.
While the tabs change properly when they are clicked, the RadGrid elements are only shown in read-only mode and are not editable.
Here is my code for the TabStrip and RadPageView:
01.<telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="RadMultiPage1" SelectedIndex="0" Skin="Silk" Align="Center" AutoPostBack="true">02. <Tabs>03. <telerik:RadTab Text="Edit Job Sites" Width="200px" PageViewID="RadPageViewEditJobSites"></telerik:RadTab>04. <telerik:RadTab Text="Edit Users" Width="200px" PageViewID="RadPageViewEditUsers"></telerik:RadTab>05. <telerik:RadTab Text="Edit Schedule Colors" Width="200px" PageViewID="RadPageViewEditColors"></telerik:RadTab>06. </Tabs>07.</telerik:RadTabStrip>08.<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" CssClass="outerMultiPage" RenderSelectedPageOnly="True">09. <telerik:RadPageView runat="server" ID="RadPageViewEditJobSites">10. <uc:PageViewEditJobSites runat="server" ID="PageViewEditJobSites" />11. </telerik:RadPageView>12. <telerik:RadPageView runat="server" ID="RadPageViewEditUsers">13. <uc:PageViewEditUsers runat="server" ID="PageViewEditUsers" />14. </telerik:RadPageView>15. <telerik:RadPageView runat="server" ID="RadPageViewEditColors">16. <uc:PageViewEditScheduleColors runat="server" ID="PageViewEditScheduleColors" />17. </telerik:RadPageView>18.</telerik:RadMultiPage>19.<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">20.</telerik:RadAjaxLoadingPanel>21.<telerik:RadAjaxManager ID="RadAjaxManager2" runat="server">22. <AjaxSettings>23. <telerik:AjaxSetting AjaxControlID="RadTabStrip1">24. <UpdatedControls>25. <telerik:AjaxUpdatedControl ControlID="RadTabStrip1"></telerik:AjaxUpdatedControl>26. <telerik:AjaxUpdatedControl ControlID="RadMultiPage1"></telerik:AjaxUpdatedControl>27. </UpdatedControls>28. </telerik:AjaxSetting>29. <telerik:AjaxSetting AjaxControlID="RadMultiPage1">30. <UpdatedControls>31. <telerik:AjaxUpdatedControl ControlID="RadMultiPage1"></telerik:AjaxUpdatedControl>32. </UpdatedControls>33. </telerik:AjaxSetting>34. </AjaxSettings>35.</telerik:RadAjaxManager>Here is the code for one of the control elements:
01.<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False">02. <ContentTemplate>03. <telerik:RadGrid ID="grdJobsites" runat="server" AllowPaging="True" PageSize="25" Width="99.7%" AllowSorting="true" DataSourceID="sdsJobsites"04. Skin="Web20" Height="245px" AllowAutomaticUpdates="True" AllowAutomaticEdits="True" AllowAutomaticInserts="true" EnableAJAXLoadingTemplate="true" EnableAJAX="True">05. <PagerStyle Mode="NumericPages" />06. <ClientSettings EnableRowHoverStyle="true">07. <Selecting AllowRowSelect="true" />08. <Scrolling AllowScroll="true" UseStaticHeaders="true" />09. </ClientSettings>10. 11. <MasterTableView AutoGenerateColumns="False" DataKeyNames="LocationRID" ClientDataKeyNames="LocationRID" TableLayout="Fixed" DataSourceID="sdsJobsites" CommandItemDisplay="Top" EditMode="InPlace">12. <CommandItemSettings ShowExportToExcelButton="false" ShowAddNewRecordButton="true" AddNewRecordText="Add New Jobsite"13. ShowExportToPdfButton="False" ShowRefreshButton="false"></CommandItemSettings>14. <Columns>15. 16. <telerik:GridEditCommandColumn UniqueName="edit" ButtonType="ImageButton" HeaderText="Edit" HeaderStyle-Width="40px" />17. 18. <telerik:GridBoundColumn DataField="LocationRID" HeaderText="LocationRID" Visible="false" SortExpression="LocationRID" UniqueName="LocationRID" />19. <telerik:GridBoundColumn DataField="LocationCode" HeaderText="Code" SortExpression="LocationCode" UniqueName="LocationCode" HeaderStyle-Width="40px" ColumnEditorID="TextBoxCode" />20. <telerik:GridBoundColumn DataField="LocationName" HeaderText="Name" SortExpression="LocationName" ColumnEditorID="TextBoxEditor" UniqueName="LocationName" ItemStyle-Wrap="True" HeaderStyle-Width="25%" />21. <telerik:GridBoundColumn DataField="LocationDetails" HeaderText="Details" SortExpression="LocationDetails" ColumnEditorID="TextBoxEditor" UniqueName="LocationDetails" ItemStyle-Wrap="True" HeaderStyle-Width="25%" Display="false" />22. <telerik:GridBoundColumn DataField="LocationAddress" HeaderText="Address" SortExpression="LocationAddress" ColumnEditorID="TextBoxEditor" UniqueName="LocationAddress" ItemStyle-Wrap="True" HeaderStyle-Width="35%" />23. <telerik:GridBoundColumn DataField="State" HeaderText="ST" SortExpression="State" UniqueName="State" ColumnEditorID="TextBoxshort" HeaderStyle-Width="20px" />24. <telerik:GridBoundColumn DataField="initMapZoom" HeaderText="Zoom" SortExpression="initMapZoom" ColumnEditorID="TextBoxshort" UniqueName="initMapZoom" ItemStyle-Wrap="false" HeaderStyle-Width="25px" />25. <telerik:GridBoundColumn DataField="OrderByValue" HeaderText="Order" SortExpression="OrderByValue" ColumnEditorID="TextBoxshort" UniqueName="OrderByValue" ItemStyle-Wrap="True" HeaderStyle-Width="25px" />26. 27. <telerik:GridCheckBoxColumn DataField="isActive" HeaderText="Visible" SortExpression="isActive" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center"28. HeaderStyle-HorizontalAlign="Center" UniqueName="isActive" EditFormColumnIndex="1" />29. </Columns>30. </MasterTableView>31. </telerik:RadGrid>32. 33. <div style="text-align: right; vertical-align: middle;">34. 35. <asp:ImageButton ID="JobSiteCloseBtn" runat="server" Text="Cancel" OnClientClick="cancelAndClose(); return false;" ImageUrl="~/IconImages/CloseBtn.jpg" />36. </div>37. 38. <telerik:GridTextBoxColumnEditor runat="server" ID="TextBoxEditor" TextBoxStyle-Width="100%" TextBoxMode="MultiLine" TextBoxStyle-Height="58px" TextBoxMaxLength="500" />39. <telerik:GridTextBoxColumnEditor runat="server" ID="TextBoxShort" TextBoxStyle-Width="30px" TextBoxMode="SingleLine" TextBoxMaxLength="2" />40. <telerik:GridTextBoxColumnEditor runat="server" ID="TextBoxCode" TextBoxStyle-Width="40px" TextBoxMode="SingleLine" TextBoxMaxLength="50" />41. 42. <asp:SqlDataSource ID="sdsJobsites" runat="server" ConnectionString="<%$ ConnectionStrings:dbConnection %>"43. SelectCommand="select * from DeliveryMap_Jobsite order by [OrderByValue] " SelectCommandType="Text"44. UpdateCommand="update DeliveryMap_Jobsite set LocationCode=@LocationCode, LocationName = @LocationName, LocationDetails=@LocationDetails, isActive=@isActive, LocationAddress = @LocationAddress, [state]=@state,initMapZoom=@initMapZoom ,OrderByValue=@OrderByValue where LocationRID = @LocationRID" UpdateCommandType="Text"45. InsertCommand="insert into DeliveryMap_Jobsite (LocationCode, LocationName, LocationDetails, LocationAddress, State, initMapZoom, OrderByValue, isActive) values (@LocationCode, @LocationName, @LocationDetails, @LocationAddress, @State,@initMapZoom,@OrderByValue, @isActive)" InsertCommandType="Text">46. 47. <UpdateParameters>48. <asp:Parameter Name="LocationCode" Type="String" />49. <asp:Parameter Name="LocationName" Type="String" />50. <asp:Parameter Name="LocationDetails" Type="String" />51. <asp:Parameter Name="LocationAddress" Type="String" />52. <asp:Parameter Name="LocationRID" Type="Int32" />53. <asp:Parameter Name="State" Type="String" />54. <asp:Parameter Name="initMapZoom" Type="Int32" />55. <asp:Parameter Name="OrderByValue" Type="Int32" />56. <asp:Parameter Name="isActive" Type="Int32" />57. </UpdateParameters>58. <InsertParameters>59. <asp:Parameter Name="LocationCode" Type="String" />60. <asp:Parameter Name="LocationName" Type="String" />61. <asp:Parameter Name="LocationDetails" Type="String" />62. <asp:Parameter Name="LocationAddress" Type="String" />63. <asp:Parameter Name="State" Type="String" />64. <asp:Parameter Name="initMapZoom" Type="Int32" />65. <asp:Parameter Name="OrderByValue" Type="Int32" />66. <asp:Parameter Name="isActive" Type="Int32" />67. 68. </InsertParameters>69. 70. </asp:SqlDataSource>71. </ContentTemplate>72.</asp:UpdatePanel>Any help is greatly appreciated.
Thanks,
Jake
I have a grid control which displays a list of requests.
In the grid I am only displaying the title and a few other columns.
I'd like to be able to click on the row and have a pop up window which shows detailed information about the request.
Is there built in functionality for RadGrid that allows me to do that? (as there is for Edit)?