Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
77 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
217 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
117 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
84 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
477 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
85 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
0 answers
88 views
I removed the dock icon with the EnableDock property set to false.

1. How can I disable the close icon?
2. how can I set the height of the slider that expands to be exactly large enough to fit the content that is there.   The content is dynamic so it won't be the same each time so I can't set a fixed height.
S
Top achievements
Rank 1
 asked on 17 Aug 2011
2 answers
182 views
Masters and Experts,
I would like to implement a workflow form using the PanelBar control. I wanted to check here and see if it's possible before I put the development effort into it. What I would like to accomplish is creating a user control that would display in a RadWindow that will function as follows;
Panel1:
  User Selected Search Criteria
  Search / Move Next button (if results were found, If not message user)
Panel2
  RadGrid containing the results from the Search from Panel1. User would select the record they need for primer data for their new entry on Panel3
  Move Next Button
Panel3
  ReadOnly data items from Panel2s selection and editable user entry data fields
  Save Button

If it's possible for the control to handle that type of data manipulation would you know of any samples I could review as reference.

Thanks,
Tim
Tim
Top achievements
Rank 2
 answered on 17 Aug 2011
3 answers
137 views
Hi, I have three ComboBox in my webform which are used to for country, district and area for a user when they register in my site. 2nd ComboBox is populated when first one is selected and 3rd one when 2nd is selected. I have successfully databind these 3 from database. but after registering, if a user want to edit their data I want to pre-select all three ComboBoxes with the value which they select when registering at page load. I cannot find any idea how to do this... Can anyone please help me??
Ratul
Top achievements
Rank 1
 answered on 17 Aug 2011
5 answers
146 views
I have the following in the CommandItemTemplate tag:

 

<

 

CommandItemTemplate>

 

 

    <table width="100%">

 

 

        <tr>

 

 

            <td align="left">Third Party Mismatches</td>

 

 

            <td align="right">

 

 

                <asp:LinkButton ID="showFilter" runat="server" CommandName="DisplayFilter"

 

 

                    Text="Filter">

 

 

                </asp:LinkButton>

 

 

            </td>

 

 

        </tr>

 

 

    </table>

 

</

 

CommandItemTemplate>

 

 

 

 

 

 

 

 

 

What i want to do is when the user clicks on the showFilter link it will display or hide the folter depending on if it is shown already or not. I have that part working. What I can't get is to change the text to "Show Filter" if the filter is hidden and "Hide Filter" if it is shown.
I have the followinfg code but it isn't working.
Protected Sub GrdThirdParty_ItemCommand(ByVal source As Object, _  
                         ByVal e As GridCommandEventArgs) _  
                         Handles GrdThirdParty.ItemCommand  
 
        If e.CommandName = "DisplayFilter" Then 
            Dim lnkButton As LinkButton = CType(e.Item.FindControl("showFilter"), LinkButton)  
            If GrdThirdParty.AllowFilteringByColumn = False Then 
                GrdThirdParty.AllowFilteringByColumn = True 
                lnkButton.Text = "Hide Filter"  
            Else 
                GrdThirdParty.AllowFilteringByColumn = False 
                lnkButton.Text = "Show Filter" 
            End If 
            GrdThirdParty.MasterTableView.Rebind()  
        End If 
 
    End Sub 
Any ideas?
Thanks for the help.

Matt DiPietro
Top achievements
Rank 1
 answered on 17 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?