Protected Sub RadGrid1_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
If (TypeOf e.Item Is GridCommandItem) Then
Dim commandItem As GridCommandItem = CType(e.Item, GridCommandItem)
commandItem.Visible = False
End If
End Sub
How can I get the row object based upon the checking of a check box?
I'm using
<ItemTemplate>
<asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
</ItemTemplate>
And I have
Protected Sub ToggleRowSelection(ByVal sender As Object, ByVal e As EventArgs)
CType(CType(sender, CheckBox).NamingContainer, GridItem).Selected = CType(sender, CheckBox).Checked
End Sub
I've seen
http://www.telerik.com/community/forums/aspnet-ajax/grid/add-selected-items-to-an-arraylist.aspx
and I've added
OnItemCommand to the RadGrid but it does not seem to fire. What I need to end up with is something like:
Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
Dim PMID As String = DataItem.OwnerTableView.DataKeyValues(dataItem.ItemIndex)("PMID").ToString
Is there a way to put this in the ToggleRowSelection event?
RadAjaxManager.AjaxSettings.AddAjaxSetting(radgrid1, ucList1.PNL, RadAjaxLoadingPanel1);
Hi telerik,
I use two Related ComboBoxes ,but when I set the combobox can input for search,the combobox will just load one item,and when I click anywhere then click combobox, it will load all items...
I use your livedemo "ComboBox / Related ComboBoxes " , I change the RadComboBox2 can input and search is also have this bug.
Your code:
<
telerik:RadComboBox
ID
=
"RadComboBox2"
runat
=
"server"
EnableViewState
=
"false"
Width
=
"186px"
CssClass
=
"ComboBox_Countries"
OnClientSelectedIndexChanging
=
"LoadCities"
OnClientItemsRequested
=
"ItemsLoaded"
OnItemsRequested
=
"RadComboBox2_ItemsRequested"
/>
EmptyMessage EmptyMessage
):<
telerik:RadComboBox
ID
=
"RadComboBox2"
runat
=
"server"
EnableViewState
=
"false"
Width
=
"186px"
CssClass
=
"ComboBox_Countries"
OnClientSelectedIndexChanging
=
"LoadCities"
OnClientItemsRequested
=
"ItemsLoaded"
EmptyMessage
=
"Search for address..."
EmptyMessage
=
"Contains"
OnItemsRequested
=
"RadComboBox2_ItemsRequested"
/>
Message : Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly' Key being added: 'Telerik.Web.SkinsAssembly'
Source : mscorlib
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Insert(System.Object, System.Object, Boolean)
Stack Trace : at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String name, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseSet(String name, Object value)
at System.Collections.Specialized.NameValueCollection.Set(String name, String value)
at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()
at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkinAttributes(RadSkinManager skinManager, Type controlType)
at Telerik.Web.UI.Common.BaseClass.GetShortControlName(Control control)
at Telerik.Web.UI.Common.BaseClass.GetValueFromConfig(String keyFormat, Control control)
at Telerik.Web.UI.Common.BaseClass.GetGlobalEnableEmbeddedBaseStylesheet(Control control)
at Telerik.Web.UI.RadDataBoundControl.get_EnableEmbeddedBaseStylesheet()
at Telerik.Web.UI.RadDataBoundControl.Telerik.Web.ISkinnableControl.get_EnableEmbeddedBaseStylesheet()
at Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType)
at Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control)
at Telerik.Web.UI.RadDataBoundControl.RegisterCssReferences()
at Telerik.Web.UI.RadDataBoundControl.ControlPreRender()
at Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)