Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
Dear Telerik Team,

I need to enable user to click on Page Number when the RAD Telerik Grid is disabled. Kindly guide me.

With Regards
L.Palanivelrajan

Eyup
Telerik team
 answered on 29 May 2013
1 answer
95 views
Dear Telerik Team,

I have a RAD Grid that has image on one column and on click it opens a Edit Popup. When the RAD Grid is disabled, How to enable user to click on image. Grid should look like disabled mode but image column alone should be clickable.

With Regards
L.Palanivelrajan.
Eyup
Telerik team
 answered on 29 May 2013
5 answers
353 views
Hi guys,

Having an issue databinding with an Edit in Place grid, when one dropdown's values need to update on postback from the SelectedIndexChanged of another.

I'll put in some of the code at the bottom, I can post more if need be.  (This is a client's code base I'm working with, so I've scrubbed contextual info.  Please forgive typos or generic-ness in the code!)

Here's the summary:

I'm using LinqDataSources to populate dropdown1 & dropdown2. Originally they were each GridDropDownColumns, all was great.  Then, I found out a requirement that the second dropdown needs to be filtered by a foreign key in the db based on on the selection of dropdown1.

So, I changed both columns to a GridTemplateColumn, no prob.  I found references to http://www.telerik.com/help/aspnet-ajax/grid-with-combobox.html which discusses the first part.  The binding works fine without any autopostbacks on the dropdown1.

Then I added a SelectedIndexChanged as pasted below - works great, the selected value of dropdown1 is maintained in my private int, and the LinqDataSources gets the correct enumeration back.

However, with the (SelectedValue='<%#Bind("Value2") %>') on dropdown2, when the post back occurs, I get an error:
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

I found this (http://www.telerik.com/community/forums/aspnet-ajax/grid/databinding-methods-such-as-eval-xpath-and-bind-can-only-be-used-in-the-context-of-a-databound-control.aspx) and a few others saying the same, but that solution doesn't bind on save.

I've seen a post (I think reference on this forum) to a nested set of dropdowns, but that example was where only the second of the two dropdown values needed to be stored.  Both values here are needed, so I don't believe I can place both dropdowns in the same column & manipulate.

I also tried decoupling the binding. I was able to populate the dropdown2 on the RadGrid1_ItemDataBound, and I could even get the update save bound by using the LinqDataSource's Updating event and hitting the dropdown2 using the RadGrid's EditItems. However, I'm unable to get the dropdown2's value on the LDS's Insert to modify the saved object.  Doesn't feel like the right solution, but it almost worked.  I couldn't figure out how to save/modify my data object on insert & update using the ItemInserted/ItemUpdated events.

Any help would be appreciated!

<telerik:GridTemplateColumn UniqueName="Column1" HeaderText="Insurance">
    <ItemTemplate>
        <asp:Label ID="lblColumn1" runat="server" Text= '<%# ((MyObject)Container.DataItem).Value1 %> '></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" ID="RcbDropdown1" DataTextField="Table1Name" DataValueField="Table1ID" DataSourceID="ldsTable1" NoWrap="True" SelectedValue='<%#Bind("Value1") %>' OnSelectedIndexChanged="RcbDropdown1_SelectedIndexChanged" AutoPostBack="True" OnDataBound="RcbDropdown1_DataBound" >
        </telerik:RadComboBox>
    </EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Column2" HeaderText="Insurance Payer">
    <ItemTemplate>
        <asp:Label ID="lblColumn2" runat="server" Text= '<%# ((MyObject)Container.DataItem).Value2 %> '></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" ID="RcbDropdown2" DataTextField="Table2Name" DataValueField="Table2ID" DataSourceID="ldsTable2" SelectedValue='<%#Bind("Value2") %>' OnDataBound="RcbDropdown1_DataBound" OnDataBinding="RcbDropdown1_DataBinding">
        </telerik:RadComboBox>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

private int myvalue1 { get; set; }
 
protected void RcbDropdown1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
 
    myvalue1 = Maybe.ToInt32(e.Value);
    var dropdown1 = (RadComboBox)sender;
    var item = (GridEditableItem)rcb.NamingContainer;
    var dropdown2 = (RadComboBox)item.FindControl("RcbDropdown2");
    if (dropdown2 != null)
    {
        dropdown2.DataSourceID = "ldsTable2";
        dropdown2.DataTextField = "Table2Name";
        dropdown2.DataValueField = "Table2ID";
        dropdown2.DataBind();
    }
}
 
protected void ldsTable2_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
    var results = new List<MySecondObject>();
 
    if (myvalue1.HasValue)
    {
        results = {Repo Call with Enumeration Results filtering by myvalue1}
    }
    e.Result = results;
}
Jon
Top achievements
Rank 1
 answered on 29 May 2013
