or
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
foreach (GridDataItem DataItem in RadGrid1.Items)
{
if (DataItem["Import"].Text == "0")
{
DataItem["ImportColumn"].Enabled = false;
TableCell cell = (TableCell)DataItem["ImportColumn"];
cell.Enabled = false;
}
}
<asp:RadioButtonList ID="rdo1" runat="server" |
Onselectedindexchanged="rdo1_SelectedIndexChanged" AutoPostBack="True"> |
</asp:RadioButtonList> |
protected void rdo1_SelectedIndexChanged(object sender, EventArgs e) { |
RadioButtonList rdoList = this.RadGrid1.FindControl("rdo1") as RadioButtonList; |
Label lbl = this.RadGrid1.FindControl("lbl1") as Label; |
} |
<
Groups
>
<
telerik:TileGroup
>
<
telerik:RadContentTemplateTile
Name
=
"WelcomeTile"
BackColor
=
"#00457E"
Shape
=
"Wide"
>
<
ContentTemplate
>
<
div
style
=
"position:relative;width:312px;height:160px;"
>
<
div
style
=
"position:absolute;bottom:0px;left:-4px;"
>
<
img
src
=
"Images/Tile_CrownPoint.jpg"
style
=
"width:314px;height:111px;"
/>
</
div
>
<
div
style
=
"position:absolute;top:0px;"
>
<
asp:Panel
ID
=
"Panel1"
CssClass
=
"WideTileContent TileBigger"
runat
=
"server"
>
Yay! River!
</
asp:Panel
>
</
div
>
</
div
>
</
ContentTemplate
>
<
PeekTemplate
>
<
asp:Panel
class
=
"WideTileContent TileRegular"
runat
=
"server"
ID
=
"Panel4"
BackColor
=
"#20659E"
>
<%=WelcomeData.MessageBody %>
</
asp:Panel
>
</
PeekTemplate
>
<
PeekTemplateSettings
CloseDelay
=
"0"
ShowInterval
=
"0"
ShowPeekTemplateOnMouseOver
=
"True"
HidePeekTemplateOnMouseOut
=
"True"
Animation
=
"Slide"
/>
</
telerik:RadContentTemplateTile
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
table
style
=
"width:100%;background-color:antiquewhite"
>
<
tr
>
<
td
style
=
"height:10px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
>Name: </
td
>
<
td
style
=
"width:90%;text-align:left"
><
asp:Label
ID
=
"lblName"
runat
=
"server"
Text='<%#Bind("TokenFor") %>'></
asp:Label
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:3px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
>Persona: </
td
>
<
td
style
=
"width:90%;text-align:left"
><
asp:DropDownList
ID
=
"ddlPersona"
runat
=
"server"
></
asp:DropDownList
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:3px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
>Email: </
td
>
<
td
style
=
"width:90%;text-align:left"
><
asp:TextBox
ID
=
"txtEmail"
runat
=
"server"
Text='<%#Bind("strTokenEmail") %>' Width="260px"></
asp:TextBox
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:3px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
>Phone: </
td
>
<
td
style
=
"width:90%;text-align:left"
><
asp:TextBox
ID
=
"txtPhone"
runat
=
"server"
Text='<%#Bind("strPhoneNum") %>'></
asp:TextBox
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:20px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:3px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
>Location: </
td
>
<
td
style
=
"width:90%;text-align:left"
><
asp:DropDownList
ID
=
"ddlLocation"
runat
=
"server"
></
asp:DropDownList
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:3px"
></
td
>
</
tr
>
<
tr
>
<
td
style
=
"width:10%;text-align:right"
></
td
>
<
td
style
=
"width:90%;text-align:left"
>
<
asp:LinkButton
ID
=
"lnkSubmit"
runat
=
"server"
Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Insert" : "Update" %>'
CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'>
</
asp:LinkButton
>
<
asp:LinkButton
ID
=
"lnkCancel"
runat
=
"server"
CausesValidation
=
"false"
CommandName
=
"Cancel"
Text
=
"Cancel"
></
asp:LinkButton
>
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"height:10px"
></
td
>
</
tr
>
</
table
>
</
FormTemplate
>
</
EditFormSettings
>
protected void myRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
{
GridEditFormItem item = (GridEditFormItem)e.Item;
DropDownList ddlLocation = (DropDownList)item.FindControl("ddlLocation");
DropDownList ddlPersona = (DropDownList)item.FindControl("ddlPersona");
sql = "Select intPersonaId, strPersonaLtr + ' - ' + strPersona Persona from tblPersona where bitActive = 1";
ddlPersona.DataSource = c.GetReader(sql);
ddlPersona.DataTextField = "Persona";
ddlPersona.DataValueField = "intPersonaId";
ddlPersona.DataBind();
ddlPersona.SelectedValue = (string)DataBinder.Eval(e.Item.DataItem, "intPersonaId").ToString();
sql = "Select intLocationId, strLocation from tblLocations where bitActive = 1";
ddlLocation.DataSource = c.GetReader(sql);
ddlLocation.DataTextField = "strLocation";
ddlLocation.DataValueField = "intLocationId";
ddlLocation.Items.Add(new ListItem("Pick Location", "0"));
ddlLocation.DataBind();
ddlLocation.SelectedValue = (string)DataBinder.Eval(e.Item.DataItem, "intLocationTokenId").ToString();
}