or
| 'Create an instance of the RadInputManager |
| Dim controlvalidation As New RadInputManager |
| controlvalidation.ID = "RadInputManager1" |
| 'Add various settings and specific controls to validate within those settings |
| 'E.g. There is one field in the form that should be an e-mail address, 1 field that |
| 'has a validation date range, another field that has a different validation date |
| 'range. |
| <telerik:RadInputManager ID="RadInputManager1" runat="server"> |
| <telerik:DateInputSetting MinDate="1/1/1980" MaxDate="1/1/2020"> |
| <ClientEvents OnError="onClientDateTxtError" OnKeyPress="onClientTextChanged" /> |
| <TargetControls> |
| <telerik:TargetInput ControlID="txtControl1" /> |
| </TargetControls> |
| </telerik:DateInputSetting> |
| <telerik:DateInputSetting MinDate="1/1/2009" MaxDate="1/1/2030"> |
| <ClientEvents OnError="onClientDateTxtError" OnKeyPress="onClientTextChanged" /> |
| <TargetControls> |
| <telerik:TargetInput ControlID="txtControl2" /> |
| </TargetControls> |
| </telerik:DateInputSetting> |
| <telerik:RegExpTextBoxSetting IsRequiredFields="true" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"> |
| <ClientEvents OnError="onClientRegTxtError" OnKeyPress="onClientTextChanged" /> |
| <TargetControls> |
| <telerik:TargetInput ControlID="txtControl3" /> |
| </TargetControls> |
| </telerik:RegExpTextBoxSetting> |
| </telerik:RadInputManager> |

|
GridColumn col = (GridColumn)RadGrid1.MasterTableView.GetColumn("ColumnUniqueName"); |
| <telerik:GridTemplateColumn HeaderText="SectionID" UniqueName="SectionID"> |
| <EditItemTemplate> |
| <telerik:RadComboBox ID="SectionIDEditor" runat="server" AppendDataBoundItems="true" DataValueField="SectionID" DataTextField="SectionName" DataSourceID="SqlDataSource3" Skin="WebBlue" > |
| <Items> |
| <telerik:RadComboBoxItem Value="" Text="Select Parent Section" /> |
| </Items> |
| </telerik:RadComboBox> |
| </EditItemTemplate> |
| <ItemTemplate> |
| <asp:Label ID="SectionIDLabel" runat="server" Text='<%# Eval("SectionID") %>'></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then |
| 'access/modify the edit item template settings here |
| Dim Section As RadComboBox = CType(e.Item.FindControl("SectionIDEditor"), RadComboBox) |
| Section.DataSourceID = "SqlDataSource3" |
| Section.DataBind() |
| If Not DataBinder.Eval(e.Item.DataItem, "SectionID") Is Nothing And IsNumeric(DataBinder.Eval(e.Item.DataItem, "SectionID")) Then |
| ''Section.SelectedValue = DirectCast(DataBinder.Eval(e.Item.DataItem, "SectionID"), Integer) |
| ''Section.Items(0).Attributes("style") = "color: red" |
| 'Section.SelectedValue = DataBinder.Eval(e.Item.DataItem, "SectionID") |
| ''If Section.Items.FindItemByValue("", True).Selected Then |
| ''End If |
| ''Dim ComboItem As RadComboBoxItem |
| ''For Each ComboItem In Section.Items |
| '' If ComboItem.Value.Equals(e.Item.DataItem) Then |
| '' ComboItem.Selected = True |
| '' End If |
| ''Next ComboItem |
| If (Not Session("updatedValue") Is Nothing) Then |
| Section.SelectedValue = Session("updatedValue") |
| End If |
| Else |
| Section.SelectedValue = "" |
| End If |
| End If |
| 'If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then |
| ' 'Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) |
| ' 'Dim editMan As GridEditManager = editedItem.EditManager |
| ' 'Dim editor As GridTemplateColumnEditor = CType(editMan.GetColumnEditor("SectionID"), GridTemplateColumnEditor) 'in case you have RadComboBox editor for the GridDropDownColumn (this is the default editor), 'you will need to use ComboBoxControl below instead of DropDownListControl 'and add RadComboBoxItems instead of ListItems to the Items collection of the editor |
| ' 'Dim Section As RadComboBox = editor.ComboBoxControl |
| ' Dim Section As RadComboBox = CType(e.Item.FindControl("SectionIDEditor"), RadComboBox) |
| ' 'Section.Items.Insert(0, New RadComboBoxItem("Select Parent Section", "NotSetItem")) |
| ' If Not DataBinder.Eval(e.Item.DataItem, "SectionID") Is Nothing And IsNumeric(DataBinder.Eval(e.Item.DataItem, "SectionID")) Then |
| ' 'Section.SelectedValue = DirectCast(DataBinder.Eval(e.Item.DataItem, "SectionID"), Integer) |
| ' 'Section.Items(0).Attributes("style") = "color: red" |
| ' Section.SelectedValue = DataBinder.Eval(e.Item.DataItem, "SectionID") |
| ' 'If Section.Items.FindItemByValue("", True).Selected Then |
| ' 'End If |
| ' 'Dim ComboItem As RadComboBoxItem |
| ' 'For Each ComboItem In Section.Items |
| ' ' If ComboItem.Value.Equals(e.Item.DataItem) Then |
| ' ' ComboItem.Selected = True |
| ' ' End If |
| ' 'Next ComboItem |
| ' End If |
| 'End If |
| End Sub |
Hi telerik team,
I have a doubt hiding edit and delete images in a column based upon Groupby status in outlook style grid.
i followed below URL
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultcs.aspx
instead of Received from date i will have status:open(4) on Expand group shows 4 (rows)items
in which edit and delte should display
if Satus:Closed(8) in which Edit and delete column will display but without images
I m able to do in common grid but in outlook style grid?
Appreciable for any quick help
Thanks & Regards
G.Sudheer kumar