<style type="text/css"> |
.label |
{ |
color: Blue; |
font-family: Tahoma; |
font-size: 1em; |
font-weight:bold |
} |
.value |
{ |
color: black; |
font-family: Tahoma; |
font-size: .9em; |
} |
</style> |
<asp:UpdatePanel ID="pnl" runat="server" UpdateMode="Conditional"> |
<ContentTemplate> |
<table border = "0" align = "center" width = "100%" > |
<tr> |
<td><asp:Label ID="lblContent" runat="server" Text="Content File:" class = "label"></asp:Label></td> |
<td><asp:Label ID="lblContentUrl" runat="server" class = "value"></asp:Label></td> |
</tr> |
<tr> |
<td><asp:Label ID="lblTotalLinks" runat="server" Text="Total Links:" class = "label"></asp:Label></td> |
<td><asp:Label ID="lblTotalLinksValue" runat="server" class = "value"></asp:Label></td> |
</tr> |
<tr> |
<td><asp:Label ID="lblVersion" runat="server" Text="Version:" class = "label"></asp:Label></td> |
<td><asp:Label ID="lblVersionValue" runat="server" class = "value"></asp:Label></td> |
</tr> |
<tr> |
<td><asp:Label ID="lblCheckedOut" runat="server" Text="Checked Out:" class = "label" ></asp:Label></td> |
<td><asp:Label ID="lblCheckedOutValue" runat="server" class = "value"></asp:Label></td> |
</tr> |
<tr> |
<td><asp:Label ID="lblCreatedOn" runat="server" Text="Created On:" class = "label" ></asp:Label></td> |
<td><asp:Label ID="lblCreatedOnValue" runat="server" class = "value"></asp:Label></td> |
</tr> |
<tr> |
<td><asp:Label ID="lblLastModifiedOn" runat="server" Text="Last Modified On:" class = "label"></asp:Label></td> |
<td><asp:Label ID="lblLastModifiedOnValue" runat="server" class = "value"></asp:Label></td> |
</tr> |
</table> |
</ContentTemplate> |
</asp:UpdatePanel> |
/// <summary>
/// Generates the textual control.
/// </summary>
/// <param name="fieldDefinition">Fielddefinition that holds the data that needs to be set on the control.</param>
/// <returns>A textual control based on a textbox.</returns>
private
TextBox textualControl(ServiceObjectFieldDefinition fieldDefinition, RadInputManager inputManager)
{
string
controlId =
string
.Format(
"dynamicFieldControl-{0}"
, fieldDefinition.Id);
this
.dynamicFieldControlSequenceIds.Add(controlId);
RegExpTextBoxSetting textualValidationSetting =
new
RegExpTextBoxSetting();
textualValidationSetting.BehaviorID = controlId;
TextBox textualTextbox =
new
TextBox();
textualTextbox.ID = controlId;
if
(fieldDefinition.Mandatory)
textualValidationSetting.Validation.IsRequired =
true
;
if
(fieldDefinition.MaxLength !=
null
)
textualTextbox.MaxLength = Convert.ToInt32(fieldDefinition.MaxLength);
if
(!
string
.IsNullOrEmpty(fieldDefinition.DefaultValue))
textualTextbox.Text = fieldDefinition.DefaultValue;
if
(fieldDefinition.DefaultValueFixed)
textualTextbox.Enabled =
false
;
textualValidationSetting.ValidationExpression = fieldDefinition.MinLength !=
null
?
string
.Format(
"{{0},}"
, Convert.ToInt32(fieldDefinition.MinLength)) :
"{0,}"
;
TargetInput textualValidationInput =
new
TargetInput(controlId,
true
);
textualValidationSetting.TargetControls.Add(textualValidationInput);
inputManager.InputSettings.Add(textualValidationSetting);
this
.dynamicControls.Add(textualTextbox);
return
textualTextbox;
}
RadGrid1.Columns.FindByDataField(
"ProductName").Display = False
The grid is displaying the 12 columns where i can able to insert/delete/update. But when i count the columns it displaying only 2.
Radgrid1.Columns.Count.
Please tell me how to access the RadGrid fields.
I have to lot things to do with. Also tell me how to "sum" all columns values with this kind of situation.
Thanks.
Regards
Syed Arshad
<telerik:GridTemplateColumn HeaderText="Status" SortExpression="Status">
<EditItemTemplate>
<telerik:RadComboBox ID="StatusRadComboBox" runat="server" SelectedValue='<%# Bind("Status") %>'>
<Items>
<telerik:RadComboBoxItem Text="" Value=""></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="Assigned" Value="Assigned"></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="Lost" Value="Lost"></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="Returned" Value="Returned"></telerik:RadComboBoxItem>
</Items>
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Value is required"
ControlToValidate="StatusRadComboBox"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>