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

EditFormSettings Radtextbox set color

6 Answers 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 13 Oct 2011, 12:47 PM

how to set color on, one textbox to another textbox ,curosor focus textbox only color appear

Thanks,
Mohamed.

6 Answers, 1 is accepted

Sort by
0
mohamed
Top achievements
Rank 1
answered on 17 Oct 2011, 05:07 AM
Problem Resolved for radtextbox like that ,

FocusedStyle-BackColor="Lavender"

how to fix color in radcombobox like that


Thanks,
Mohamed.
0
Shinu
Top achievements
Rank 2
answered on 17 Oct 2011, 03:23 PM
Hello Mohamed,

Try the following Javascript to change the backcolor of RadComboBox OnClientFocus.
JS:
<script type="text/javascript">
 function OnClientFocus(sender, eventArgs) 
{
   var combo = $find("<%= RadComboBox1.ClientID %>");
   var inputElement = combo.get_inputDomElement();
   inputElement.style.backgroundColor = "red";         
}
</script>

Thanks,
Shinu.
0
mohamed
Top achievements
Rank 1
answered on 18 Oct 2011, 03:23 PM
Thanks for ur reply Shinu,

how to find EditFormSettings inside radcombobox

Thanks
Mohamed.
0
Shinu
Top achievements
Rank 2
answered on 19 Oct 2011, 04:41 AM
Hello Mohamed,

Try the following code snippet in ItemDataBound event to access RadComboBox in EditFormSettings.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item is GridEditableItem && e.Item.IsInEditMode)
   {
     GridEditableItem item = (GridEditableItem)e.Item;
     RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1");
   }
}

Thanks,
Shinu.
0
mohamed
Top achievements
Rank 1
answered on 19 Oct 2011, 05:14 AM
Thanks for ur reply Shinu,

I know this way ,
how to find in JavaScript

Thanks,
Mohamed.
0
Shinu
Top achievements
Rank 2
answered on 19 Oct 2011, 06:25 AM
Hello Mohammed,

You can access the RadComboBox from client side using sender property which is the default argument. Here is the sample code that I tried.

Javascript:
function OnClientFocus(sender,args)
{
  var combo=sender;
    .  . . . .
}

Thanks,
Shinu.
Tags
Grid
Asked by
mohamed
Top achievements
Rank 1
Answers by
mohamed
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or