hi,
I have a gantt chart, when i perform inline edit through an ajax call for the end date the date gets changed but the scheduler part remains the same. It gets changed only when a refresh of the page is done.
I want the scheduler to get changed when the end date is changed through ajax call without read event of the data source or a page refresh.
Can i get to know how this requirement can be achieved?
Thanks
Anagha
I am using RadGrid's RowDrop feature to allow my users to rearrange rows in the grid.
In the business logic, I use a table column to store a sort index for each row, and when I get a RowDrop event, I calculate the row's new index based on the target row, update the database and refresh the Datasource. This works really well for me as long as the row is dropped on or before the last visible row in the grid.
However, my users are confused when they drop a row past the end of the last visible row and the refreshed grid shows that dropped row preceding the last row, rather than it becoming the new last row.
How can I detect when the row is dropped in the empty space of the grid?
I found that GridDragDropEventArgs has a member "DropPosition" which appears to be undocumented; in any case, this value (enum Above or Below) does not appear to be consistent with what non-Telerik documentation I've seen, so it's not a reliable way to detect if the user dragged past the last row or not.
Any other ideas?
I've got a combobox that updates a grid, but the grid's NeedDataSource handler isn't invoked when the AJAX request happens. However, when I click the refresh button on the grid it issues another AJAX request and this one does invoke the NeedDataSource handler. Can anyone help me understand why this isn't happening in the former case?
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Groups.aspx.cs" Inherits="BuildDashBoard.Groups" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
<asp:Content ID="NavigationMenu" ContentPlaceHolderID="NavigationMenuContent" runat="server"></asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<div>
<telerik:radpanelbar ID="RadPanelBarConfigs" runat="server" Width="100%" AllowCollapseAllItems="True" PersistStateInCookie="True" CssClass="RadPanelBar_site">
<Items>
<telerik:RadPanelItem Text="Custom Groups" Expanded="True" Font-Bold="False" Font-Size="Medium" BackColor="#FFFF80" Enabled="true">
<ContentTemplate>
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboBoxCustomGroups2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridGroupMembers" LoadingPanelID="RadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<asp:SqlDataSource ID="SqlDataSourceCustomGroups" runat="server"
ConnectionString="<%$ ConnectionStrings:BuildServicesConnectionString %>"
SelectCommand="sp_GetAllEditableCustomGroups" SelectCommandType="StoredProcedure"
InsertCommand="sp_AddCustomGroup" InsertCommandType="StoredProcedure"
UpdateCommand="sp_DeleteCustomGroup" UpdateCommandType="StoredProcedure">
<InsertParameters>
<asp:Parameter Name="CustomGroupName" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="CustomGroupId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceCustomGroupBranchesSource" runat="server"
ConnectionString="<%$ ConnectionStrings:BuildServicesConnectionString %>"
SelectCommand="sp_GetBranchesNotInCustomGroup" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="RadComboBoxCustomGroups2" DefaultValue=""
Name="GroupId" PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Panel ID="CustomizeCustomGroupPanel" runat="server" GroupingText="Group members" Width="635px">
<div>
<div class="InlineTable">
<telerik:RadComboBox ID="RadComboBoxCustomGroups2" runat="server"
DataSourceID="SqlDataSourceCustomGroups" DataTextField="Group_Name"
DataValueField="Group_Id" CssClass="radcombobox" AutoPostBack="True" />
</div>
</div>
<br />
<div>
<div>
<telerik:RadGrid ID="RadGridGroupMembers" runat="server" CssClass="RadGrid_site" ClientSettings-Selecting-AllowRowSelect="true"
AutoGenerateColumns="false" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" OnNeedDataSource="RadGridGroupMembers_NeedDataSource"
OnUpdateCommand="RadGridGroupMembers_UpdateCommand" OnInsertCommand="RadGridGroupMembers_InsertCommand">
<MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="Branch_Id">
<Columns>
<telerik:GridEditCommandColumn />
<telerik:GridBoundColumn DataField="Branch_Id" HeaderText="Branch ID" UniqueName="Branch_Id" ReadOnly="true" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Branch Name" UniqueName="Branch_Name">
<EditItemTemplate>
<asp:DropDownList ID="ddl_branch_name" runat="server" DataValueField="Branch_Name" DataSourceId="SqlDataSourceCustomGroupBranchesSource">
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Literal runat="server" Text='<%# Eval("Branch_Name") %>'>
</asp:Literal>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridDateTimeColumn DataField="Expiration" HeaderText="Expiration" UniqueName="Expiration" ReadOnly="false">
</telerik:GridDateTimeColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:radpanelbar>
</div>
</asp:Content>
I have a datagrid that contains a column which has an editable drop down list.
I have filtering set to true, but when you place text in the filter box and click "Equal To" or whatever clause, it breaks/errors out
I get Unhandled Exception error. Its a messing popup window with a bunch of jargon.
Anything I need to alter to make this work with that EditTemplate piece in there?
Here is the code
<telerik:GridTemplateColumn HeaderText="ConfirmationType" ItemStyle-Width="240px" AllowFiltering="True" ShowSortIcon="True">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "ConfirmationType")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox RenderMode="Lightweight" runat="server" ID="RadComboBox1" DataTextField="ConfirmationType" DataValueField="ConfirmationType" DataSourceID="ConfirmationType" SelectedValue='<%#Bind("ConfirmationType") %>'>
</telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldAlias
=
"Bundle"
FieldName
=
"GroupName"
HeaderValueSeparator
=
"_"
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"GroupName"
SortOrder
=
"None"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
I am using this example
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Filtering/radgrid-filtered-by-radcombobox
I want to choose the data for the grid by selecting an item in a drop down list.
I want to initialise the grid from the code behind.
How do I do this? My grid is not refreshing at the moment.
This is the code for my aspx page
<div class="panel panel-primary">
<div class="panel-heading">
Your Notes
</div>
</div>
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanelN"></telerik:RadAjaxLoadingPanel>
<telerik:RadDropDownList runat="server" ID="RadDropDownStudents" DefaultMessage="Select a student" DropDownWidth="300px" Width="350px"
DataValueField="student_id" DataTextField="Studentname" OnItemSelected="RadDropDownStudents_ItemSelected"
OnSelectedIndexChanged="RadDropDownStudents_SelectedIndexChanged" AutoPostBack="true">
</telerik:RadDropDownList>
<telerik:RadGrid runat="server" ID="RadGridNotes" ShowFooter="false" Width="100%" enableajax="true" ShowStatusBar="true" OnItemCommand="Grid_RowSelect"
allowaddingrecords="false" AutoGenerateColumns="false" AllowSorting="false" allowpagesizeselection="False" OnItemDataBound="OnItemDataBoundHandler" Autobind="false"
AllowPaging="True" Skin="Bootstrap" PageSize="5" OnNeedDataSource="RadGridNotes_NeedDataSource" OnPreRender="RadGridNotes_PreRender" CssClass="table table-striped">
<MasterTableView AutoGenerateColumns="false" DataKeyNames="note_ref" TableLayout="Auto" EditMode="EditForms">
<Columns>
<telerik:GridButtonColumn CommandName="View" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" Text="View" UniqueName="View">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="note_ref" DataType="System.Int32" HeaderText="note_ref" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="note_ref" Display="false" runat="server" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="course" HeaderText="code" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="course" Display="false" runat="server" ItemStyle-Width="10px" HeaderStyle-Width="10px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="courseName" HeaderText="Subject" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="qualname" HeaderStyle-Width="200px" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NewNoteType" HeaderText="Type" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="noteType" Display="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="typeDesc" HeaderText="Note Type" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="typeDesc" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="created" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="created" DataFormatString="{0:dd/MM/yyyy}">
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="created_by" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="created_by" Display="false" ItemStyle-HorizontalAlign="Left">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="note_content" HeaderText="Created" HeaderStyle-BackColor="#428bca" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" UniqueName="note_content" Display="false" ItemStyle-HorizontalAlign="Center">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="View">
</EditColumn>
<FormTemplate>
<table style="width: 100%" border="0">
<tr>
<td><b>Details</b><br /><br />
<asp:Label ID="LabelDetails" runat="server" Text='<%# Bind("note_content") %>'></asp:Label>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
<PagerStyle Mode="NextPrev" Position="Bottom" PageSizeControlType="RadComboBox"></PagerStyle>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="True">
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowDblClick="RowDblClick" OnRowSelected="RowSelected" />
</ClientSettings>
Hi,
I am creating a multiple ComboBox. RadComboBox1 for region and the other RadComboBox2 for product. Both controllers have a checkbox option. Sample data as per below;
RadComboBox1;
A
B
C
RadComboBox2;
1
2
3
What do I need are, when user choose Region [A,C] and product [1,2,3], the result would be [A1,A2,A3,C1,C2,C3]. Please help.
Thanks.