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

I have a RadMultiPage with several pageviews, each of which is tied to a specific tab in a RadTabStrip. When the page loads I programmatically determine which tabs are accessible, and hide the rest. I then iterate over the pageviews in the associated RadMultiPage to mark them visible if the tab is also visible. Once that's done I check if there are any visible tabs, and if there are I set the selectedindex of both the tabstrip and the multipage to 0.

The tabs are showing/hiding correctly, but the multipage pageviews are not. If the first tab/pageview is not visible the tab is gone, but the pageview still shows. If I set all of the pageviews to visible=false but leave the tabs visible I can click through all the tabs and their pageviews load which is not what I expect.

If a control is set to "Visible=false" I would expect it to be completely removed from the server side and have no possibility to render. Why is this not happening? Here's some of the relevant code:

<telerik:RadTabStrip ID="tabs" runat="server" MultiPageID="pages" AutoPostBack="true" ShowBaseLine="true" Align="Right">
<Tabs>
<telerik:RadTab Text="Tab1" PageViewID="Page1" Value="Tab1" Visible="false" />
<telerik:RadTab Text="Tab2" PageViewID="Page2" Value="Tab2" Visible="false" />
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="pages" runat="server" RenderSelectedPageOnly="true">
<telerik:RadPageView ID="Page1" runat="server">
...

tabs.FindTabByValue("Tab1").Visible = HasPermission("Tab1");
tabs.FindTabByValue("Tab2").Visible = HasPermission("Tab2");
...
foreach (RadTab tab in tabs.Tabs)
{
pages.FindPageViewByID(tab.PageViewID).Visible = tab.Visible;
}
if (tabs.Tabs.Count(x => x.Visible) > 0)
{
tabs.SelectedIndex = 0;
pages.SelectedIndex = 0;
}

 

Chad
Top achievements
Rank 1
 answered on 08 Oct 2013
0 answers
98 views
Hi,

As a Telerik newbie, I'd like to seek some wisdom on RadGrid implementation. I have a single ASP.NET page that is structured with two custom user controls: one for getting user inputs and another for displaying results based on inputs. The custom controls look like the following:

// ctrlInput.ascx.cs
// consists of several controls (dropdown lists, checkboxes and a submit button)
  
public event EventHandler BtnClickEvent;
protected void Btn_Click(object sender, EventArgs e)
{
    BtnClickEvent(this, e);
}

//ctrlRadGrid.ascx.cs
//display result table based on ctrlInput values
  
public event EventHandler MyGridNeedDataSource;
          
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    MyGridNeedDataSource(this, e);
}

When user makes proper selection on ctrlInput and then click on submit button, BtnClickEvent will be raised to the containing aspx page, which looks like this:

// MyPage.aspx.cx
  
protected void Page_Init(object sender, EventArgs e)
{
    ctrlInput1.BtnClickEvent += new EventHandler(Foo_btnClickEvent);
    ctrlRadGrid1.MyGridNeedDataSource += new EventHandler(myGrid_NeedDataSource);
}
          
protected void Page_Load(object sender, EventArgs e)
{
    // toggle panel visibility
    if (!IsPostBack)
    {
        pnlInputs.Visible = true;
        pnlResults.Visible = false;
    }
    else
    {
        pnlInputs.Visible = false;
        pnlResults.Visible = true;              
    }
}
          
protected void myGrid_NeedDataSource(object sender, EventArgs e)
{
    if (ViewState["MyParams"] != null)
      {
         myGrid.DataSource = GetData(ViewState["MyParams"]);
      }
}
          
protected void Foo_btnClickEvent(object sender, EventArgs e)
{
    var ctrl = (ctrlInput)sender;
      ViewState["MyParams"] = ctrl.InputParams;
}
 
private DataTable GetData(string param)
{
    //DONE: call stored procedure with param
}

When myGrid_NeedDataSource fires for the first time, there's nothing to pass to GetData because Foo_btnClickEvent, which contains user's inputs, is always fired "afterwards". Can someone please shed some lights on how to achieve this or even suggest a better design/implementation?

Thanks in advance,


 



Archen
Top achievements
Rank 1
 asked on 08 Oct 2013
2 answers
101 views
how to proceed with an element RadSocialShare radlistview fed on the client side with JSON?
Marco Antonio
Top achievements
Rank 1
 answered on 08 Oct 2013
