Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
Hi there,

I have a RadGrid control with configured sorting and paging. Grid Sorting is working with Postbacks.

Once i configure RadAjaxManager to update the RadGird control through Ajax when the control changes. sorting of a column works the first time a column header is clicked. When a column header is clicked a second time, I receive an error "updatePanelElement.innerHTML=rendering".

Here is the Code:

<

 

 

telerik:RadScriptManager ID="RadScriptManager1" runat="server" AjaxFrameworkMode="Enabled" />

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="myGrid">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="myGrid" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 


Grid Properties:

<

 

 

telerik:RadGrid ID="myGrid" runat="server" AutoGenerateColumns="False"

 

 

 

AllowSorting="True" AllowPaging="True" AllowCustomPaging="True" PageSize="5"

 

 

 

AllowFilteringByColumn="True" OnDataBinding="myGrid_DataBinding" OnPageIndexChanged="myGrid_PageIndexChanged"

 

 

 

OnSortCommand="myGrid_SortCommand" CellSpacing="0"

 

 

 

GridLines="None" EnableAjaxSkinRendering="False"

 

 

 

onneeddatasource="myGrid_NeedDataSource">

 



Anyone have any suggestions on how to fix?

Thanks in Advance
-Hari
Maria Ilieva
Telerik team
 answered on 16 Mar 2012
2 answers
86 views
Hi,

I want to get the index of the selected row in onkeypress event.

Help me
Thnx in advance
Remya
Top achievements
Rank 1
 answered on 16 Mar 2012
2 answers
178 views
Hi,

My keypress event is,

function RowKeyPress(sender, eventArgs) {
                    var keycode = eventArgs.get_keyCode();
                    if (keycode == 13) {
                        var grid = sender;
                        var masterTable = grid.get_masterTableView();
                        var row = masterTable.get_dataItems();
                        var index = sender.get_masterTableView().get_selectedItems()[0]._itemIndexHierarchical;
                        var Code = row[index].getDataKeyValue("Code");
                        if (Code != "") {
                            $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(Code);
                            window.radopen("TelerikListSpecialityMaster.aspx?SpecialityID=" + Code, "SpecialityList");
                        }
                    }
                }
but my Ajaxrequest is not firing on keypress.
Help me.
Thnx in advance
Remya
Top achievements
Rank 1
 answered on 16 Mar 2012
1 answer
86 views

Hi Everyone,

I am trying to implement item level security in my application and i have run into an issue wherein i wish to hide a few of the controls in my grid view. Below are the complete details of my scenario,

I have list named as States which contains the following data

  1. Washington - Item Permissions assigned - Adam has Write permissions
  2. New York - Item Permissions assigned - Charles has Read permissions
  3. Texas - No Permissions assigned to both the users

According the SharePoint object model when i try to fetch all the records, i get the data as per my requirement i.e. Adam is only able to view Washington and Charles is only able to view New York.

Now this data is shown in the gridview which has view,edit buttons against it.

i wish to trim these buttons according to the permissions of the user on the list items. Kindly let me know if there is a way to do it.

I was curious to know whether anyone has knowledge of what does SPSecurityTrimmedControl.PermissionContext property do? Does it apply security triming based on the current list item permission, if so how does it do it. please provide a sample

Regards,

Abhijit Narvekar
Tsvetoslav
Telerik team
 answered on 16 Mar 2012
1 answer
77 views
I want to only delete/update/copy/move on the grid side select not on the treeview node select. is there a way to do that?
Pero
Telerik team
 answered on 16 Mar 2012
3 answers
315 views
Hello,

When someone is using the Rad Editor and tries to add a link to a file whose name includes accented characters, the url gets html encoded.

I used the ASP.NET Editor Demo on your website and used the Upload File dialog of the Rad Editor to upload a PDF whose name included accented characters - çemplatés 2.pdf. I then used the same dialog to add a link to the editor to the file. It came out as this:
<a href="/aspnet-ajax/Editor/Img/UserDir/Marketing/&ccedil;emplat&eacute;s 2.pdf" target="_blank">

My question is why is the file name being html encoded? Shouldn't it be url encoded instead or not encoded at all?

