Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
143 views

From your demo http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipzoneid/defaultvb.aspx

 

 

  <div class="demo-containers" id="container1">
        <div class="demo-container">
            <h2>
                Tooltipified links in the "container1" zone
            </h2>
            <telerik:RadToolTipManager runat="server" AutoTooltipify="true" ID="RadToolTipManager1"
                ToolTipZoneID="zone1" RelativeTo="Element" Width="150px">
            </telerik:RadToolTipManager>
            <div id="module">
                Lorem ipsum dolor sit amet,

 

In the code there is no element defined as "zone1". What is the user there, I don't understand.

I want to tooltiptify a radslider but cannot succeed in this.

Marc

Ianko
Telerik team
 answered on 03 Aug 2015
1 answer
48 views

From 2 monts ago i´ve developing with this framework or suite package telerik, while i was program some aspx pages i founded some stop times for get or mapping the radcontrols from javascript file my great reason for write this post !! 
for mapping a control on our javascript we have put the next propertie ClientIDMode="Static" like

<telerik:RadTimePicker ClientIDMode="Static" DateInput-DateFormat="HH:mm:ss" Style="position:absolute; top:220px; left:500px" ID="_dtpMonthlyHour"  runat="server">
  </telerik:RadTimePicker>

and our javascript file mike this //.
var _dtpMonthlyHour=$telerik.findDatePicker("_dtpMonthlyHour");
with this line of code we can get all we want about this radControl !!

Vessy
Telerik team
 answered on 03 Aug 2015
1 answer
112 views

From 2 monts ago i´ve developing with this framework or suite package telerik, while i was program some aspx pages i founded some stop times for get or mapping the radcontrols from javascript file my great reason for write this post !! 

for mapping a control on our javascript we have put the next propertie ClientMode="Static" like

<telerik:RadTimePicker ClientIDMode="Static" DateInput-DateFormat="HH:mm:ss" Style="position:absolute; top:220px; left:500px" ID="_dtpMonthlyHour"  runat="server">
  </telerik:RadTimePicker>

 

and our javascript file mike this //.

var _dtpMonthlyHour=$telerik.findDatePicker("_dtpMonthlyHour");

with this line of code we can get all we want about this radControl !!

Vessy
Telerik team
 answered on 03 Aug 2015
2 answers
74 views

Scenario:

1. Change Editor to the "HTML" mode.

2. Paste the following text:

<span class="button primary">
<span style="color: red">
test
</span>
</span>

3. Change to the "Design" mode.

4. Change to the "HTML" mode.

Actual Result:

<span class="button primary" style="color: red;">
test
</span>

 

Two <span> tags merged into the one. Is it expected?​

Denis
Top achievements
Rank 1
 answered on 03 Aug 2015
8 answers
535 views
Hi everyone,

Sorry if such question has already been asked, but i cant find a topic that helps me completely.

First of all, Im using a RadGrid with most of the grid functions (Sorting, Paging, Grouping and Filtering). Im populating my grid with data coming from my database (as a ObservableCollection<Class>) through the page's code-behind, columns are auto-generated (nothing special so far). Note that my grid's EnableViewState="False".

The first problem i encountered was i had to use the OnNeedDataSource property (which i added), otherwise i was losing my grid data content when using the sorting and such. I then noticed that OnNeedDataSource was always requesting my database so I created a ViewState variable that will contain my collection variable in order to save those database round-trips (for each sorting, page change, etc.). The approach i chose was to only create a ViewState on the first grid function (ex: first time we do a sort). The reason is because most of my users wont do grid functions at all (so for those users, Viewstate wont be used at all). I accomplished this by adding some handlers (OnItemCommand, OnGroupsChanging) that create the ViewState if it doesnt exist already (OnNeedDataSource checks also for it).

Everything seemed to work as expected until i noticed that one grid function seemed to be failing at random occasion: playing with the expendable/foldable rows (when header(s) are grouped). The only way i could fix this was by adding the EnableViewState="True" to the grid, but now i end up with 2 ViewState per grid...which i dont really like.

My questions:
1-Is it normal that I depend on the EnableViewState="True" for expendable/foldable rows (where all other functions work with my "custom" Viewstate?)
2-Can that second "auto-generated" Viewstate (EnableViewState="True") be used to do the job of the first one? If yes, how can we access it?
3-Is there a way to force the OnItemCommand and OnGroupsChanging handlers to be fired before OnNeedDataSource? Having this would save me a round-trip.
4-Do you propose a better way to save the database round-trips?
5-I was wondering if it is a best practice to manually clear Viewstate variable that we create ourselves (when page quits/redirect)? If yes, any example?
6-Do you think letting the grid asking the database everytime would be less load on the server than 2 Viewstates?

