Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
85 views
HI 


   I have two login like admin and user.my doubt is when i login as admin the grid want to show hole record in the database but when i login as user it want to show particular record for that user how it ll be done..this is my doubt if somebody give solution for this
Angel Petrov
Telerik team
 answered on 18 Mar 2013
3 answers
105 views
Scenario:
Click on the "W3C" button (XHTML Validator).

Result:
The following error:

Status: 403 ForbiddenVary: RefererContent-type: text/html

W3C Markup Validation Service

Check the markup (HTML, XHTML) of Web documents

Sorry! This document can not be checked.

No User-Agent header found!

Please identify your software properly by providing the HTTP User-Agent string. Default from an underlying library (eg Java, Ruby, Coda, libwww) is not sufficiently unique in identifying your software. A good practice is to include a URI to more information about your service or software.

Valid XHTML 1.0! The W3C Validator Team

Note:
You can check it also in the demo Rad Editor:
http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

It looks like the request format has been changed on the http://validator.w3.org/ side.

Could you please help me to resolve this problem? 

Thank you in advance.
Rumen
Telerik team
 answered on 18 Mar 2013
4 answers
173 views
Hello
this is my first post. Actually whole days i search for smilar thread on the forum but all contents are related 
editor.getSelection().getRange() gives current location of cursor! yes this gives but if press enter contentArea divided and nodes are like
Facebook
Google
innerHTML is like 'Facebook<br>Google' innerText is like 'FacebookGoogle'
so if cursor located to end of 'google'
then $find("RadEditor1").getSelection().getRange().endOffset = 6 and $find("RadEditor1").getSelection().getRange().
startContainer.data='Google'
if content is like  'Facebook Google' then $find("RadEditor1").getSelection().getRange().endOffset = 15 and $find("RadEditor1").getSelection().getRange().startContainer.data='Facebook Google'

i want cursor location gives position for whole content not for current line and if possible i d like to get current node of contentArea nodes which divided by new line or line breaks



Elvis
Top achievements
Rank 2
 answered on 18 Mar 2013
6 answers
144 views
I am trying to find the right way to build a hierarchical grid. I will present a case much like what I want, showing all of the cases that my application will need.

Checklist One
|
+- What is your age?
   |
   +- Age : Under 40
   |  |
   |  +- Do you like cake? (Available answers : Yes, no) (Score: 3)
   |  |
   |  +- Do you like pie? (Available answers : Yes, no) (Score: 3)
   |  |
   |  +- Do you like cake more than pie? (Available answers : Yes, no, equally) (Score: 2)
   |
   +- Age : At or Over 40
      |
      +- Do you like cake? (Available answers : Yes, no) (Score: 3)
      |
      +- Do you like pie? (Available answers : Yes, no) (Score: 3)
      |
      +- Do you like cake more than pie? (Available answers : Yes, no, equally) (Score: 2)
      |
      +- Do you diet often?
         |
         +- Answer : More or less, yes.
         |  |
         |  +- Does your love of cake and/or pie interfere with your dieting? (Available answers : Yes, no) (Score: 1)
         |  |
         |  +- Do you wish you loved cake and/or pie less?
         |     |
         |     +- Answer : It would help, yes.
         |     |  |
         |     |  +- Would you rather love cake or pie less? (Available answers : Cake, pie, both) (Score: 1)
         |     |
         |     +- Answer : No. Dieting is the price I pay to enjoy cake and/or pie.
         |     |
         |     +- Answer : Heck, no! You're crazy for even thinking that.
         |        |
         |        +- Are you offended at the thought of loving cake or pie less? (Available answers : Yes, no) (Score: 1)
         |        |
         |        +- Would you like some cake and/or pie right now? (Available answers : Yes, no) (Score: 1)
         |    
         +- Answer : No, dieting is not something I need or want to do.

Checklist Two
|
+- Do you like coffee? (Available answers : Yes, no) (Score: 3)
|
+- Do you like tea? (Available answers : Yes, no) (Score: 3)

In the above view, you can see that there are multiple types of data.

