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

Hello,
I am currently working with the RadListView components.

I am trying to make a textbox visible or not from the result of a preceding textbox.


if tb1.text = “CE”

then tb2.visible = false


Currently I am having null pointer exception returns.  The problem is that by the standard methods of binding the result to a String returns an object and not a string (even with the .ToString() argument). How can i resolve this problem?



Thank you for your understanding
Shinu
Top achievements
Rank 2
 answered on 18 Aug 2011
2 answers
163 views
Hello,
I have multiple ragrids in a table and I would like to export them in one PDF.
i saw this exemple : http://www.telerik.com/community/code-library/aspnet-ajax/grid/export-multiple-radgrids-in-single-pdf-excel-file.aspx
but I'm not sure it will work for me: My grids don't have the same column names, and iwhen i tried inserting the gridWrapper, i did'nt have access to any of my grids server-side.

Do you have an idea of how could i do it?
Thank you
Shirya

this is how i populate one of  my radgrids(it is practically the same for all): That is why i need to have access to them
 
'Retreive the list of functions in my DB then :
 
        If FunctionList.Count <> 0 Then
            Me.RadGridFunctions.DataSource = FunctionList
        Else
            Me.RadGridFonctions List(Of Fonction)
        End If
 
        Me.RadGridFunctions.DataBind()
Daniel
Telerik team
 answered on 18 Aug 2011