3 answers
148 views
Hello,

I am using:
  • RadControls for ASP.NET v. 2013.2.717.40
  • .NET Framework 4.0
  • Windows 7 Enterprise 64-bit
  • Visual Studio 10
  • IE 9 and Firefox 24

I am trying to create an application based on the Window - RadWindow and MDI.  So far, most everything is working as it should.  The problem is that the Minimize button on each of the RadWindows does not work properly.  Sometimes it works one time only if I click it right after opening a RadWindow, then it stops working all together.

I try to post an example application but your online demo has this problem as well.

Is there a fix for this problem?

Thanks,
Randall Price
Senior Developer
Virginia Tech
Randall
Top achievements
Rank 2
 answered on 08 Oct 2013
12 answers
277 views
Hello,

I have a TabStrip with a scheduler inside each Tab.  On FormLoad I load the info inside each Scheduler.
It seems that when a Scheduler is inside a Tab, all the appointments have Width: 0px, except for the tab that is selected.
If I change Tabs and refresh, the appointments will show, but will disappear in the other Tabs.

You can look at examples attached.

Thank you,

Jeremy
Plamen
Telerik team
 answered on 08 Oct 2013
1 answer
1.2K+ views
i'm setting the scroll area of the radgrid dynamically on gridcreated:

               var heightResolution = screen.height;
                var screenHeight = heightResolution - (heightResolution * 0.40);

                $get("content").style.height = screenHeight;

                var scrollArea = sender.GridDataDiv;

                scrollArea.style.height = screenHeight + "px";

is there any way to do something similar with the drop down portion of the radcombobox?

I'd like to set the height to a specific percentage of the page based on user's resolution.
Hristo Valyavicharski
Telerik team
 answered on 08 Oct 2013
2 answers
81 views
Hi

I migrated my application from .NET 1.1 to 3.5. We are using Rad Editor. After migration we are getting following error. 

'xhtml' is not a member of 'Telerik.Web.UI.RadEditor' - Please let me know any additional references we need add? 

Thanks and Regards 

Manivannan Nandagopalan

Manivannan
Top achievements
Rank 1
 answered on 08 Oct 2013
2 answers
324 views
I've got my DatePicker (and calendar and input), but it doesn't work with this "yyyyMMdd" format. It works with spaces or characters between, but not all together. Why not? When I try to use this format and pick a date from the calendar, the input part gives me the little warning sign. Some relevant code:

<telerik:RadCalendar runat="server" ID="RadCalendar"/>
<telerik:RadDatePicker runat="server" ID="rdpRequestDate" SharedCalendarID="RadCalendar">>
      <DateInput DateFormat="yyyyMMdd" DisplayDateFormat="yyyyMMdd" />
</telerik:RadDatePicker>
J
Top achievements
Rank 1
 answered on 08 Oct 2013
5 answers
284 views
I can't seem to get the export to excel button to work in internet explorer version 9.0.8112.16421, both with and without ajax. Clicking the export button does not produce any download prompt, nothing happens at all. Writing a separate button to call the export in code-behind doesn't work either. Even the demo does not work. Tried visiting http://demos.telerik.com/aspnet-ajax/grid/examples/export/biffexport/defaultcs.aspx and clicking on the export button, no dice.

Seems to occur only for IE version 9.0.8112.16421 (that's the version on my pc). No problem for IE version 8, or chrome or fire fox or opera (working well). Anyone experiencing the same issue? Is this an IE specific bug, specific to this version? Any fix for this?

Thanks for reading
Joey
Top achievements
Rank 1
 answered on 08 Oct 2013
3 answers
163 views
Hi, I have a currency value column in a radgrid, and exporting to excel using this function for formatting the currency cells

        protected void RadGrid_OnExportCellFormatting(object sender, ExportCellFormattingEventArgs e)
        {
            if (e.FormattedColumn.DataType == typeof (long))
            {
                e.Cell.Style["mso-number-format"] = "Currency";
            }
       }

This is based on advice in another post in this forum. Works very well, but it doesn't format the footer item which is an aggregated sum value. How do I format the footer to be currency as well?

Thanks for reading
Joey
Top achievements
Rank 1
 answered on 08 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?