project using RadClientDataSource to binding RadDropdownTree control using WebService WCF. Load data is ok.
This my code:
.aspx:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server"
AllowBatchOperations="True">
<ClientEvents OnCustomParameter="ParameterMap" OnDataParse="Parse" />
<DataSource>
<WebServiceDataSourceSettings BaseUrl="UserInfoService.svc/">
<Select Url="GetDonVis" DataType="JSON" RequestType="Post" ContentType="application/json; charset=utf-8" />
</WebServiceDataSourceSettings>
</DataSource>
<Schema>
<Model>
<telerik:ClientDataSourceModelField FieldName="MaDonVi" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="TenDonVi" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="ParentId" DataType="String" />
</Model>
</Schema>
</telerik:RadClientDataSource>
<telerik:RadDropDownTree RenderMode="Classic" EnableFiltering="true" ID="RadDropDownTree1" runat="server"
DropDownSettings-Height="220px" Width="100%" DropDownSettings-CloseDropDownOnSelection="true"
ClientDataSourceID="RadClientDataSource1" DataTextField="TenDonVi"
DataValueField="MaDonVi" DataFieldID="MaDonVi"
DataFieldParentID="ParentId" Skin="Office2007">
<CollapseAnimation Type="None" />
</telerik:RadDropDownTree>
WebService:
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
[OperationContract]
public CustomersResult GetDonVis()
{
//Doc data tu DB
SqlConnection sqlConnection = new SqlConnection();
try
{
sqlConnection.ConnectionString = "SERVER=localhost;Database=LongBien;UID=sa;PWD=abcde12345-;";
sqlConnection.Open();
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM tblDmDonVi;", sqlConnection);
DataTable dataTable = new DataTable("DonVi");
da.Fill(dataTable);
da.Dispose();
List<ServiceDonVi> result = new List<ServiceDonVi>();
foreach (DataRow dataRow in dataTable.Rows)
{
ServiceDonVi donVi = new ServiceDonVi();
donVi.MaDonVi = dataRow["MaDonVi"].ToString();
donVi.TenDonVi = dataRow["TenDonVi"].ToString();
if (dataRow["ParentId"] != DBNull.Value)
{
donVi.ParentId = dataRow["ParentId"].ToString();
}
result.Add(donVi);
}
dataTable.Dispose();
CustomersResult a = new CustomersResult();
a.Data = result;
a.Count = 100;
return a;
}
catch (Exception exception)
{
throw;
}
finally
{
sqlConnection.Close();
sqlConnection.Dispose();
}
}
But I has problem:
1. When addnew data item -> save data in database is ok. (Example: value selected = 5)
2. When edit this item, how to set selected item keep old value (value = 5) has save in database???
i am using TabStrip with RadMultiPage.
these tabs share the save asp:Button. i would like to know is it possible to trigger the validationgroup base on the current selected tab?
for example i have 3 tabs
Tab 1 - Validation group: "validateIntro"
Tab 2 - Validation group: "validateBody"
Tab 3 - Validation group: "validateFinal"
so when user is on tab 1 and click on the Next button, only validateIntro should fire, similarly when user is on tab 2 only validateBody should fire
hi.
i would like to check how do i enable the "Select" button when the validation fails?
my current mock up is as such
1.<telerik:RadAsyncUpload RenderMode="Lightweight" MultipleFileSelection="Disabled" MaxFileSize="500000" OnClientValidationFailed="validationFailed" AllowedFileExtensions="jpg,jpeg,png" MaxFileInputsCount="1" runat="server" ID="fileCourseImage" PostbackTriggers="btnSubmit">2.</telerik:RadAsyncUpload>
Hi,
I have a radgrid with EditMode​ = "Popup" and EditType = "WebUserControl"
I can set some parameters of the PopUp using javascript:
var popUp;function ShowPopUp(sender, args) { popUp = args.get_popUp(); popUp.style.height = "auto"; popUp.style.width = "680px"; popUp.style.left = ((window.innerWidth - 680) / 2).toString() + "px"; popUp.style.top = ((window.innerHeight - 515) / 2).toString() + "px";}But how can I modify the settings from the caption of the popup?
Settings like:
Height
FontSize
FontColor
BackColor
Thank you so much for attention! And sorry for my bad english!