And is there a way to prevent it from being html encoded?

Thanks,
Cameron


Rumen
Telerik team
 answered on 16 Mar 2012
3 answers
115 views
Hello

I have a RadGrid with 3 GridBoundColumn I need to configure the filter of the columns differently.

Ex: column "Awill filter by contain and column "B" will filter by equals.

how to solve it ?. I've tried everything.

thank you
Shinu
Top achievements
Rank 2
 answered on 16 Mar 2012
2 answers
181 views

I have a RadDatePicker and a regular button to generate a postback on my page.

My RadDatePicker is configured so that the DisplayDateFormat of the DateInput is "MMMM, yyyy" which shows month and year when the control does not have focus - which is key to the problem described below.

First, I select a date via the picker, say "23/01/2009"... the box properly displays "January, 2009"... 

Next I click the button which performs a postback.

Now with our 2010.1.519.35 version of the Telerik.Web.UI.dll nothing special happens: the date stays '23/01/2009'.

However, with our 2011.1.315.40 version the date changes to "05/01/2009". It appears that the display text is being parsed upon postback (so 'January, 2009' becomes 05/01/2009 because it uses 05 from the current date 05/03/2012).

Also, when the RadDatePicker is set to AutoPostBack='true' (or when pressing return inside the date field) this does not affect the date like the button does.

I cannot believe this is intended, is it?

S.V. Groeneveld
Top achievements
Rank 1
 answered on 16 Mar 2012
1 answer
133 views
Hello everybody, i have one grid, and here's what i want.
I have one Edit button outside the grid, and when i click on this button, i wanna check if any item has updated, if any does, i will update that on my data table, if's not, doesnt change anything.
I tryed everything is possible and nothings helps me, the last tentative, i try to obtain my data in one foreach, e copy to one dataTable, and compare with the old dataTable, if has any changes, update, ifs not, do nothing. but withoutany success.

Someone knows how can i do that 'impossible' task?
<telerik:RadGrid ID="RadGrid2" runat="server" AllowMultiRowSelection="true" Width="300px"
    OnNeedDataSource="RadGrid2_NeedDataSource" OnInsertCommand="RadGrid2_InsertCommand"
    OnItemCreated="RadGrid2_ItemCreated">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="codigo" CommandItemDisplay="Top"
        EditMode="InPlace">
        <Columns>
            <telerik:GridTemplateColumn>
                <ItemTemplate>
                    <asp:CheckBox runat="server" ID="CheckBox1" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn HeaderText="Código" DataField="codigo" UniqueName="codigo"
                ReadOnly="true" Display="true" ColumnEditorID="GridTextBoxColumnEditor1" />
            <telerik:GridBoundColumn HeaderText="Descrição" DataField="descricao" UniqueName="descricao"
                ColumnEditorID="GridTextBoxColumnEditor1" />
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
</telerik:RadGrid>
<telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" />
protected void btnEditar_Click(object sender, EventArgs e)
{
     // what should i do here? ...
}
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridCommandItem)
    {
        e.Item.FindControl("RefreshButton").Visible = false;
        e.Item.FindControl("RebindGridButton").Visible = false;
    }
}
protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // Atribui dados a grid.
    RadGrid2.DataSource = this.GridSource;
    this.GridSource.PrimaryKey = new DataColumn[] { this.GridSource.Columns["codigo"] };
}
Princy
Top achievements
Rank 2
 answered on 16 Mar 2012
1 answer
106 views
Hi,
 I've created a custom control, say,

public class ImageManager : HtmlGenericControl
    {
        public RadContextMenu ContextMenu { get; set; }
...
}

NO Apsx Form.
I'm trying now to pop this menu. it's been initialized properly
OnLoad shows valid ClientID, but when I'm using that ID as

var menuObjX = document.getElementById("xxxxxxxxxxxx");


there's no show() or showAt() methods they're 'undefined'

why would that be and how could you advise me to go around with ClientID in Client-Side JS without forms (no aspx no <%= %>).

regards,
Max
Max
Top achievements
Rank 1
 answered on 16 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?