2 answers
191 views

I upgraded a project to use the 2013 Q1 Telerik dlls and now am receiving the 'unable to find embedded skin 'Vista'.  The project works fine on my machine, but errors out when I move it to the test environment.  The project was upgraded to use the 4.5 framework, but had to be reverted to 4.0, not sure if this could be causing the issue.  Steps I have taken to troubleshoot:

  1. Made sure I had the same versions of telerik.web.ui.dll and telerik.web.ui.skins.dll
  2. Verified they both were present in the bin folder on the test site
  3. Deleted the site and recreated it
  4. Deleted my bin folder and re-added my references
  5. Used different skins such as Vista, Office2010Blue, and Web20

Any ideas what I am missing here or what else I could try?

 

Ryan
Top achievements
Rank 1
 answered on 29 May 2013
2 answers
243 views

I have a RadListBox that allows reordering and requires alternate row coloring.

OnClientLoad and OnClientReordered events call a function in javascript that applies alternate row coloring.

var x = document.getElementsByTagName("li");
for (i = 0; i < x.length; i++) {
    if (i % 2 == 0) {
        x[i].style.backgroundColor = "#EFF3FB";
    }
    else {
        x[i].style.backgroundColor = "white";
    }
}

This had to be done on client side since we can't enable autopostback for performance reasons.

This works, however it disables the hover and selected background color default behavior.

Also, is there a way I can change the CssClass of each item of the RadListBox through the sender object of the OnClientLoad and OnClientReordered events?

Thank you for your assistance.

Nencho
Telerik team
 answered on 29 May 2013
1 answer
74 views
I have a upload button on the custom webpart designed and used in SharePoint 2010. On the Click event of the upload button the content in the SpRadeditor reloads, which hangs the pages for a while and then reloads the content leading to slowness of the process.

This works fine, if the content of the SPRadEditor is small.

How can i stop the rad editor from reacting to the Click event of the particular button?

I referred the below specified forum and tried to apply the javascript as specified in the forum but it didn't help. Could you please help on the same?

http://www.telerik.com/community/forums/aspnet-ajax/editor/stop-rad-editor-refreshing-on-timer-tick-event.aspx

<script type="text/javascript">

function AvoidTelerikRefresh() {

 

var originalSaveContent = Telerik.Web.UI.RadEditor.prototype.saveContent;

 

Telerik.Web.UI.RadEditor.prototype.saveContent = function () {  };

 

}

</script>

<asp:Button runat="server" ID="btnUpload" Text="Upload" CssClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"

OnClick="btnUpload_Click" OnClientClick="AvoidTelerikRefresh();" />


Stanimir
Telerik team
 answered on 29 May 2013
1 answer
210 views
I've got a problem when I have a large image in the content of my RadEditor, it seems to ignore my height or width settings (depending on where its viewed)

I did a simple test with the RadEditor set as:

<telerik:RadEditor ID="radEmailContent" runat="server" Width="500px" Height="500px" />


Then, in my code-behind, I set the content to:

radEmailContent.Content = "<p>This is a giraffe:</p><img src=""http://kitundu.files.wordpress.com/2012/02/giraffe-snack.jpg"" alt=""giraffe"" /><p>Cool, huh?</p>"


Doing this on a PC, it works the way I'd expect (see attached giraffeiframepc.jpg).  However, on an iPad, the image runs off the bottom, covering the buttons (giraffeiframeipad.jpg).  Looking around, I heard people say that iPads have an issue with Rich Text Editors and iFrames, so I tried adding the "ContentAreaMode="Div"" parameter.  But when I do that, the image runs off to the right (giraffediv.jpg).  I also tried setting the EditorCssFile to an empty .css file in case it was pulling in a strange style from somewhere else. 

Is this a known bug?  Am I doing something wrong?  Help, please!

 - Tim


Vessy
Telerik team
 answered on 29 May 2013
5 answers
119 views
Hi all,

i have a big issue, im using globalisation to make translation of the site in some languages but every time i have controls like radtextbox, anda radbuttons my aplication crashes when in some languages resource files, if i remove the telerik object it works fine.
Any solutions or similar problem or a cure for this.

best regards
Carlos
Top achievements
Rank 1
 answered on 29 May 2013
1 answer
297 views

How can I find the row index for a Rad grid? I want to pass the row index and 'this' to a javascript function to toggle the checkboxes on my rad grid from telerik.

Something like this: onClick="Checkbox(this, rowindex);"

Shinu
Top achievements
Rank 2
 answered on 29 May 2013
1 answer
193 views
Could we change RadDropDownList displaying style to MS style? How to do that?
Shinu
Top achievements
Rank 2
 answered on 29 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?