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

[Solved] Create an options grid

7 Answers 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cátia
Top achievements
Rank 1
Cátia asked on 16 Jun 2009, 05:30 PM
Hi,

I'm trying to build a grid with options to make some features of my website to become visible or invisible. I searched in your demos examples but I didn't find nothing. I don't know how can I do exactly this. If someone understands what I want to create and has a clue for me of how can I do this, please let me know!
Thanks!

7 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 17 Jun 2009, 07:49 AM
Hello Cátia,

If I understand your question correctly, you would like to display images or other controls/elements in your grid conditionally based on some custom logic. If so, the resources pointed below can become a starting point for your implementation:

http://www.telerik.com/help/aspnet-ajax/grdconditionalimagedisplayingridcolumn.html

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/accessingcellsandrows/defaultcs.aspx

You can alter the solutions presented there to be in conformance with your configuration schema.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cátia
Top achievements
Rank 1
answered on 17 Jun 2009, 08:40 AM
I saw this example but it's not exactly what I want. Let me explain better.
I have some docks on my website's default page and I want to have a settings' page to let the user choose to each dock he wants visible or invisible. In that case I want to have a grid with the multiple docks that I have on my default page and for each one I want two radio buttons: one to set the dock visible and one to set it invisible.
Hope you can help me, I think I explain better what I want now :)
Thanks!
0
Sebastian
Telerik team
answered on 22 Jun 2009, 01:05 PM
Hello Cátia,

Thank you for the additional information - now I understand your schema.

To attain the functionality you are after, consider wrapping MS RadioButtonList with two radio buttons (show/hide options) inside an item template of GridTemplateColumn and AutoPostBack = true for the RadioButtonList.

Then you can intercept the OnSelectedIndexChanged server event of the list, determine the row from which it is invoked through the INamingContainer passed in the handler and show/hide the corresponding dock based on the actual clicked radio button.

For more information about how to access cells and controls inside grid rows review the resources below:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/accessingcellsandrows/defaultcs.aspx

http://www.telerik.com/help/aspnet-ajax/grdaccessingcellsandrows.html

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cátia
Top achievements
Rank 1
answered on 26 Jun 2009, 02:30 PM
Thanks for your helpa, but I still have some problems to execute this radGrid.
I'm a newbie in telerik and I don't know how to convert the example you gave into an example with two radio buttons.
Could you try to build a radgrid with the two radiobuttons and the code that I should use to set the docks visible or invisible?
Thanks and sorry for all these doubts!
0
Sebastian
Telerik team
answered on 02 Jul 2009, 12:40 PM
Hi Cátia,

I am attaching the demo project you requested (following the guidelines from my previous post) to this forum thread. Feel free to modify/extend it to be in conformance with your project schema.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cátia
Top achievements
Rank 1
answered on 02 Jul 2009, 02:38 PM
Thanks for the help but I think it's not going to work because in the example that you gave the docks are in the same page and in my website the docks are in a different page from where the radgrid with the radiobuttonlists are. And I don't know how to change that...
0
Sebastian
Telerik team
answered on 02 Jul 2009, 03:43 PM
Hello Cátia,

In this case you will find to find the docks on the different pages with your custom logic (in the same way as you will do with other ASP.NET server controls instead of RadDock instances in this scenario).

Regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Cátia
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Cátia
Top achievements
Rank 1
Share this question
or