Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
From a grid row I open the rwMng window below from different icons.
I'd like the window to maximize whenever it's opened and resize to the defined height and width, if the user clicks the resize button.
When the window is first opened it is maximized.
However, if I close the window and open the window again the window is sized to the defined height and width.
Is it possible to have the window behave as described?

  <telerik:RadWindowManager ID="rwm" runat="server" Skin="Vista" style="z-index:7001" InitialBehavior="Maximize">
    <Windows>
      <telerik:RadWindow ID="rwMng" runat="server" VisibleStatusbar="false" VisibleTitlebar="True" Title="Campaign details management"  
        Height="625px" Width="950px" ReloadOnShow="True" Modal="True" Behaviors="Default" Skin="Vista"
        DestroyOnClose="false" ShowContentDuringLoad="false" />
    </Windows>
  </telerik:RadWindowManager>
Georgi Tunev
Telerik team
 answered on 16 Mar 2009
3 answers
139 views
Rather than centering the image on the entire page, I use the following setup to ensure that the loading image is visible on the page if the container being updated is visible.  Depending on the position of the area being updated, the image will try to move as close to the vertical center of the page as possible so that the loading image is nearly always visible.  This works with '09 Q1 using skins as well as older versions which have custom content.  Depending on the content of your LoadingPanel, you may need to adjust the amount of padding added.

The .aspx file:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    <ClientEvents OnRequestStart="ajaxRequestStart();"/> 
     ... 
</telerik:RadAjaxManager> 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Top" Skin="WebBlue"/> 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"
    <script type="text/javascript"
        function ajaxRequestStart() 
        { 
            centerUpdatePanel($get('<%= RadAjaxLoadingPanel1.ClientID %>')); 
        } 
    </script> 
</telerik:RadScriptBlock> 

The .js file:
function centerElementWithPadding(element)  
{  
    try  
    {  
        var scrollTop = document.body.scrollTop;  
        var viewPortHeight = document.body.clientHeight;  
        if (document.compatMode == "CSS1Compat")  
        {  
            viewPortHeight = document.documentElement.clientHeight;  
            scrollTop = document.documentElement.scrollTop;  
        }  
        var topOffset = Math.ceil(viewPortHeight / 2 - element.offsetHeight / 2);  
        var top = scrollTop + topOffset - 40 - 100;  // Adjust the padding here if necessary 
        element.style.paddingTop = top + "px";  
    }  
    catch (err)  
    {  
    }  
}  

Note that this is nearly identical to the centering method provided by Telerik in the help file except that this uses padding and relative positioning.  I find this more useful in settings where there are multiple controls that will be updated but the whole page doesn't need to be covered by a blanket LoadingPanel.  Hope this was helpful!
Dimo
Telerik team
 answered on 16 Mar 2009
4 answers
179 views
Helo,

I'm using RadGrid and i need to use dropdownlist instead of the filter function.

Is there any way to insert an row into the grid wich contains dropdownlists instead of the filter? The dorpdownlists should contain the values which are in the column.

thanks

Christian
Christian
Top achievements
Rank 1
 answered on 16 Mar 2009
2 answers
107 views
hi,

at the time of page loading, how to set current page index as 2 in radgrid.


thanks,
naveen veda
Top achievements
Rank 1
 answered on 16 Mar 2009
1 answer
196 views
Hi Team,
         I am trying to get the seected node count . to captuer this I have used the bellow code snipet . But it is giving error as " Object doesn't support this property or method" .  Can you please tell why this is happening .


function

onClientNodeClickedHandler(sender, eventArgs)

 

{

 

var tree = <%= rtvDetailData.ClientID %>;

 

 

var nodeCount = "";

 

 

for (var i = 0; i < tree.GetSelectedNodes().length; i++)

 

{

nodeCount += tree.GetSelectedNodes()[i].Text +

", ";

 

}

alert(nodeCount);

 

}



Regards
Manoj
Atanas Korchev
Telerik team
 answered on 16 Mar 2009
1 answer
121 views
Issue 1

I have a radgrid inside a tree view control.  Is it possible to put that grid into inline edit mode.  I figure I have to use the client side OnCommand function to put the identifying data for the row that needs to be edited into a hidden variable so when the grid is recreated on the server side that row can be put into edit mode.  The problem I am having is how to get the data I need from the grid on the client side.

Here is what I have so far.

serverside grid definition (partial)

_TreeGrid =

new RadGrid();

 

_TreeGrid.ID =

"radDG" + _gridType;

 

_TreeGrid.Skin =

"Office2007";

 

_TreeGrid.Width = 800;

_TreeGrid.AutoGenerateColumns =

false;

 

_TreeGrid.ClientSettings.Selecting.AllowRowSelect =

