This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid Problem

2 Answers 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Liji Jose
Top achievements
Rank 1
Liji Jose asked on 09 Feb 2010, 06:39 AM
i am trying to have a RadGrid in .aspx page and Setting the AutoGenerate Column = False , and tried adding TextBox and Combobox inside the RadGrid through source view
.{

inside <Columns>

 

 

GridTemplateColumn

 

}

but after adding it inside , the RadGrid is not Showing the Controls placed inside in it ....

I dont know where i had made a mistake



<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>

 

<%

@ 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></title>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

 

 

GridLines="None">

 

 

<MasterTableView >

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="#">

 

<

 

ItemTemplate>

 

 

<asp:Label ID="lblRowID" runat="Server" ></asp:Label>

 

</

 

ItemTemplate>

 

</

 

telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Col2">

 

<

 

ItemTemplate>

 

 

<telerik:RadComboBox ID="ddlOperator" runat="server" CssClass="ddlClass" AutoPostBack="true"

 

 

EnableViewState="true">

 

<

 

Items>

 

<

 

telerik:RadComboBoxItem Text="Ascending" Value="Ascendings" />

 

</

 

Items>

 

</

 

telerik:RadComboBox>

 

</

 

ItemTemplate>

 

</

 

telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Col3">

 

<

 

ItemTemplate>

 

<

 

telerik:RadTextBox runat="server" ID="txt" Text="col"></telerik:RadTextBox>

 

</

 

ItemTemplate>

 

</

 

telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

</

 

telerik:RadGrid>

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Feb 2010, 09:47 AM
Hello Liji,

GridTemplateColumn displays each cell in the column in accordance with a specified template. This lets you provide custom controls in the column. You can view and set the templates for this column type using the Edit Templates command on the RadGrid.

For more information, please refer to the following resources:
Column types (GridTemplateColumn section)
Online Demo
Combo in Grid

Kind regards,
Pavlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Liji Jose
Top achievements
Rank 1
answered on 09 Feb 2010, 09:55 AM
Thank You
Tags
Grid
Asked by
Liji Jose
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Liji Jose
Top achievements
Rank 1
Share this question
or