The first is the root node - I show two, titled 'Checklist One' and 'Checklist Two'. As you can see, one is complex, while the other is simple.There will be multiple root nodes that all have multiple questions of varying depth that descend from them. I would like to have the ability to view multiple root nodes and all of the resulting questions, but my requirements only ask to see one at a time.

The next levels are characterized by questions that lead to further questions, or ending questions. You can see that each has a different structure. 

Some questions may have further child questions. These questions have free-form answers possible and nothing else. These will never be at the root of the tree, but a given answer may terminate as a leaf. Furthermore, they can have no limit to how often one question descends from another. If you look at Checklist One, you can see a case where the non-root/non-leaf nodes go three levels deep before terminating in the end (leaf) questions, and how two free-form answers end with no further child questions. I would like to have as many levels of depth as possible, but it is unlikely that I will see more than three levels, as I have illustrated above.

Some questions never have child questions. These questions have a list of possible answers (yes, no, equally, both, cake, pie) and there is also an associated 'score'. This is entirely different from the questions above, so they will need to display their data differently. These questions are leaves in the tree. They will never be the root, but they may be connected to the root directly. (Look at Checklist Two for an example where there is a root node - Checklist Two - and two leaf nodes - the coffee question and the tea question. There are no middle nodes there.)

In my database, the root nodes are held in one table, the leaf questions are held in another, and the non-root/non-leaf questions are held in a looping parent-child structure in a third set of tables. Of course, I will be presenting the grid(s) with data via LINQ so the table structures themselves are not important, as I can just create anonymous objects to carry my data.

How should I build this grid? It seems that there is both self-referencing and multiple detail tables, but I haven't found a way to mix the two correctly in a RadGrid.
Ken
Top achievements
Rank 1
 answered on 18 Mar 2013
1 answer
62 views
hi,
i've this code:
<telerik:RadListView ID="RadListView1" runat="server" AllowPaging="True"
DataKeyNames="idutente" ItemPlaceholderID="Contenitore" PageSize="8"
Width="700px" OnNeedDataSource="RadListView1_NeedDataSource">
<LayoutTemplate>
<fieldset style="width: 700px; border:0px; background-color: #FFFFFF; background-image: none;" id="FieldSet1">
<div id="Contenitore" runat="server">
</div>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<div class="item-sponsor">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' CssClass="img"/>
<span class="name"> <%# CType(Container.DataItem, PropertyUtente).utente%> </span>
<span class="title"> <%# CType(Container.DataItem, PropertyUtente).Desccategoria%></span>
</div>
</ItemTemplate>
</telerik:RadListView

and i wolud that i can click on every field that i see and start a redirect with the value datakyesname...it's possible?

bye
Daniel
Telerik team
 answered on 18 Mar 2013
5 answers
201 views
Hello,

    I'm trying to bind an array of Provincia class objects to the RadComboBox. 

this.ProvinciaRadComboBox.DataSource = DiccionarioDatos.provincias; // Provincia[]
this.ProvinciaRadComboBox.DataTextField= "nombre";
this.ProvinciaRadComboBox.DataBind(); //<---the error is raised here

But when I run the follow error is raised:

Object of type assembly1.Provincia does not have a nombre property

And of course the Provincia class is public, and it has the public string property nombre. The class is defined in a different assembly, but with the reference added to it and also the using.

What I'm doing wrong?

Thanks in advance.
Boyan Dimitrov
Telerik team
 answered on 18 Mar 2013
1 answer
259 views
In my application, when a user clicks on an item in the RadListview, I want a clientside JavaScript function to be called (similar to onclientclick in an asp.net control).
How would I call a client side JavaScript function when "RadListView1_SelectedIndexChanged" event is triggered ?
Angel Petrov
Telerik team
 answered on 18 Mar 2013
1 answer
61 views

Hi all

I have a problem with an Telerik Grid.
Until I can editing direct in the Grid (with AJAX), i have the following problem:
If i’ll editing all data from a line, i go to a editing window with this command:

