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

How can I changed the weekend days of the calendar?

The default weekend days are - Saturday and Sunday. I need to change them to be - Saturday and Friday.

I tried to define culture info:

        Dim culture As New CultureInfo("he-IL")    
        culture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Sunday
        culture.DateTimeFormat.CalendarWeekRule = CalendarWeekRule.FirstFullWeek
        Calendar.CultureInfo = culture

 

I tried to change the weekend days on day render event:

    If e.Day.Date.DayOfWeek.Equals(DayOfWeek.Saturday) Or e.Day.Equals(DayOfWeek.Friday) Then
            e.Cell.CssClass = "rcWeekend rcDisabled"
        Else
            e.Cell.CssClass = ""
        End If

 

But the class is being override and changed to Saturday and Sunday is "rcWeekend "

 

Maria Ilieva
Telerik team
 answered on 08 Dec 2015
6 answers
566 views

I have an aspx page with RadTab (5 tabs) and RadMultiPage.

Each tab has a RadGrid which only binds (declaritively with DataSourceId) if its MultiPage is loaded.  If the user never clicks on tab 4 then the RadGrid4 never databinds.

That is good because it allows me to on_demand/lazy load the child collections on the business object that is driving the screen. The user only has to wait for the data they are interested in.  If they only visit Tab1 then only MainObject.ChildCollection1 lazy loads.  Nice and clean.

Business object is like this:

MainObject

   - ChildCollection1 (lazy load) - corresponds to Grid1

   - ChildCollection2 (lazy load) - corresponds to Grid2

...etc.

PROBLEM:  If user loads page and visits Tab1 and performs some db update on Grid1...then I have to reload MainObject after save.  Currently then I call Rebind() on all 5 grids.  This is expensive and the user may not have ever visited the other tabs.  Is there a way I can:

1.  Detect which grids have databound and only call Rebind() on those?

2.  Even better would be if I could "reset" the grid somehow so it doesn't think it has databound yet?

If there is a way to do #2 then I could only call Rebind() on the RadGrid that .Visible = True.

 

Something like this:

1. User performs some update that cause MainObject to reload from DB.

2. Detect which grid is currently visible and call Rebind on it

3. Reset all other grids so they think they have not databound yet

4. If user clicks on another tab after this...the corresponding RadGrid calls SelectObject on DataSource like normal

 

All updates are happening from RadAjaxPanel which contains tabs/multi-page/and grids

 

Thank you for your help.

Sean

 

 

Viktor Tachev
Telerik team
 answered on 08 Dec 2015
2 answers
415 views

Hello,

I have a grid that has a "GroupByExpression" that aggregates the sum of a particular column per grouped item.  This works just fine and I can make it so that the footer text displays something like "Total: 100".  However, the grid itself also has a footer that displays the total of all of the group totals at the very end.  I'm trying to figure out how to change the footer text for this footer value so that it's different from the other grouped footer texts (i.e Total Filters: 200).  In other words, I want the footer text for the subtotals to be different from the footer text for the Grand total.  Is this possible?  If so, then how can I do this?

 Thanks.

Viktor Tachev
Telerik team
 answered on 08 Dec 2015
1 answer
70 views

I have 2 RadGrids on the page one above the other

I use data entity for data source and The first RadGrid  data source is this

protected void RadGrid1_NeedDataSource(object sender, Web.UI.GridNeedDataSourceEventArgs e)
        {
            var result = from r in DbContext.LinkAnalysis
                         where r.LinkAnalysisCreator == dbuser
                         select r;
            RadGrid1.DataSource = result.ToList();
        }
 

The second Rad Grid Data source is this

 

protected void SubjectRadGrid_NeedDataSource(object sender, Web.UI.GridNeedDataSourceEventArgs e)
       {
            
           var results = from r in DbContext.Subjects
                         where r.LinkAnalysisId == linkId
                         select r;
           SubjectRadGrid.DataSource = results.ToList();
 
 
       }

When the page first loads the SubjectRadGrid shows no records.  This is okay but when a user clocks on one of the row in the RadGrid1 I want SubjectRadGrid to display the child objects for the selected row.

I obtain the "linkId" variable for the second RadGrid using this code

