This is a migrated thread and some comments may be shown as answers.

RadGrid1.SelectedValue

11 Answers 268 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nyceane
Top achievements
Rank 1
Nyceane asked on 27 Dec 2007, 06:11 PM
Is this fixed yet?  because selectedvalue will still give me a null no matter what I do.

11 Answers, 1 is accepted

Sort by
0
Petja
Telerik team
answered on 28 Dec 2007, 11:15 AM
Hi Nyceane,

You could access the selected items by its table like follows:
grid.get_masterTableView().get_selectedItems()
Our developers will review the issue as soon as possible.

Happy Holidays!

Kind regards,
Petja
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Nyceane
Top achievements
Rank 1
answered on 03 Jan 2008, 01:50 AM
'Telerik.WebControls.RadGrid' does not contain a definition for 'get_masterTableView'

How do I exactly get the selected value?
0
Sebastian
Telerik team
answered on 03 Jan 2008, 11:37 AM
Hello Nyceane,

Detailed information about the changes made in the client-side API of RadGrid you can find in these online resources:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Overview/DefaultCS.aspx (section Client-side API and events)

http://www.telerik.com/help/radcontrols/prometheus/ (chapter Controls -> RadGrid -> Client-side API reference)

More precisely, to extract the selected value client-side you can use the client key/values exposed through the API as shown here:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Keys/DefaultCS.aspx

Server-side you can access directly the <RadGridInstance>.SelectedValue property by invoking its ToString() method for example.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Nyceane
Top achievements
Rank 1
answered on 16 Jan 2008, 12:15 AM
is this going to be fixed on next update?
0
Prangadj
Top achievements
Rank 1
answered on 16 Jan 2008, 11:21 AM
Nyceane, I do not find anything broken at the moment that has to be fixed . Telerik team provided several options to fetch the selected value on client, use one of them to do that.

Prangadj
0
Nyceane
Top achievements
Rank 1
answered on 17 Jan 2008, 04:19 AM
there are no example showing how to retrieve key value off the table, the only example they are showing is how many rows are selected.  if you have a good way to retrieve client select value, please show me, i'd be highly appreciated
0
Vlad
Telerik team
answered on 17 Jan 2008, 07:55 AM
Hi Nyceane,

Please visit this example for more info:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Keys/DefaultCS.aspx

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Anthony Kornmeier
Top achievements
Rank 1
answered on 28 Feb 2008, 09:57 PM
I have used the RadControls Grid for displaying items for years. I use an ASP.NET FormView to edit the data.  On the RadGrid's onSelectedIndexChanged SERVER SIDE event to grab the <RadGridInstance>.SelectedValue.ToString() value to databind my FormView (which is working fine).  However, when I go to update the FormView using the RadGrid  SelectedValue.ToString() value, it is NULL.  I don't know how or why, but this value should persist until you clear the selected indexes or databind the grid.  

I feel this is a bug in the Prometheus Grid.
0
Sebastian
Telerik team
answered on 29 Feb 2008, 07:35 AM
Hello Anthony,

Can you please submit an example which illustrates the unexpected behavior? Furthermore, can you please check whether the same approach works for the MS GridView control and its SelectedValue property?

Best regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Vlad
Telerik team
answered on 29 Feb 2008, 10:31 AM
Hi Anthony,

Just a quick follow up.

I have reviewed your code and I notice that you are calling DataBind() for the grid on every Page_Load. This will clear the grid child controls and ViewState and will recreated the controls according the the specified data source however the ViewState of the control will be lost. You can check this using standard MS GridView and you will get same result.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kedar
Top achievements
Rank 1
answered on 04 Jan 2011, 12:15 PM
You are missing out with the setting of DataKey for the grid. If we set the DataKeyName, SelectedValue works properly..

Thanks,
Kedar
Tags
Grid
Asked by
Nyceane
Top achievements
Rank 1
Answers by
Petja
Telerik team
Nyceane
Top achievements
Rank 1
Sebastian
Telerik team
Prangadj
Top achievements
Rank 1
Vlad
Telerik team
Anthony Kornmeier
Top achievements
Rank 1
Kedar
Top achievements
Rank 1
Share this question
or