columns.Command(commands =>
        {
            commands.Custom("editDetail")
                .ButtonType(type)
                .HtmlAttributes(new { @class = "editDetail" })
                .Text("edit")
                .DataRouteValues(route => route.Add(o => o.GeschaeftID).RouteKey("GeschaeftID"))
                .Ajax(false)
                .Action("Edit", "Geschaeft");
        }).Width(38).Title("");

When i finished with the editing, i get back to the site with the Grid.
And now i‘ve lost all filters and sortings.
If i don’t need the AJAX for edting direct in the Grid i don’t loosing the filter and sortings.
I guess the problem ist by the AJAX.
Do you have an idea, what to do that i don't lose the filters and sortings when i using AJAX?

This is my Code:


@(Html.Telerik().Grid<Model>()
    .Name("Grid")
    .DataKeys(keys => keys.Add(c => c.GeschaeftID))
    .ToolBar(commands => { commands.SubmitChanges(); })
    .DataBinding(dataBinding =>
            dataBinding.Ajax()
                .Select("_Index", "Geschaeft")
                .Update("_SaveBatchEditing", "Geschaeft")
    )
    .Columns(columns =>
    {
        columns.Command(commands =>
        {
            commands.Custom("editDetail")
                .ButtonType(type)
                .HtmlAttributes(new { @class = "editDetail" })
                .Text("edit")
                .DataRouteValues(route => route.Add(o => o.GeschaeftID).RouteKey("GeschaeftID"))
                .Ajax(false)
                .Action("Edit", "Geschaeft");
        }).Width(38).Title("");
        columns.Bound(o => o.xy)
            .ClientTemplate("<#=xy? 'ja' : 'nein' #>")
            .Title("A")
            .HeaderHtmlAttributes(new { title = "xy" })
            .Width(12);
        columns.Bound(o => o.xz)
            .Width(84)
            .Title("xz")
            .ReadOnly()
            .ClientTemplate("<#=xz#>");
        columns.Bound(o => o.xf)
            .Title("xf")
            .Width(250)
            .ReadOnly();
    })
    .DetailView(details => details.ClientTemplate(
        Html.Telerik().Grid<Model>()
        .Name("V")
        .Columns(columns =>
        {
            columns.Bound(o => o.vx)
            .Width(90)
            .Title("vx")
            .ReadOnly();
            columns.Bound(o => o.vz)
            .Title("vz")
            .ReadOnly();
        })
        .DataBinding(dataBinding => dataBinding.Ajax()
                .Select("_DetailViewAjax", "Geschaeft", new { geschaeftID = "<#= GeschaeftID #>" }))
        .ToHtmlString()
    ))
    
    .ClientEvents(events => events
        .OnDataBinding("Grid_onDataBinding")
        .OnError("Grid_onError"))
        .Editable(editing => editing.Mode(GridEditMode.InCell))
     .Scrollable(scrolling => scrolling.Enabled(false).Height("auto"))           
     .TableHtmlAttributes(new { style = "table-layout = fixed" })
        .Resizable(resizing => resizing.Columns(true))
        .Sortable()
        .Filterable()
        .Groupable()          
        .Pageable(paging =>
            paging
                .PageSize(ViewBag.PageSize)
                .Style(GridPagerStyles.Status)
                .Position(GridPagerPosition.Bottom)
        )
    )

Petur Subev
Telerik team
 answered on 18 Mar 2013
16 answers
203 views
I am starting to use the rotator control. But cant seem to make it stretch horizontaly when the user resizes the browser horizontaly.

I have the rotator width="100%" but when I grab the side of the browser to make it wider or narrower, normaly all my div's resize and stretch but now with the rotator it seem that the rotator does not resize at all with them.

is there a work around?
Slav
Telerik team
 answered on 18 Mar 2013
3 answers
166 views

I want my GridCheckBoxColumn on insert is visible=false
But in EditMode i want the GridCheckBoxColumn  visible=true

How do i that?

 

 

 

Kostadin
Telerik team
 answered on 18 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?