or
Hello,
In my codebehind I am creating a Radgrid and adding the columns to the grid. One of those columns is a GridButtonColumn. The code looks like so...
| Dim clmbtnGRDMAIN1 As New Telerik.Web.UI.GridButtonColumn |
| clmbtnGRDMAIN1.DataTextField = rowCOLUMN.FIELDNAME |
| clmbtnGRDMAIN1.HeaderText = rowCOLUMN.EXTERNAL_READABLE1 |
| clmbtnGRDMAIN1.UniqueName = rowCOLUMN.FIELDNAME |
| clmbtnGRDMAIN1.HeaderStyle.Width = rowCOLUMN.GRIDWIDTH |
| clmbtnGRDMAIN1.CommandName = "TEMPID" |
| grdMAIN1.Columns.Add(clmbtnGRDMAIN1) |
This works fine, it creates the button with the proper information. But what I want to do, is that after a user clicks on the link button, gather the value.
The Telerik example says to put some code in the ItemCreated event. Such as this...
| If e.Item.ItemType = Telerik.Web.UI.GridItemType.Item Then |
| Dim item As Telerik.Web.UI.GridDataItem |
| item = e.Item |
| Dim LinkButton1 As LinkButton |
| LinkButton1 = item("TEMPID").Controls.Item(0) |
| LinkButton1.CommandArgument = e.Item.ItemIndex.ToString() |
| End If |
This works and the index is correct.
But, when I try to get the value in the ItemCommand event, I get nothing. The code is here...
| Dim index As Integer = Convert.ToInt32(e.CommandArgument) |
| Dim item As Telerik.Web.UI.GridDataItem = grdMAIN1.Items(index) |
this.RadMenu1.Items[0].CssClass = "rmFocused";
and that works but it never loses focus no matter which menu items are clicked. I can't figure out how to make it lose focus when another menu item is clicked. I tried a client side event to set the CssClass and it does not work, nor does item.focus() - can't get any client side event to make it focused on loading. Seems a very simple task I want to do - just focus the darn item onload and take focus off when another item selected - simple eh? lol