1 answer
294 views
Hi all,
I have used aspButton to open RadWindow , it's work success
but i used radButton to open RadWindow, it's can open but immediately auto close
Please give me solution on this problem.why rad window auto close with rad button.
TKS~
<head
    <title></title
    
    <script type="text/javascript"
    
        function openWin() { 
    
            window.radopen("Default5.aspx", "UserListDialog"); 
            return false; 
        
    
    </script
    
</head
<body
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="sc1" runat="server"
    </telerik:RadScriptManager
        
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
        <Windows
            <telerik:RadWindow ID="UserListDialog" runat="server" Height="320px"
                Width="550px" Left="150px" 
                /> 
        </Windows
    </telerik:RadWindowManager
    <asp:Button ID="aspButton" runat="server" Text="aspButton" /> 
    <telerik:RadButton ID="radButton" runat="server" Text="radButton" /> 
    </form
</body>

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
       If Not IsPostBack Then
           Me.aspButton.Attributes.Add("onclick", "return openWin();return false;"
           Me.radButton.Attributes.Add("onclick", "return openWin();return false;"
       End If
   End Sub
Shinu
Top achievements
Rank 2
 answered on 18 Aug 2011
1 answer
112 views
Right now I'm using the default export to CSV which maintains my field types when I open the file in excel, ie, currency stays as currency and percent as percent. What I want to do is export the grid with the headings it has also and still maintain type.

Is this possible with export to CSV?
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Aug 2011
2 answers
73 views
Hi Friends,

I am very new to Telerik control.

I have a task to populate two radgrids. the scenario is

1)  On load the first grid say (RoomGrid) populates Room names of a school ie from 1 to 10 with Id, Roomname and Description

1-Room1-Descritpion1
2-Room2-Description2
.
.
.10-Room10-Description

So when I click on a particular row the second grid say studGrid should be populated with StudId, StudName in that room.

I dont want postback to happen when I click on the row as i will be opening a radwindow on doubleclicking RoomGrid.

So If I use selectedIndexChanged event the page will reload(postback) and doubleclick fails.

Can anyone help me how to do this? or any sample code? Very urgent Please

Thanks in Advance
Balaji





Balaji
Top achievements
Rank 1
 answered on 18 Aug 2011
1 answer
204 views
hi

I have a grid with paging enabled and viewstate is set to True and i have set a breakpoint at the NeedDdataSource. What happened is that whenever i click the page number on the grid it goes into breakpoint and it would ran through the code again.

There is some performance issues here if i have many rows of records.

Since i know the dataset has been filled with data, how do i code it so that there is no need to go through that code everytime i do a paging on the grid? thanks and sorry for the inconvenience caused.

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource

Dim ds1 As New DataSet
ds1 = dsDemo("demo","demo")
RadGrid1.DataSource = ds1.Tables(0).DefaultView

End Sub


Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Aug 2011
0 answers
108 views
First of all, please see the attached file, file name is "upload problem final".
I created controls.
I worked well, but there are something wrong as the attached file.
Please tell me why most of upload controls are disappeard?
The massage of error is as below...

Also, if you know how to bind multi files on upload controls from data base.
Please let me know how to do it... Please help me...

thanks all,,,, Have a great day...
 

Error :

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC EA 2)
Timestamp: Thu, 18 Aug 2011 04:00:16 UTC

Message: Sys.InvalidOperationException: A control is already associated with the element.
Line: 6580
Char: 49
Code: 0
URI: http://server1:9001/ScriptResource.axd?d=kWGs-RUk2zQKppldQIv5LEL-ZbidAjrVVoqsnTFQktf3_jYqeTWWcpOKfkyQ2k1ZwQY0SbG6gXq1eT68DL9beP5qF61LX4SPvyQFZ0ykAIj1wlyuze_fEG9W1DziucrZWPHju4oLYbjd_H_O7J_8O5F4pU_h4qybXdbqYJ5qrlgYfo5f0&t=ffffffffdca79b6e

 

dongchul
Top achievements
Rank 1
 asked on 18 Aug 2011
1 answer
73 views
Hi

Question1: I was under impression that Grid control by default used Ajax features, and any action on grid will produce ajax like behaviour as seen in demos.  but I observe that it does postbacks.   what i am missing.

Question2: I am using following code in Page_Load Event to bind datasouce to grid,
if (!Page.IsPostBack)
          {
              MembershipUserCollection uc = Membership.GetAllUsers();
              RadGrid1.DataSource = uc;
              RadGrid1.DataBind();
               
          }

Then while running code, when I select filter the grid goes blank.  I understnad that on postback DataSource is lost, so
1. Is there a filter event where i can assing DataSource back to grid.
2. I would prefer, if there is a way to do filter at client-side itself.

Regards

Princy
Top achievements
Rank 2
 answered on 18 Aug 2011
1 answer
465 views
Hi, I have a RadTab, and a Multipage that are generated Dinamically. When I call the function, GeneraInfoGeneral for the firs time works fine, but when another control sets the RadTab to visible=false; and the RadMultipage to visible=false, it only persists the pageView (visible), if I dont change between tabs.

When I first click on btnInfoGral it works fine, but after I click btnServidorPublico and I clear tabs and clear pageViews, the pageview does not load until I click another tab. Im trying to set RadTab visible and invisible as its Multipage and pagesviews too.


<telerik:RadTabStrip ID="RadTabInfoGral" runat="server"
                                       MultiPageID="RadMultiPage1" OnTabClick="RadTabInfoGral_TabClick"
                                       Orientation="HorizontalBottom" Skin="Default"
                                       Visible="False" OnClientTabSelecting="onTabSelecting" SelectedIndex="0" OnClientTabUnSelected="OnClientTabUnSelected"
                                          Align="Right">
                                   </telerik:RadTabStrip>
                               
                            
                           <%--<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"
                                    Width="100%" OnTabClick="RadTabStrip1_TabClick" >
                               <tabs>
                                   <telerik:RadTab runat="server" Selected="True" Text="Root RadTab1">
                                   </telerik:RadTab>
                                   <telerik:RadTab runat="server" Text="Root RadTab2">
                                   </telerik:RadTab>
                               </tabs>
                           </telerik:RadTabStrip>--%>
                           <telerik:RadMultiPage
                           ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated"
                                    Width="100%" ScrollBars="Vertical" Height="430px" Visible="False" >
          </telerik:RadMultiPage>


private void AddTab(string tabName)
  {
      RadTab tab = new RadTab();
      tab.Text = tabName;
      tab.SelectedImageUrl = "~/App_Themes/img/Informacion.gif";
      RadTabInfoGral.Tabs.Add(tab);
  }
 
  private void AddPageView(RadTab tab)
  {
 
 
      //BARRO cada lista de controles, y cuando coincide el nombre de la pestaña con el de la lista
      //me salgo del foreach, y le asigno al pageView.ID, el nombre que en la base de datos coincide con fcFileControlId,
      //se cargó previamente en la inicialización de controles.
      foreach (string[] list in (List<string[]>)ViewState["listControlesID"])
      {
          if (list[0].Equals(tab.Text))
          {
              RadPageView pageView = new RadPageView();
              pageView.ID = list[1];
              RadMultiPage1.PageViews.Add(pageView);
              tab.PageViewID = pageView.ID;
              break;
          }
      }
 
  }
 
  protected void RadTabInfoGral_TabClick(object sender, RadTabStripEventArgs e)
  {
      AddPageView(e.Tab);
      e.Tab.PageView.Selected = true;
   }
 
  protected  void GeneraInfoGeneral()
  {
      //SI LE DAN CLICK EN EL BOTON DE INFORGRAL POR SEGUNDA VEZ MIENSTRAS ESTÉ MOSTRANDO
      if (!RadTabInfoGral.Visible)
      {
          RadTabInfoGral.Visible = true;
          //RadTabInfoGral.SelectedIndex = -1;
          PanelServidor.Visible = false;
 
          foreach (string[] StringArray in (List<string[]>)ViewState["listNombresPestañas"])
          {
              AddTab(StringArray[2]);
          }
 
          RadMultiPage1.Visible = true;
          AddPageView(RadTabInfoGral.Tabs[0]);
 
 
      }
      
  }
 
 
 
  protected void anyImageButton_Click(object sender, ImageClickEventArgs e)
  {
      switch (((ImageButton)sender).ID)
      {
          case "btnServidorPublico":
              PanelServidor.Visible = true;
              RadTabInfoGral.Visible = false;
              RadMultiPage1.Visible = false;
              RadTabInfoGral.Tabs.Clear();
              RadMultiPage1.PageViews.Clear();
               
              
              break;
 
          case "btnInfoGral":
              GeneraInfoGeneral();
               
               
              
 
              break;
 
          default:
              break;
      }
 
  }
 

protected void RadMultiPage1_PageViewCreated(object sender, Telerik.Web.UI.RadMultiPageEventArgs e)
   {
       string userControlName = "~/Controles/InformacionGeneral/" + e.PageView.ID + "CS.ascx";
       string URL = string.Empty;
       string jScript = " function Muestra_div(x) {" +
                        " if (document.getElementById(x).style.display == 'none')" +
                               " { document.getElementById(x).style.display = 'block';  window.location.hash='#Link'+x;}" +
                        " else " +
                               " document.getElementById(x).style.display = 'none';}" +
 
                        "function Oculta_Divs(ar){" +
                               "for (i=0;i<ar.length;i++){" +
                                 " document.getElementById(ar[i]).style.display = 'none';}" +
                                 "}";
                        
 
       //string sUrlImagenFondo = string.Empty;
       Control userControl = Page.LoadControl(userControlName);
       userControl.ID = e.PageView.ID + "_userControl";
       cDevuelveDatos devuelveDatos = new cDevuelveDatos();
       devuelveDatos.UrlHTML((List<string[]>)ViewState["listArraytotal"], (List<string[]>)ViewState["listSubRubros"], e.PageView.ID);
 
       Literal literal1 = new Literal();
       literal1.ID = "Literal1";
       literal1.Text = devuelveDatos.sCadenaInformacion(Request.Url.Scheme + "://" + Request.Url.Host + Request.ApplicationPath,
                                                           Server.HtmlEncode(Request.PhysicalApplicationPath),e.PageView.ID);
 
       ScriptManager.RegisterStartupScript(userControl.Page, userControl.Page.GetType(),"Key", jScript, true);
       //literal1.Text += "<a href=\"#\" onclick=\"Muestra_div('"+e.PageView.ID+"DivPrincipal')\">dd</a>";
       userControl.Controls.Add(literal1);
       //((Literal)userControl.FindControl("literal01")).Text = literal1.Text;
       e.PageView.Controls.Add(userControl);
   }
RICARDO
Top achievements
Rank 1
 answered on 18 Aug 2011
3 answers
78 views
Whenever we change the display resolution and refresh the screen the grid seemlessly fits the entire screen. But if the resolution is changed to 1680 x 1050 it is not happening!

Any workaround possible?!

Thank you

Regards
Raj
Daniel
Telerik team
 answered on 17 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?