testControl.ascx
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %><%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %><%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Control Language="C#" AutoEventWireup="true" CodeBehind="testControl.ascx.cs" Inherits="CSOM_RetrieveItemsInAList.ControlTemplates.testControl" %><%@ Register Assembly="Telerik.Web.UI, Version=2013.2.717.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"CellSpacing="0" GridLines="None" AllowFilteringByColumn="True" ShowGroupPanel="True" Skin="Outlook" PageSize="50" AutoGenerateColumns="False" onneeddatasource="RadGrid1_NeedDataSource"><GroupingSettings RetainGroupFootersVisibility="True"ShowUnGroupButton="false" /><GroupingSettings RetainGroupFootersVisibility="True"></GroupingSettings><ClientSettings Selecting-AllowRowSelect="true" AllowDragToGroup="True" EnablePostBackOnRowClick="true" ><Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting></ClientSettings><MasterTableView CommandItemDisplay="Top" ><CommandItemSettings ShowExportToExcelButton="True" ShowExportToWordButton="True" ShowExportToPdfButton="True" ShowExportToCsvButton="True" showaddnewrecordbutton="False"></CommandItemSettings> <Columns> <telerik:GridTemplateColumn > <ItemTemplate> <asp:LinkButton ID="linkbtnViewDetail" runat="server" OnClick="linkbtnViewDetail_Click" CausesValidation="false" AutoPostBack="True">View Details</asp:LinkButton> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn FilterControlAltText="EmpName" UniqueName="EmpName" DataField="EmpName" HeaderText="EmpName"> <ItemTemplate> <asp:Label ID="lblempName" runat="server" Text='<%#Eval("EmpName") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Flag" FilterControlAltText="Filter Flag column" HeaderText="Flag" UniqueName="Flag" Visible="False"> <ItemTemplate> <asp:Label ID="lblflag" runat="server" Text='<%#Eval("Flag") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Employee_x0020_ID" FilterControlAltText="Employee_x0020_ID" HeaderText="Employee ID" UniqueName="EmployeeID"> <ItemTemplate> <asp:Label ID="lblEmpID" runat="server" Text='<%#Eval("Employee_x0020_ID") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="ID" FilterControlAltText="ID" HeaderText="ID" UniqueName="ID" Visible="False"> <ItemTemplate> <asp:Label ID="lblitemID" runat="server" Text='<%#Eval("ID") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="LeaveRequestID" FilterControlAltText="LeaveRequestID" HeaderText="LeaveRequestID" UniqueName="LeaveRequestID" Visible="False"> <ItemTemplate> <asp:Label ID="LblLeaveReqId" runat="server" Text='<%#Eval("LeaveRequestID") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="WeekNumber" FilterControlAltText="Filter WeekNumber column" HeaderText="WeekNumber" UniqueName="WeekNumber" Visible="False"> <ItemTemplate> <asp:Label ID="lblWeekNo" runat="server" Text='<%#Eval("WeekNumber") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Status" FilterControlAltText="Filter Status column" HeaderText="Status" UniqueName="Status"> <ItemTemplate> <asp:Label ID="ll12" runat="server" Text='<%#Eval("Status") %>' ></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Title" FilterControlAltText="Filter Subject column" HeaderText="Subject" UniqueName="Subject"> <ItemTemplate> <asp:Label ID="ll8" runat="server" Text='<%#Eval("Title") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> </Columns></MasterTableView><PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle></telerik:RadGrid><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>using System;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Data;using Microsoft.SharePoint;namespace CSOM_RetrieveItemsInAList.ControlTemplates{ public partial class testControl : UserControl { protected void Page_Load(object sender, EventArgs e) { bindGrid(); } public void bindGrid() { SPSite site = new SPSite("http://pasha-pc:42916"); SPWeb web; DataTable dttask = new DataTable(); DataTable dtNewtask = new DataTable(); web = site.OpenWeb(); SPList list = web.Lists["Tasks1"]; dttask = list.Items.GetDataTable(); RadGrid1.DataSource = dttask; } }


Hello,
Our goal is to add AJAX to a page that has a somewhat complicated architecture. The basic structure is:
Master Page
Content Page
There are other controls on the page but they are out of scope, so to speak, of what the main issue is. For simplicity's sake they are not listed.
So, the Master Page holds the main RadAjaxManager and RadAjaxScriptManager, and the Content Page has the RadAjaxManagerProxy. Using the Proxy, I've been able to successfully AJAX the controls inside the Content Page, including the RadGrid and it opening the RadWindow after clicking a button in the row in the RadGrid.
However, we've hit a roadblock with trying to AJAXify the controls inside the RadWindow. At best, we can get it so that the Item Delete Button and ComboBox updating the Label work, but they cause the entire RadWindow to blink in and out or disappear/reappear. The buttons, which have to do with saving the data in the RadWindow to the database, adding an item to the RadListView, or deleting everything, are specifically the biggest problem. No attempt has made them work using AJAX. They always cause a full postback.
The complexity of the items in our RadListView may be an issue, though I'm not sure. Each item holds numerous controls that display or change the data of the object represented. I haven't found many examples of people using it this way, and fewer that try to AJAX them.
Any suggestions on what to try, or examples to look at, would be appreciated. Ideally, we would like all operations inside the RadWindow to be AJAX, and to have a seamless user experience -- no RadWindow blinking, and certainly not full postbacks.
Thanks for any help anyone can give!
Hi,
I need to perform numerous validation for a textbox depending upon combobox selection.
For Eg:
[combobox]
<telerik:RadComboBox ID="rcbSearch" runat="server" Skin="Office2007">
<Items>
<telerik:RadComboBoxItem runat="server" Text="SELECT" Value="SELECT" />
<telerik:RadComboBoxItem runat="server" Text="Check Number" Value="1" />
<telerik:RadComboBoxItem runat="server" Text="Customer Name" Value="2" />
<telerik:RadComboBoxItem runat="server" Text="File ID" Value="3" />
<telerik:RadComboBoxItem runat="server" Text="Address"
Value="4" />
<telerik:RadComboBoxItem runat="server" Text="City" Value="5" />
<telerik:RadComboBoxItem runat="server" Text="State" Value="6" />
<telerik:RadComboBoxItem runat="server" Text="Zip" Value="7" />
</Items>
</telerik:RadComboBox>
[textbox]
<telerik:RadTextBox ID="rtbSearch" runat="server" Skin="Office2007">
</telerik:RadTextBox>
Need to perform
1. Numberic validation when File ID is selected from combobox.
2. String validation when name or address is selected from combobox.
3. Validate length of checknumber, city, zipcode separately.
How it can be achieved?
Thanks