Here are snippets of my code i have so far:
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="5" Width="75%"
                AllowSorting="True" AllowFilteringByColumn="True"  AllowMultiRowSelection="True" AllowPaging="True"
                ShowGroupPanel="True" GridLines="None" AutoGenerateColumns="True" ShowFooter="True"
                OnItemCommand="testcomm" OnGroupsChanging="testgroup" OnColumnsReorder="testreorder"
                OnNeedDataSource="RadGrid1_NeedDataSource" 
                Skin="WebBlue" EnableViewState="True" >
                
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
 
                    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        <Resizing AllowColumnResize="true" />
                    </ClientSettings>
 
                    <GroupingSettings ShowUnGroupButton="true" />
 
                </telerik:RadGrid

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        ObservableCollection<PersonDTO> col = new ObservableCollection<PersonDTO>();
 
 
        if (ViewState["RadGrid1_DataSource"] != null)
        {
            col = (ObservableCollection<PersonDTO>)ViewState["RadGrid1_DataSource"];
      
        }
        else
        {
 
            col = GridDataSource2();
 
        }
 
        RadGrid1.DataSource = col;
 
    }
 
 private void LoadViewState()
    {
        ObservableCollection<PersonDTO> col = new ObservableCollection<PersonDTO>();
 
        if (ViewState["RadGrid1_DataSource"] == null)
        {
 
            // collection isn't in view state, so we need to load it from scratch.
            if (RadGrid1.DataSource == null)
            {
                col = GridDataSource2();
            }
            else
            {
                col = (ObservableCollection<PersonDTO>)RadGrid1.DataSource;
            }
 
            if (col != null)
            {
 
                ViewState.Add("RadGrid1_DataSource", col);
 
            }
        }
    }
 
    protected void testcomm(object o, Telerik.Web.UI.GridCommandEventArgs e)
    {
        LoadViewState();
    }
 
    protected void testreorder(object o, Telerik.Web.UI.GridColumnsReorderEventArgs e)
    {
        LoadViewState();
    }
 
    protected void testgroup(object o, Telerik.Web.UI.GridGroupsChangingEventArgs e)
    {
        LoadViewState();
    }


Thanks...and sorry btw for the long post but i wanted to make everything clear.
Angel Petrov
Telerik team
 answered on 03 Aug 2015
1 answer
82 views

I create string variable "onEditUser" to be filled with a cell value (Label) when "Edit" command is fired. It is assigned correctly when The Edit button is clicked but when OnItemCommand() is recalled to perform Update Command, the variable assignment is removed and onEditUser become null.

Is there any help why this occurs, and what is the solution? (I need to use this variable in another method)

public partial class EditUsers : System.Web.UI.Page
{
string onEditUser;
    public void GridItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.UpdateCommandName || e.CommandName == RadGrid.PerformInsertCommandName)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RadComboBox userTypecombo = (RadComboBox)item.FindControl("UserTypeRadComboBox");
            string userType = userTypecombo.SelectedItem.Text;
            SqlDataSource1.InsertParameters["UserType"].DefaultValue = userType;
            SqlDataSource1.UpdateParameters["UserType"].DefaultValue = userType;
        }
        if (e.CommandName == RadGrid.EditCommandName)
        {
        GridItem item = e.Item;
        Label userNameLB = (Label)item.FindControl("UserNameLabel");
        onEditUser = userNameLB.Text;
        }
    }

Eyup
Telerik team
 answered on 03 Aug 2015
1 answer
100 views

Hi,

I am using the Advanced Template for my appointment and the form contains a buttons with command names of "Insert" and "Update". I can successfully trigger these events and everything works well as long as the user enters all valid information. The command event code behind contains a lot of server-side validation.

If the validation fails at any point, the validation displays the appropriate error messages on the screen as expected. However, the advanced form closes and the day view calendar reappears. Is is extremely annoying to my users as they have entered a lot of information. They then have to recreate the entire appointment all over again.

Is there a way to cancel the event so that the advanced for stays on the page? There does not seem to be an e.Cancel setting as there is in the FormCreating event and I have searched the forums as well as google in general without locating a solution.

Thanks

Plamen
Telerik team
 answered on 03 Aug 2015
1 answer
91 views
How do i call a jquery function when the user hovers over a cell in the gridview? I can't seem to find any events supported in the control itself. please help.
Eyup
Telerik team
 answered on 03 Aug 2015
2 answers
82 views

Hi,

i tried to make a  gallery like this link

http://demos.telerik.com/aspnet-ajax/lightbox/examples/client-data-source-binding/defaultvb.aspx?show-source=true​

 but i can't.

i think this code is not complete or need something more then this code on this page.

 

i want load picture from database and bind on listview and then when i click on picture show lightbox like sample of this code

I 've uploaded the project . you can download it from this link : http://s000.tinyupload.com/index.php?file_id=38114169756156525387

FilesName: lightbox.zip
Filesize: 23.638 MB

 

please help me to complete my source code.

thank you

Eyup
Telerik team
 answered on 03 Aug 2015
4 answers
81 views

Hi,

 

When I'm setting the "GridType" property to "Fluid", it isn't fitting the full width on Chrome.

It works as expected on IE8 but not with Chrome, I always have a left and right margin.

 

Is there a way to fix this issue ?

 

Thanks, Rémi.

Rémi
Top achievements
Rank 1
 answered on 03 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?