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

Looking for Sample: ColorPicker & Grid

2 Answers 63 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
antonio
Top achievements
Rank 1
antonio asked on 08 Jul 2008, 12:30 AM
Hello,

I wonder if anybody has implemented the RadColorPicker inside a grid.  I have started implementing it inside the default ASP.NET datagrid, and it works OK except when I need to update the datasource after a new color has been picked.

I have used both client and server events for when a color is selected, but I can't seem to get the index of the current row where the colorpicker was launched.

Any help would be appreciated.

Thanks,

Antonio.

2 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 08 Jul 2008, 02:03 PM
Hello Antonio,

The grid's update command handler accepts as a second parameter DataGridCommandEventArgs e. You can use them to find which is the index of the current row which is updated - e.Item.ItemIndex. In case this suggestion cannot help you achieve the desired scenario, please, provide more details about what you want to achieve so that we can get a better idea of the problem you encounter.

Best wishes,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
antonio
Top achievements
Rank 1
answered on 08 Jul 2008, 07:40 PM
Hello,

Thanks for your response.  Clicking on the color picker does not raise the DataGrid_ItemCommand event.  The way I solved this problem (using the OnColorChanged event), is not very efficient since I have to traverse all the rows in the grid and then make the necessary updates to the datasource.

Thanks ayway.

Antonio.
Tags
ColorPicker
Asked by
antonio
Top achievements
Rank 1
Answers by
Sophy
Telerik team
antonio
Top achievements
Rank 1
Share this question
or