<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPAge.aspx.cs" Inherits="TestPAge" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.RadComboBox_Black
{
vertical-align:bottom;
}
.RadComboBox_Black
{
font:12px "segoe ui",arial,verdana,sans-serif;
color:#999;
}
.RadComboBox_Black
{
font:12px "segoe ui",arial,verdana,sans-serif;
color:#999;
}
.RadComboBox_Black
{
vertical-align:bottom;
}
.RadComboBox_Black
*
{
margin:0;
padding:0;
}
.RadComboBox_Black
*
{
margin:0;
padding:0;
}
.RadComboBox_Black
table
{
border:0;
border-collapse:collapse;
}
.RadComboBox_Black
.rcbInputCell
{
padding: 0 0 0 2px;
}
.RadComboBox_Black
.rcbInputCellLeft { background-position: 0 0; padding-left: 5px; }
.RadComboBox_Black
.rcbInputCell
{
width:100%;
height:23px;
line-height:22px;
border: 0;
vertical-align:top;
background: transparent url('mvwres://Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Black.ComboBox.rcbBg.gif') no-repeat;
}
.RadComboBox_Black
.rcbInputCell
{
width:100%;
height:23px;
line-height:22px;
border: 0;
vertical-align:top;
background: transparent url('mvwres://Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Black.ComboBox.rcbBg.gif') no-repeat;
}
.RadComboBox_Black
.rcbInputCellLeft { background-position: 0 0; padding-left: 5px; }
.RadComboBox_Black
.rcbInputCell
{
padding: 0 0 0 2px;
}
.RadComboBox_Black
td
{
border: 0;
}
.RadComboBox_Black
.rcbInputCell input
{
width:100%;
background:transparent;
border:0;
vertical-align:top;
padding:4px 0 0 2px;
}
.RadComboBox_Black
input
{
font:12px "segoe ui",arial,verdana,sans-serif;
color:#999;
}
.RadComboBox_Black
.rcbArrowCellRight { background-position: 0 0; }
.RadComboBox_Black
.rcbArrowCell
{
border: 0;
padding:0;
width:24px;
background: transparent url('mvwres://Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Black.ComboBox.rcbArrowCell.gif') no-repeat;
}
.RadComboBox_Black
.rcbArrowCell
{
border: 0;
padding:0;
width:24px;
background: transparent url('mvwres://Telerik.Web.UI, Version=2008.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Black.ComboBox.rcbArrowCell.gif') no-repeat;
}
.RadComboBox_Black
.rcbArrowCellRight { background-position: 0 0; }
.RadComboBox_Black
.rcbArrowCell a
{
position:relative;
outline:none;
line-height:22px;
overflow:hidden;
display:block;
width:24px;
height:24px;
text-decoration:none;
text-indent: -9999px;
font-size: 0;
}
</style>
</
head>
<
body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="cmbCategory">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="cmbColor" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<div>
<table style="width:100%;">
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td>
</td>
<td align="center">
<telerik:RadComboBox ID="cmbCategory" Runat="server" onselectedindexchanged="cmbCategory_SelectedIndexChanged"
Skin="Black" Text="[ Select Division ]" AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem runat="server"
Text="Boys Under 4" Value="Boys Under 4" />
<telerik:RadComboBoxItem runat="server"
Text="Girls Under 10" Value="Girls Under 10" />
</Items>
<CollapseAnimation Type="OutQuint" Duration="200">
</CollapseAnimation>
</telerik:RadComboBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td align="center">
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td align="center">
<telerik:RadComboBox ID="cmbColor" Runat="server"
Skin="Black">
<CollapseAnimation Type="OutQuint" Duration="200">
</CollapseAnimation>
</telerik:RadComboBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</
table>
</div>
</form>
</
body>
</
html>
Hi,
I am currently using the ajax radgrid(2008.1.415.20) for displaying data on one of my usercontrols.
I use a light weight object for populating the grid as the full business object would take too long to load, however when I wish to view or edit the specific details of a grid item I need to load this “full” object from the database and then populate the FormTemplate within the grid.
I have the following problems:
1)It appears that this FormTemplate can only be populated using the object that was loaded for populating the grid(i.e. the “light weight” object), is there no method that can be used to intercept what the FormTempate is going to bind to, because I really only want to use some of the “light weight” objects properties to do a query on the database to get the full business object to populate the FormTemplate.
2) I also need to implement some logic while populating FormTemplate. In this case I want to have access to all controls, located on a FormTemplate from a one particular method rather then trying to spread this logic between databound events of these controls. I tried to use ItemDataBaund event of the grid, but it doesn’t allow to access FormTemplate content (because it is obviously used for different purposes). Subscribing on OnItemCommand event also doesn’t give any effect due to the same reason (actually it occurs even before ItemDataBound). As an option I can subscribe to OnDataBound event for some control, located within a form view and then access other sibling controls using Control.Parent property, but it seems to me that it is not the best solution for such advanced and powerful grid control. Isn’t it? ?
3) Also is the FormTemplate only used for editing/inserting or can it be used for viewing objects? I would appreciate if somebody give me some good example of how to use FormTemplate for Editing/Inserting/Viewing data.
Any help would be greatly appreciated.
Liam Brennan.