true;

 

_TreeGrid.AllowMultiRowSelection =

true;

 

 

//bind the client side events

 

_TreeGrid.ClientSettings.ClientEvents.OnRowCreated =

"RowCreated";

 

_TreeGrid.ClientSettings.ClientEvents.OnRowCreating =

"RowCreating";

 

_TreeGrid.ClientSettings.ClientEvents.OnRowSelected =

"RowSelected";

 

_TreeGrid.ClientSettings.ClientEvents.OnRowDeselected =

"RowUnselected";

 

_TreeGrid.ClientSettings.ClientEvents.OnCommand =

"GridCommand";

 



server side javascript

 

function GridCommand(sender, args)

 

{

 

grid = sender;

 

dataItems = grid.get_masterTableView().get_dataItems();

 

}

Thanks

John

Yavor
Telerik team
 answered on 16 Mar 2009
6 answers
588 views
Hi there,
I have just upgraded to the new 2009 Q1 and I like it. I am working with the default theme as it is pretty close to what I need.

I do have a couple of styling problems I was hoping someone could help me out with.

How do I remove the rgCommandRow border and the inner gradient colour?

I want to either remove the grids outter border or change its colour how do I do this?

I have tried .RadGrid_Default .rgCommandRow
{
    border:none;
}

Do I need to add a custom css class to it?


Any help would be great!

Thank you
Dimo
Telerik team
 answered on 16 Mar 2009
1 answer
230 views
I'm using Q1 2009 Ajax

In this version is seems the popup image next to the date textbox has been embedded in the web resources.
This causes a problem when doing full postbacks inside an update-panel (eg. uploading files)
Before I was able to set enableembeddedskins="false"   and link to the css myself - but the image is now missing.

What to do?
Dimo
Telerik team
 answered on 16 Mar 2009
1 answer
273 views
hi

i have a radgrig in dnn custom module.
i found this on guide to select and active a row in the same time

    <script type="text/javascript"
   function RowSelected(sender, args) 
   {    
       var grid = $find(sender.get_id()); 
       { 
           grid.set_activeRow($get(args.get_id())); 
           document.getElementById("<%= lblTest.ClientID %>").text ="<b>CODICE: </b>" + args.getDataKeyValue("CODICE_PRODOTTO"); 
                  
        //    __doPostBack("<%= RadGridGiro.UniqueID %>", "RowClicked:" + eventArgs.get_itemIndexHierarchical());      
       } 
   } 
   function ActiveRowChanged(sender, args) 
   { 
    
       if (sender.get_masterTableView().get_selectedItems().length < 1 || sender.get_masterTableView().get_selectedItems()[0].get_id() != args.get_id()) 
       { 
           args.get_tableView().selectItem($get(args.get_id()));          
       } 
   } 
      </script> 

and with this configuration
 <ClientSettings AllowKeyboardNavigation="True" EnablePostBackOnRowClick ="false"
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnActiveRowChanged="ActiveRowChanged" OnRowSelected="RowSelected" /> 
                </ClientSettings> 
it work, putting the code i need in a label.

now i have to manage the code in label to obtain a "detail", but server side the event for selected index change wont fire.
reading around i see EnablePostBackOnRowClick ="true"
whit this event fire but i've got no keyboard support.
can yuo explain me where i'm wrong?
sorry for my bad english.
Thanks
Teo


Yavor
Telerik team
 answered on 16 Mar 2009
3 answers
173 views

Due to having to disable a checkbox but still have it visible on the client side (using client side javascript to check and uncheck it as items in a grid underneath of it are checked) I have added an asp:CheckBox to a node on the server side with the following code:

 

 

RadTreeNode substanceNode = new RadTreeNode(substanceRow["Substance_Name"].ToString(), substanceRow["SUBSTANCE_ID"].ToString());

 

substanceNode.ExpandedImageUrl =

"~/Images/FolderOpen.gif";

 

substanceNode.ImageUrl =

"~/Images/FolderClosed.gif";

 

 

CheckBox indicator = new CheckBox();

 

indicator.Enabled =

false;

 

indicator.Visible =

true;

 

indicator.ID =

"chkSource";

 

substanceNode.Controls.Add(indicator);

How can I access this checkbox on the client side to work with it.  Here is my client side code where I need to work with this checkbox

 

 

for (var i=0; i < nodes.length; i++)

 

{

    if (nodes[i].get_value() == selectedSubstanceId)

 

    {

            checkbox = nodes[i].findControl(

"chkSource");

 

 

    }
}

the rest of the logic is working fine I just can't get the checkbox to work with it.
the findControl returns null.

Any help to figure this out is greatly appreciated.

Thanks

John

 

Veselin Vasilev
Telerik team
 answered on 16 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?