I want a modal popup effect to display content on a same page on which it is using DetailsView

19 posts, 0 answers
  1. Derrick
    Derrick avatar
    6 posts
    Member since:
    Aug 2010

    Posted 29 Sep 2010 Link to this post

    t looks like the only content that is to be displayed in RadWindow is the content of a page that is specified in NavigateURL. That is a problem for me because what I want to display is the dynamic content that I show on the same page on which the rad window is defined.

    Is it possible to display the content on the same page defined in the rad window detailsvew?
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 29 Sep 2010 Link to this post

    Hi Derrick,

     What you want to achieve is available by using the RadWindow's ContentTemplate mode. A sample demo is available below:


    http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx

    In case you have additional questions, do not hesitate to contact us again.

    Best wishes,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Derrick
    Derrick avatar
    6 posts
    Member since:
    Aug 2010

    Posted 29 Sep 2010 Link to this post

    Thanks for the quick response.
    However in my solution, the "<ContentTemplate>" tag is not supported. Any ideas how to go about that?
    Am using rad controls Q2 2009
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 29 Sep 2010 Link to this post

    Hello Derrick,

    This feature was introduced in Q3 2009. If you want to use that functionality, you will have to upgrade to a recent version of the controls.

    Kind regards,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 23 Nov 2010 Link to this post

    But how to display dynamic content in as radwindow as new pop up on same page.
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Nov 2010 Link to this post

    Hello Neerav,


    If you want to add new controls to window dynamically when using window as container, then the following sample code will help you.

    Code:
    Label lbl = new Label();
    lbl.Text = "Details";
    lbl.ID = "detailLabel";
    ssRadWindow.ContentContainer.Controls.Add(lbl); // Where 'ssRadWindow' is RadWindow on page



    -Shinu.
  7. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 23 Nov 2010 Link to this post

    Thanks a lot for your reply my friend.

    This will add contents dynamically on a radwindow which does not use "radopen" method for opening in a new window.

    I have an empty "RadGrid1" on a page "Default.aspx" page.
    Actually I want to add "Radgrid2" with data, on a "radwindow" dynamically and then display that "radwindow" in a new window with url of the same page("Default.aspx") so that i can access both "radgrid1" on the same page  and "radgrid2" which is dynamically creared in radwindow.
    I will then want to use drag and drop feature of "radgrid" to drag rows from dynamically created "radgrid2" and drop then to fill the empty "radgrid1".

    This is actually the requirement of an existing applciation which is to be replaced with telerik radcontrols.

    Looking for you reply.

    Thanks and Regards
    Neerav Patel

  8. Derrick
    Derrick avatar
    6 posts
    Member since:
    Aug 2010

    Posted 25 Nov 2010 Link to this post

    Hi. 
    I think what u want is practically impossible! Two pages cant share the same url i.e. The parent page cant have the same the url with the rad-window that is Default.aspx. The best way is to change yo logic to suit what u exactly want to a achieve.
    Hope this helps.
    Thanks
  9. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 26 Nov 2010 Link to this post

     

    Thanks for your reply.

    We have been able to open the radwindow in new window pop up on same (default.aspx) page. This "radgrid1" does not have predefined columns and the columns are defined from code behind using datatable.columns.add() method.
    Now we have an empty "radgrid1" on default.aspx page which is empty and not bound to any database.
    We have a filled "radgrid2" in radwindow with "template column" which will delete a particular row and add that row to an empty "radgrid1" on default.aspx page as shown in figure 5 of attached document.
    We now want a column in "radgrid1" which can delete row from "radgrid1".
    The columns in "radgrid1" as mentioned earlier were defined during runtime while moving row data from "radgrid2" to "radgrid1".
    But now we also want a column in "radgrid1" which can delete a row from "radgrid1". I have added delete column to "radgrid1" using smarttag from aspx page. When the rows get from "radgrid2" to "radgrid1" the delete link do gets displayed but it does not deletes the row in clicking.
    Can you let us know a workaroung to it.
    In the attached document  "selected courses"  will our "radgrid1" and "search results"  will be our "radgrid2".

    -----------------------------------------------------

    Also there is a template column in "radgrid2" in radwindow, which moves row from "radgrid2" to "radgrid1". It works but not on first click.
    When the radwindow get open, we have to click on "template column" twice to delete row from "radgrid2". Again on second click the row gets deleted but when I publixh this site on other machine it shows error "server:error" and does not work.

    It seems that forum does not allow to attach files.
    However kindly provide us a work around after going through the problem

  10. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 29 Nov 2010 Link to this post

    Hello every one,
    I have two radgrids radgrid1 and radgrid2(opened in new radwindow on link click event). Radgrid1 is empty. Radgrid2 is filled with data. I have created a template column in radgrid2 which on click,  will move the row from radgrid2 to radgrid1.After moving, the row should also get deleted from radgrid2. I have bounded columns of radgrid2 in .aspx page with sqlserver database.
    My code behind is able to move data from radgrid2 to radgrid1 but I am not getting the row to be deleted from radgrid2. This data should get deleted temprorarily since whenever the radgrid2 gets opens it should displays all rows(including rows moved from radgrid2 to radgrid1).
    I know that telerik:gridclientdelete column deletes rows from client side. But the problem is I want to achieve both moving an deleting from same template column.
    Can anyone let me know as to how to create a template column which move ane delete row from client side only.
    Also, is it required that for implenting such scenario the database should be binded from code behind, if yes then let me know how to create template columns using datatable. SInce using datatable we can create tables and add rows to it.

    Kinldy reply.

    Thanks and regards
  11. Derrick
    Derrick avatar
    6 posts
    Member since:
    Aug 2010

    Posted 29 Nov 2010 Link to this post

    Hi.
    Based on your scenario, i would suggest two options.In the first place i would suggest that u build radgrid2 programmatically. in this case, it will be easy for u to delete the record after its transfered to radgrid1. All u need is to get the index of the transfered record and delete it.
    The other way applies if u choose to build the template in asp. This way the best way is to set the visible property of the transfered row to false. this should also be done programmatically. i.e.
    this.radgrid2.Columns[0].Visible = false;
  12. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 30 Nov 2010 Link to this post

    HI Derrick,

    Thanks for your reply.

    I would go for second option since I have already created a template column with "commandname = movetoselected" in .aspx. page(I hope u r referring this). Now I have a "ItemCommandChange = RadGrid1_ItemCommand" on radgrid2. THen following is my "RadGrid1_itemcommand" implementation.

    protected

     

     

    void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

     

    {

     

     

    if (e.CommandName == "MoveToSelected" || e.CommandName == "Delete")

     

    {

     

     

    GridDataItem dataItem = (GridDataItem)e.Item;

     

     

     

    int index = dataItem.ItemIndex;

     

     

     

     

    //e.Item.Visible = false;

     

     

     

        foreach (GridDataItem itemm in RadGrid2.MasterTableView.Items)

     

        {

     

     

            if (itemm.ItemIndex == index)

     

            {

                itemm.Display =

     

    false;

     

     

            }

        }

    }

    This hides the corresponding, but when I click on another row, the previously hidden row gets displayed again. In all, the code only allows one row to hide at a time.
    Kindly provide me as to how to go furthur.
    Also I didn't understand your comment - "this should also be done programmatically. i.e.
    this.radgrid2.Columns[0].Visible = false", since this will hide the "template column" from radgrid2.

    Looking forward your reply.
    Thansk and regards 

  13. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 30 Nov 2010 Link to this post

    Hi Derrick,

    I made a mistake in previous post. instead of "ItemCommandChange = RadGrid1_ItemCommand" , it is

    "OnItemCommand = RadGrid1_ItemCommand".

    Thanks and regards

  14. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 30 Nov 2010 Link to this post

    Hi Derrick,

    I have been able to resolve my previous problem where only one row was getting hidden at one time quite a bit.
    I have used paging on my grid. The grid shows 5 records on single page. Now when I click, suppose on row 1 of page1, the row1 of page1 gets hidden along with row 1 on all pages. May be this is because all pages maintain row index from 0.
    Following is my "OnItemCommand_radgrid_command" method where I maintain all row indexes in session "link" variable.
    Then I have implemented "prerender" method where I traverse through "link" variable and one by one hide the rows. But rows from all pages gets hidden.
     My "OnItemCommand_radgrid_command" mehtod

    protected

     

     

    void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)

     

    {

     

     

    if (e.CommandName == "MoveToSelected" || e.CommandName == "Delete")

     

    {

     

     

    // RadGrid1_ItemDeleted(source, e);

     

     

     

    GridDataItem dataItem = (GridDataItem)e.Item;

     

     

     

    int index = dataItem.ItemIndex;

     

     

     

    int[] arrtemp = (int[])Session["hide"];

     

     

     

    int iii = (int)Session["var"];

     

     

     

    List<int> lint2 = (List<int>)Session["link"];

     

    lint2.Add(index);

    Session[

     

    "link"] = lint2;

     

    arrtemp[(

     

    int)Session["var"]] = index;

     

    iii++;

    Session[

     

    "var"] = iii;

     

    Session[

     

    "hide"] = arrtemp;
    }


    And my preprender method

     

     

     

    protected void prerender(object sender, System.EventArgs e)

     

    {

     

     

    int[] arr1 = (int[])Session["hide"];

     

     

     

    int val1 = (int)Session["var"];

     

     

     

    List<int> lint1 = (List<int>)Session["link"];

     

     

     

     

    if ((bool)Session["state"] == true)

     

    {

    Session[

     

    "state"] = false;

     

    }

     

     

    else

     

     

     

     

     

    {

     

     

    foreach (GridDataItem itemm in RadGrid2.MasterTableView.Items)

     

    {

     

     

    foreach(int oo in lint1)

     

    {

     

     

    if (itemm.ItemIndex == oo)

     

    itemm.Visible =

     

    false;

     

     

    }

     

     

     

     

    }

    }

    }

    This is quite problamatic for me.
    Kindly let me know as to how to for furthur.

    Thanks and Regards

  15. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 02 Dec 2010 Link to this post

    Hi Derrick,

    Got the previous problem working.
    --------------------------------------------------------------
    There is an issue with radgrid updating

    I have a empty "RadGrid1" and hyper links "A","ALL"...  on default.aspx page.
     On click of "ALL" I have opened a new window pop up using  "RadWindow" with radopen = ("default.aspx", radwindowID) method. This will pop up the window on same(default.aspx) page. Now this radwindow is defined on default.aspx page with a another radgrid "radgrid2" in it using content template tags of radwindow. The radgrid2 also has a template column with command = "move to selected" which on click will move the corresponding row from radgrid2 to radgrid1 and hide that row in radgrid2. This process can fill up radgrid1(which was empty). The radgrid2 has "onitemcommand  = "radgrid1_itemcommand"" property set to handle click event from template column (command name = "move to selected"), this property  has logic for hiding row in radgrid2 and moving row to radgrid1.

    Now I have been able to open the window on same page with radgrid2 in it with template column "+" in it.
    The page get loads and all GUI gets displayed properly along with radgrid1 and links. WHen I click "ALL" the radwindow gets pop up with data filled radgrid2 with template column "+" in it.
     The problem is, when I click "+" i.e. template column for first time the "radgrid1_itemcommand" method does not get fired. But from second click onwards the command gets fired and all workds well (i.e. rows get move to radgrid1 from radgrid2).
    On click of template column the radgrid1_itemcommand does not gets fired for first time and because of that, the row does not get move from radgrid2 to radgrid1  only for first time. BUt ll works on and after second click on template column.

    PFA the images of my current scenario where "Radgrid_image1" is image where I click on "+" for first time and nothing happens and "radgrid_image2" is image where the row moves to radgrid1 and get hidden in radgrid2.

     Ihave used following

     

    <telerik:RadAjaxManager runat="server" ID="radAjax" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGrid2">
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadGrid2"/>
    <telerik:AjaxUpdatedControl ControlID="RadGridfirst" />

    </UpdatedControls>
    </telerik:AjaxSetting>
    </telerik:RadAjaxManager>

    Important thing that when I comment the above ajax setting code, all start to work well even for firts time i.e. rows gets shifted from from first click on template column. But this process closes the radwindow every time the template column getsclicked, so I have to click "ALL" again for opning the radwindow which is not at all my requirement.

    Kindly reply

    Thanks and Regards

     

  16. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 02 Dec 2010 Link to this post

    Hi Neerav,

    The described behavior is rather unexpected, we have not encountered such issues before. Therefore I would ask you to isolate the scenario in a runnable sample and send it to us in a formal support ticket. Thus we will be able to debug it and investigate it further.

    Kind regards,
    Iana
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  17. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 04 Dec 2010 Link to this post

    Hello every one,

    The previous problem is been working for now.
    There is a issue with Radtreeview .

    I have a scenario where I have to open a data filled grid in a new radwindow, on click event of radtreeview node.
    PFA the images of my scenario.
    IN figure 1 i have a treeview "User Hierarchy". I have used radtreeview for for this.
    Now this treeview has a user "n,k" which on click opens up menu list with two options "n,k" and "View Assignments" as
    given in figure 2.I have used "context menu" for this purpose.

    Now my requirement is, on click of "View Assignments" a new datafilled grid will get open in a new window as shown in
    Figure 3.
    This new grid will display data according to selection of the tree node in figure 2.
     
    Kindly let me know as to how to go further for implementing my requirement.
    I have seen that Radwindow does not any control from "OnContextMenuItemCLick" event.
    Also let me know as to how to create the radgrid i.e. from .aspx page or from code behind since the "select *" query in radgrid will be conditional.


    Kinldy reply
  18. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 07 Dec 2010 Link to this post

    Hello Neerav,

    Please open a support ticket and send us a sample project where the problem can be reproduced and which will allow us to get a better view over your exact case. Once we have that project, we will check it and do our best to help you right away.

    Best wishes,
    Georgi Tunev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  19. Neerav
    Neerav avatar
    50 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

    Hello everyone,
    Find out workaround for the previous problem.
    ------------------------------------------------------
    Following is description of the current issue.

    Attached are the screenshots of what is actually required.
    We have  a "Course/Group Courses" tab page as given in figure 1 of attached screen shot.

    Another tab "Hierarchy/Attributes" tab as given in figure 2 of attached screen shot.

    In figure 2 in "User Hierarchy" tree view I have checked "n,k" which is part of "Test" group, and  in figure 1 I have selected "Test1" from "Course Groups" tree view and there are two courses in "Selected Courses" grid.

    Now in figure 1 you can see there is a "Make Assignment" button which on click displays figure 3 as a new window with a filled radgrid.
    The grid in figure 3 has "Assign To" and "Assign Content" and various other columns.
    The "Assign To" column is  hyperlink with data same as node selected in figure 2 i.e. "Test". I think this is a template column.
    As well as "Assign Content" has values from "Course Groups" and "Selected Courses".
    I want to know as to how to create this grid as shown in figure 3.

    Since I cannot fire select query because all items are coming dynamically, can you let me know how to create the radgrid as shown in figure 3.

    For implementing the current requirement in our prototype, I have used following link
    http://www.telerik.com/help/aspnet-ajax/grdbindingtonullableobjects.html, by which I think I would be able to retrieve data from treeview and grid and create datasource as arraylist for figure3 radgrid. Am I going correct?
    My figure 3 radgrid is declared in aspx page. Since I have to create the figure 3 grid on "Make Assignment" button click event, when I click the button the grid displays with no records in new radwindow.

    Following is my button lcik event code.

    ArrayList algrid = (ArrayList)Session["arr"]; // for data from treeview from figure 1

    ArrayList algrid1 = (ArrayList)Session["arr1"];// for data from treeview from figure 2

    ArrayList list = new ArrayList();
    foreach (string s in algrid)
    {
        foreach (string s1 in algrid1)
        {

        list.Add(new TestListItem1(s, s1))
        }

    }

    Session["ds"] = sourcelist2;
    makegrid.Rebind();
    -----------------------------------------
    and following is my onneeddatasource code

    ArrayList sourcelist = (ArrayList)Session["ds"];
    this.makegrid.DataSource = sourcelist;
    ----------------------------------------------

    but the grid displays no data.

    Kindly let me know as to how to go for this.

    Thanks and regards

     

Back to Top