Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
204 views

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) 

 

 

 

 

 

 


And if I then do a Response.Write(item("TEMPID").Text, -1)  it comes up with a space when it should contain a string of numbers.

Anyone have any idea what I'm doing wrong or how I can get this value properly?  I'm having a heck of a time trying to do this.  I feel as though it should be easier to get a value out of a link.

Thanks
Kevin

 

 

Shinu
Top achievements
Rank 2
 answered on 02 Jun 2009
3 answers
672 views
I've added a simple combobox in a MasterPage that has a AJAX Web Form inside.  The error I'm getting is:

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

I've added an httpHandler in my web.config under system.web settings (Windows 2003 server).  Ideally this will be moved to the machine.config once I see it working.

What else can I check?
balaji
Top achievements
Rank 1
 answered on 02 Jun 2009
1 answer
90 views
Hello,

I have a page. The page has a RadGrid on it.
The datasource for the grid is DataTable that can change during the postback (along with the grid columns).

The grid is configured to allow sorting, but the sorting doest work. Any configuration I try, the grid does not fire OnSortCommand  event.

What should I do ?
Shinu
Top achievements
Rank 2
 answered on 02 Jun 2009
1 answer
340 views
Is it possible, when using a RadGrid with DetailTables, to specify that a given row or automatically has its detail table expanded, when the page is first loaded?
Princy
Top achievements
Rank 2
 answered on 02 Jun 2009
1 answer
79 views
Hi,

 I m using rad calendar with multiview property. I want to fix this calendar between 2 months such as Jan 2009 to December 2009 programmatically and also i dont want any other year.

Shinu
Top achievements
Rank 2
 answered on 02 Jun 2009
4 answers
105 views
Hi,

we are testing our application with the latest Dev version of chrome (not released yet).
It seems like filtering the grid columns doesn't work with standard text based filters.
The item command event never gets fired and the value is lost on the next rebind.
Filtering columns where we have dropdown boxes as filter option still works as expected.
Also reordering columns via drag and drop doesn't work.

Could you comment on whether this is a chrome issue or a problem with the rad control?

Cheers,
Michael
P.S. tested this with Q3/2008 and Q1/2009
Michael Ward
Top achievements
Rank 1
 answered on 02 Jun 2009
2 answers
72 views
 Hi,
     I am trying to use a radmenu in a grid. 
     I would like to use the menuitem to select Insert (add a new record, rather than a linkbutton). I am wondering how to get the commandName scenerio to work here so I can use the ItemCommand() method ?
     I have been searching for a sample of how to even use the itemClicked event to call the itemCommand() method. 
thanks for your time.
     
IQworks
Top achievements
Rank 1
 answered on 02 Jun 2009
3 answers
165 views
I need to set the focus (selected menu item) on page load and can't figure out how to do it correctly. In code behind I tried

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
Conrad
Top achievements
Rank 1
 answered on 01 Jun 2009
2 answers
141 views
I'm storing selected dates as a DatetimeCollection in a custom object.
I want to be able to store that object in viewstate, but I've been gettting the Serialization error

"Telerik.Web.UI.Calendar.Collections.DateTimeCollection is not marked as serializable"


i've already marked the class itself as Serializable, is there any way to serialize this?
or should I store the selected dates as an array or some other format?

Thank you
Deb
Debbie Wright
Top achievements
Rank 1
 answered on 01 Jun 2009
2 answers
225 views
Hi,

i have requirement where i should show one column with a  single bar for each row .. below gives little idea on how it should look
http://img0.gmodules.com/ig/modules/bar-chart.png

but for each row should have one bar which show 3 numbers (quantities) with different colors.

i dont require any x or y axis it can be a line or lable with 3 different colors filled in it depending on the numbers provided within the row cell.

is there any way to get that within the grid? or is there any logic so that i can fill the row cell with the colors?

Please help me if any one have done similar thing

thanks
-Krishna


Krishna
Top achievements
Rank 1
 answered on 01 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?