Hi,
I have a Radcombobox control which runs a javascript function when selected item changes (OnClientSelectedIndexChanged event). When the event is lauched, I want to know the comboBox name that it does. Is there any way?
Thanks.
Hi,
I try to run a LightBox with images read from a database. Because it is not working I tried to today to display an image from a base64 string. I can display the image as RadBinaryImage but it does not show up in the LightBox. I also noticed, that ITemplate.InstantiateIn is never called.
Here is the code behind:
protected
void
Page_Load(
object
sender, EventArgs e)
{
[...]
List<RadLightBoxItem> itemsList =
new
List<RadLightBoxItem>();
byte
[] imageData = Convert.FromBase64String(
"iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAApnSURBVHjaYvz//z/DKBi5ACCAmEaDYGQDgAAaTQAjHAAE0GgCGOEAIIBGE8AIBwABxEKKYkZGRhS+h4cH49+/f8OYmJjCgHIWQCFekLLRYKU9+Pfv372fP38e+vDhw/KLFy+eBwr9AGKUFj0xDXyAAGIkpReAnADc3Nw0gfxpQKbDr1+/GH7//s0w2qOgD2BmZmZgY2NjYGFhASWEL58+fZp34sSJDqDUGyD+TUoCAAggshKAq6urGTDXbwBGvCQrKyuDnp4eg4aGBgOIPQpoD16/fs1w7tw5hidPnjBwcHAwAOOCAZgIdh87diwLKP0YiH8SmwAAAojkBODi4iIOtPAwsPhRlZeXZ8jOzmYwNjYGp8pRQD/w9u1bhmXLljGsX78eXBKAEsHLly9XXrhwoQYo/RBUEhATtwABRE4jsAqY88GR397ezmBmZjZiIx8UwOgYlzg1MQgICwsz5ObmMiQmJjKAqmBgVcAgIiISJCYm5gWUFiG2LQYQQCQ1Ap2cnCSBDogDRXhOTg6DlJQUzoAhV4xYtaDSiB72DCa18EgD5nhOTk5wro+NjWW4evUqA7D4B4mxSkhIhL169eoMUNkHIP5OKE4BAojUEsAJ2NgTANX5pqamVI985BROSC0oxaPnDGLFaKUWJEZLtTAMrH4Zvn79Cg8XPz8/WIOQ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qXMA+oCWfjx49yrtz504Gd3d3cAKApUJYkYQeGeQCUszApRabOLZxdGL1E+M35MRHTqbApxZkHijiRUREGJiZmcFiU6dOBScKUIkAjIOXQKWfgPgHMeEGEECklgCPgZZuBhY3UTk5OQzbt29nUFFRAScCEAY5Al8gYROn1/VopI5tDFYAinTkNlhTUxPDrl27wGJAv/wB4htA4WdA/JkY8wACCGNXCT4MyRCM+kDLQBb8V1VV/b9ly5b/wATxfxTQFzx9+vR/VlYWKFL+A+PkPzBh/AfGy3UgvwOIrYCYk5g4BQggRlJyADT3cgDpUCCeAiwR+EAC9vb2DObm5gxsbGwMo4D24MmTJwx79uwB07BeADAeHwPxTiB3LxAfBOIX/4mIXIAAIicBgAh+IDsASNcB9SuORsnAAGh8gBp8d4DxcATUPgfiQ0D8ECROTNwCBBA5CQA2fiAIxNpAsSQgbQ3E0kCzWEejhW6RD2rtvwSGOahndg2ILwDxGSB+DMQ/iW3fAAQQuQkAVhJwgyIeiFWBWB6IRUB1Dyn90FFANvgDbe2D2mN3gfg+EL+BlghEN3ABAoiSBIDckwAlBH4g5oLyRxMA7cE/aE7/jNTt+09qDwcggBiHWjdoFFAXAAQQ02gQjGwAEECjCWCEA4AAAwBhKO42ZcdZ+AAAAABJRU5ErkJggg=="
);
RadLightBoxItem my_item =
new
RadLightBoxItem();
my_item.ItemTemplate =
new
LightBoxTemplate(imageData);
my_item.Description =
"The default image"
;
my_item.ImageUrl =
"~/images/test.png"
;
binaryDemoImage.DataValue = imageData;
binaryDemoImage.Width = 100;
binaryDemoImage.Height = 100;
binaryDemoImage.ResizeMode = BinaryImageResizeMode.Fit;
itemsList.Add(my_item);
log.Debug(
"Bild "
+ my_item.Description +
" zur RadLightBox dazu."
);
RadLightBox1.DataSource = itemsList;
RadLightBox1.DataBind();
[...]
}
With:
class
LightBoxTemplate : ITemplate
{
protected
RadBinaryImage image;
private
byte
[] binary;
private
static
readonly
log4net.ILog log = log4net.LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public
LightBoxTemplate(
byte
[] binary)
{
log.Debug(
"LightBoxTemplate wurde erstellt mit "
+ binary.Length +
" byte"
);
this
.binary = binary;
}
void
ITemplate.InstantiateIn(Control container)
{
log.Debug(
"InstantiateIn wurde aufgerufen mit "
+ binary.Length +
" byte"
);
image =
new
RadBinaryImage();
image.DataValue = binary;
image.Width = 800;
image.Height = 600;
image.ResizeMode = BinaryImageResizeMode.Fit;
container.Controls.Add(image);
}
}
Here is the aspx-page:
[...]
<
telerik:RadLightBox
ID
=
"RadLightBox1"
runat
=
"server"
PreserveCurrentItemTemplates
=
"true"
Width
=
"800px"
>
</
telerik:RadLightBox
>
<
telerik:RadBinaryImage
ID
=
"binaryDemoImage"
runat
=
"server"
/>
<
asp:Button
ID
=
"Button1"
Text
=
"Open LightBox"
OnClientClick
=
"OpenLigthBox(); return false;"
runat
=
"server"
/>
[...]
And attached is what it looks like.
Can you please help me to get the image show up in the Lightbox? Any advice is warmly welcomed.Thanks!
Ralf
Hi,
I have a special need where I want to limit the user to see only a specific zone of the map and nothing except that zone. for example he just can see France country and nothing outside that area.
Is there a way to set this by coding?
Thanks
I have a need to use a filter in Combination mode (having both the check list and the filter options), but I also need to limit the filter options to only a few.
Combination mode does not seem to be compatible with the instructions given here: http://www.telerik.com/help/aspnet-ajax/grid-reducing-filtermenu-options.html
I get java script errors when I try and use the server code provided, and the java script code does nothing for the Integer fields, and causes the popup box to shrink to 4x6 pixel box on all other types of fields.
Any help would be appreciated.
Hi,
We are using Telerik Ajax 2014.2.724.40 version.
When we create an anchor at the bottom of content (really long content) with IE9, and linked the anchor at the top index list.
But, the hyperlink doesn't work properly. Other browsers(IE11, Chrome, FF) don't have problem.
But we really need to make it work for IE9.
Any advice?
My application uses the RadAsyncUpload control and I just moved the app to our web farm environment and it intermittently
fails.
I believe it is because when the page posts back to the server, I execute RadAsyncUpload1.UploadedFiles[0].SaveAs
(newFilename, true) to rename the temporary file in the TemporaryFolder directory to a valid name before continuing with processing. I believe the failure occurs because the temporary file is in the TemporaryFolder on another server in the farm, so the SaveAs fails with file not found. I set the value of the TemporaryFolder property to an absolute path (i.e. d:\inetpub\wwwroot\appname\uploadedfiles) and my web.config files on both servers contain a MachineKey.
Is there anything else I need to do to make this work in a web farm? Thanks in advance.
Hello,
I have a master page that loads a RadTabStrip into it's ContentPlaceHolder. When the user clicks on a tab a WebUserControl is dynamically loaded into the place holder. Here's the code:
private void LoadMyUserControl(string controlName, Control parent)
{
parent.Controls.Clear();
UserControl ctrl = (UserControl)LoadControl(controlName);
string userControlID = controlName.Split('.')[0];
userControlID = userControlID.Replace("/", "").Replace("~", "");
ctrl.ID = userControlID;
parent.Controls.Add(ctrl);
}
One of the user controls contains a RadComboBox that's loaded with values. When the user selects a value from this combo box I load a RadGrid into the user control based on the selected value from the combo box.
The RadGrid contains one column and a NestedViewTemplate that contains a Nested RadGrid. Within this nested grid I have some GridTemplateColumns that contain RadButtons within their ItemTemplates. When the user clicks on one of these buttons I display a panel (make it visible/invisible) that contains another RadComboBox that gets its values based on which button was clicked and the value of the current cell.
The problem is that every time I click the button the entire page reloads (posts back), and if there are a lot of records in the nested grid it takes a long time for the panel to become visible. I have ajaxified the main radgrid by using a RadAjaxManagerProxy within the user control. I also tried ajaxifying the nested grid and the buttons within the ItemDataBound event of the nested grid.
None of my efforts have paid off. I'm not sure how to make it so that when I click the button only the RadComboBox within the panel gets updated and the whole user control page doesn't get posed back. If I put "if (!IsPostBack)" on the page_load event of the user control then the radgrid won't get loaded.
Can anyone help me figure out what to do with this?
<
div
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
ID
=
"RadAjaxLoadingPanel1"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxPanel
runat
=
"server"
ID
=
"RadAjaxPanel1"
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
CellSpacing
=
"0"
AllowPaging
=
"true"
ShowStatusBar
=
"true"
PageSize
=
"10"
Width
=
"100%"
PagerStyle-AlwaysVisible
=
"true"
GridLines
=
"None"
AutoGenerateColumns
=
"false"
OnNeedDataSource
=
"RadGrid1_Need"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
GroupingSettings
CaseSensitive
=
"false"
></
GroupingSettings
>
<
AlternatingItemStyle
CssClass
=
"ItemsGrid"
/>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"nomb"
UniqueName
=
"Contacto"
HeaderText
=
"Contacto"
runat
=
"server"
HeaderStyle-Width
=
"130px"
FilterControlWidth
=
"200px"
AutoPostBackOnFilter
=
"true"
ShowFilterIcon
=
"false"
FilterControlAltText
=
"Filter Contacto column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ubic"
HeaderText
=
"Ubicación"
runat
=
"server"
AllowFiltering
=
"false"
HeaderStyle-Width
=
"100px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"telf"
HeaderText
=
"Telefono"
runat
=
"server"
AllowFiltering
=
"false"
HeaderStyle-Width
=
"110px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"rpm"
HeaderText
=
"RPM"
runat
=
"server"
AllowFiltering
=
"false"
HeaderStyle-Width
=
"70px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"telf2"
HeaderText
=
"Telefono Movil"
runat
=
"server"
AllowFiltering
=
"false"
HeaderStyle-Width
=
"110px"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
</
div
>