public void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridDataItem item = (GridDataItem)RadGrid1.SelectedItems[0];
            string ID = RadGrid1.SelectedValue.ToString();//Retrieving primary key field values for selected items
            linkId = Convert.ToInt16(ID);
 
            SubjectRadGrid.Rebind();
        }

This works works and if I place a break point in the SubjectRadGrid_NeedDataSource code I can see the data, during the Rebind, I need is being pulled.  But no data still does not show up in the SubjectRadGrid.

What am I missing here?

Viktor Tachev
Telerik team
 answered on 08 Dec 2015
1 answer
131 views

Hi,

I would like to build a multi-month calendar, with initially max. 3 columns and as many rows as needed for a given period. That in itself can be accomplished with the MultiViewRows and MultiViewColumns properties of RadCalendar.

However, I would like the calendar-grid to behave 'responsive'. So when the available horizontal space gets narrower than needed for the 3 columns, I would like the calendars that don't fit in the availabel space anymore to 'wrap' to the next line.

Is that possible? And if so, how can it be achieved?

Best regard, Marja Ribbers

Konstantin Dikov
Telerik team
 answered on 08 Dec 2015
21 answers
244 views
The RadMaskedTextBox does not work properly with the stock android mobile browsers or Chrome for android. Any plans to fix this?

Charles
Marin
Telerik team
 answered on 08 Dec 2015
1 answer
120 views
Hi all,

Please help me to solve the attached issue.
Issue is dropdown list items box getting stick while scrolling and overlapping on other controls.
Viktor Tachev
Telerik team
 answered on 08 Dec 2015
3 answers
180 views

Hello, i'm new to this forum..

I have a question: I would like to know how pass data to EditForm.ascx during itemcommand event?

in the code below you can see what i'm trying to do

 

if (e.CommandName == RadGrid.InitInsertCommandName)
        {
            e.Canceled = true;
            GridKASKO.EditIndexes.Clear();

            e.Item.OwnerTableView.EditFormSettings.UserControlName = "~mypath\\InsertTax.ascx";
            // I WANT TO PASS a VALUE INTO InsertTax.ascx
            e.Item.OwnerTableView.InsertItem();
        }
        else if (e.CommandName == RadGrid.EditCommandName)
        {
            e.Item.OwnerTableView.IsItemInserted = false;
            e.Item.OwnerTableView.EditFormSettings.UserControlName =  "~mypath\\EditTax.ascx";
        }

Thanks in advance,

Eyup
Telerik team
 answered on 08 Dec 2015
9 answers
520 views

I have a RadTabStrip paired with a RadMultiPage.  The RadPageViews are created dynamically in the OnDataBinding event of the RadTabStrip.  Everything is working fine except when the tabs have spaces (or other special characters) in their titles.  When I click on those particular tabs, I examined the rendered html for the RadMultiPage -- what happens is that the "class=rmpHiddenView" is not removed from the div representing the page view (at this point the other tabs have this CSS class applied plus the inline style "display:none").  When I click on the tabs without spaces in their names, everything works -- that class is removed (and the inline style "display:none" is also removed).

This is the markup:
<telrik:RadTabStrip runat="server" ID="uiTabs" DataSource="<%#this.RetrieveSubpageData()%>"
    OnDataBinding="uiTabs_OnDataBinding" MultiPageID="uiPages"
    SelectedIndex="0" DataTextField="PageTitle">
</telrik:RadTabStrip>
<telrik:RadMultiPage runat="server" ID="uiPages" SelectedIndex="0">
</telrik:RadMultiPage>

Here is what the rendered html looks like after I click on the third tab:

Note that in this picture, I'm URL encoding the id of the RADPageView when I set it in my codebehind, but I get the same result when I don't URL encode it.
Ivan Danchev
Telerik team
 answered on 07 Dec 2015
1 answer
270 views
I have a custom edit form let's call it UserControlForm.ascx. When the user control form loads, I have a dropdown list that I need to pre-populate with data based on some other key values from another row(any row) on that grid(Grid1). I've seen the documentation on how to reference the edited row if the grid is in edit mode, but haven't found anything on how to get values from other rows.
Eyup
Telerik team
 answered on 07 Dec 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?