In an existing vb.net 2010 web form that uses the radeditor, I want to know if I can make the radeditor invisibile and/or not usable for awhile when a particular webform page is displayed. I am asking that question since I want a user to work with a gridview control during the time the radeditor is not visible. I want to do this so I do not need to setup a new web form page just for the gridview control.
Thus can you tell me and/or show me how to make the radeditor invisible and most likely not usable at the same time. Also would you also then tell me how to make the radeditor visible and useable when I want to? There must be some properties that need to be set?
Hello,
We have a Rad grid with combination of Bound & Template columns in it.
For the first time when page gets loaded we are binding the Rad grid through server side Need Data Source handler.
In our case for page actions we are trying to bind the Rad grid from client side by calling Web Method via $.Ajax() function.
Everything works well w.r.t. Bound column but it seems Template column are not supported to bind data via client side.
We have tried many alternate ways to bind the template column at client side with no success.
Could someone please advise is there a workaround/better way to achieve the client side binding of Template column for Rad Grid?
<telerik:RadComboBox ID="MyRadCombo" runat="server" Skin="Office2007" MarkFirstMatch="True" Width="405px"> <Items> <telerik:RadComboBoxItem runat="server" Text="Action Date" Value="Action Date" /> <telerik:RadComboBoxItem runat="server" Text="Date Seized" Value="Date Seized" /> <telerik:RadComboBoxItem runat="server" Text="Date Soft" Value="Date Soft" /> <telerik:RadComboBoxItem runat="server" Text="Dispo Type" Value="Dispo Type" /> <telerik:RadComboBoxItem runat="server" Text="Dispo Kind" Value="Dispo Kind" /> </Items></telerik:RadComboBox>protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
MyRadCombo.Focus();
}

| protected void rgPeople_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem gridItem = e.Item as GridDataItem; |
| foreach (GridColumn column in rgPeople.MasterTableView.RenderColumns) |
| { |
| if (column is GridBoundColumn) |
| { |
| gridItem[column.UniqueName].ToolTip = gridItem.OwnerTableView.DataKeyValues[gridItem.ItemIndex]["pkEmployeeNumber"].ToString(); |
| } |
| } |
| } |
| } |
| <telerik:RadGrid ID="rgPeople" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" |
| GridLines="None" Skin="Simple" OnPreRender="rgPeople_PreRender" DataSourceID="sdsPeople" EnableLinqExpressions="False" |
| runat="server" OnItemCreated="rgPeople_ItemCreated"> |
| <MasterTableView AutoGenerateColumns="False" DataKeyNames="pkEmployeeNumber"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridHyperLinkColumn DataNavigateUrlFields="pkEmployeeNumber" SortExpression="firstName" |
| UniqueName="firstName" DataNavigateUrlFormatString="/people/profiles/?empno={0}" |
| HeaderText="First Name" DataTextField="firstName" DataType="System.String"> |
| </telerik:GridHyperLinkColumn> |
| <telerik:GridBoundColumn DataField="firstName" HeaderText="First Name" SortExpression="firstName" |
| UniqueName="firstNameSort" Display="false" DataType="System.String"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="lastName" HeaderText="Last Name" SortExpression="lastName" |
| UniqueName="lastName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="positionDescription" HeaderText="Title" SortExpression="positionDescription" |
| UniqueName="positionDescription"> |
| </telerik:GridBoundColumn> |
| <intra:FilteringColumnPeople DataField="directorate" FilterControlWidth="180px" HeaderText="Directorate"> |
| <headerstyle width="15%" /> |
| <itemtemplate> |
| <%# Eval("directorate")%> |
| </itemtemplate> |
| </intra:FilteringColumnPeople> |
| <telerik:GridBoundColumn DataField="phone" HeaderText="Phone" SortExpression="phone" |
| UniqueName="phone"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="email" HeaderText="Email" SortExpression="email" |
| UniqueName="email"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="pkEmployeeNumber" HeaderText="pkEmployeeNumber" SortExpression="pkEmployeeNumber" |
| UniqueName="pkEmployeeNumber" Display="false"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
