I have a project thats contain RadColorPicker. I need to change text color according the chosen one. inspect shows me the wrong color. Process steps;
1)Choose color and close the RadColorPicker,
2)Inspect still shows me the previous color that i chosen,
3)Inspect has been updated when i clicked second time to RadColorPicker.
I don't know why is happening and need your help.
Thanks a lot.
8 Answers, 1 is accepted
Here's an example and below is attached a short video with the expected behavior.
Hi again Marin.
That was a really helpful answer, thank you.
But i forgot to tell that actually i haven't use a single RadColorPicker.
I have a lot of RadColorPickers and all of these will create on runtime.
These identities are will generate randomly.(It is not optional. I cant change identities)
That's why i cant get the id of selected RadColorPicker. Is this any function or argument or something that works fine?
In this way, i can handle which picker i clicked and get its id.
I think OnClientColorChange function will help me but, i could not get the id of selected RadColorPicker in this function.
Have a good day.
The color picker offers the .get_element() and get_id() methods that you can use to tie it easily to the DOM.
Here's a modification that shows one way to traverse the DOM to work with the color picker container:
I tried your solution on last weekend.
I found which input shows me which color i choose.
But i have still the same problem. I will show you with images.
1- These are my columns with radcolorpickers.(create on runtime each one have their own ids)
2- This is the inspect side that shows me selectedcolor. Input->value
3- Changing the selected color. (Click black #000000)
4- Still previous color i choose.
After these steps click again the radcolorpicker. (It shows me #000000. i dont need to click second time to just change selected color)
5- This is the code to get selected color.(For each row in loop)
I tried to change selected color on OnClientColorChange method. But it showed me selected color is already changed. (it is like yellow=yellow)
The color is changed but inspect side is not updated.
Sorry for late reply but i have tried many things to fix this. I hope these steps clearly shows you my problem.
There are no such known issue in the control and to help you further I will need you to open a support ticket and send me a small runnable example that demonstrates the problem so I can investigate.
In the meantime, I can offer the following ideas:
- make sure the controls are created on every Page_Init and they always have the same IDs
- upgrade to the latest version to get support for current browsers
- ensure accessing the selected color on the server happens only after the page state has been loaded
Here is a small snippet I also made for you that shows correct control creation and that also obtains the selected color properly:
Thank you for your interest dear Marin.
I have couple of questions about Client Settings.
I use the AllowRowsDragDrop="True", AllowRowSelect="True" and EnableDragToSelectRows="True"
When i change the AllowRowsDragDrop="False" it is back to normal.
If AllowRowsDragDrop="True" it happens. These conditions broke my project.
Does this have anything to do with these settings?
I advise that you open separate threads for separate issue so each one is kept concise and to the point.
On the grid question - when a single action has two meanings, issues may happen, depending on the action and the confusion it can cause, and you may have to pick one. That said, the following works fine for me (video attached below) and if you are not using the latest version, I advise that you upgrade to it. In the video you will see how the drag operation has different behavior depending on where you start dragging depending on the item selection - draggin unselected items selects them, dragging selected items drags them. This behavior is expected and if it is confusing, you should pick one feature only for the drag user action.
Hey again Marin.
Thank you for all of your comments. You saved me a lot.
I couldn't figure it out how to fix this but i dont need the solution anymore.
Have a nice forums :)