Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
208 views
I am using RadMenuItem Control on my Login Page as a Login Button. When i click on this Login Button the OnItemClick event is called. Now the requirement is that when i hit the Enter Key from wherewere in the Page the OnItemClick event should get called.

Please help me in accompolishing this.
Peter
Telerik team
 answered on 10 Aug 2010
2 answers
211 views
Hello,

I have a panel bar on my page setup similiar to that of Outlook 2007+ on the left hand side and everything seems to work perfectly with expanding and collapsing.  However, the problem I seem to have revolves around text placed inside a template item.  For some reason the test for the <h5> tag is much different from an <h5> outside of the panel bar where it appears both font and size differ.  I do have a rad form decorator applying the same style to h4h5h6.  I do not have any font modification in my CSS, the only font modifications comes from the built in telerik skins applied.  Also, it appears that the text and margins definitions within a template item are double spaced.  So a 10px margin becomes 20 while text is also double spaced.

Any ideas why everything is much different inside the panel bar versus outside of it even though I am applying the same skin both in and out and not defining any additional cutomizations anywhere.

Attached is a screenshot of the difference between the left side with the panel bar and the right side without.

Thanks,
Ron Montecalvo
Kamen Bundev
Telerik team
 answered on 10 Aug 2010
5 answers
222 views
I need to update the value in a row and column of a Label in radgrid with a value I have from Javascript.
The value is a return arrg from a popup radwindow.

Is it possible and if so how please.

Thx
Neal
Neal
Top achievements
Rank 1
 answered on 10 Aug 2010
2 answers
350 views
Hi

I've tried several options to retrieve a label and or textboxes via javascript on my grid in the OnClientClose (which retrieves values I want to insert into a (checkbox) selected row.

I get as far as getting into the "iterating thru the dataitems " ,(loops thru 16 rows correctly)  
BUT,  getting the column or/and the labels by their unique id is a problem.
I am using Telerik RaControls v2009.2

The column markup is

<telerik:GridTemplateColumn   UniqueName ="ORateCBX" > 
    <ItemTemplate> 
        <asp:CheckBox            ID="cbxORate" 
                runat="server"  Width="100%" height = "18px"   AutoPostBack="true" 
                OnCheckedChanged="cbxORate_CheckedChanged"/> 
        <asp:Label                   id="lblORate_Id" " 
                runat="server    Visible="false" Width="5px" height = "18px"></asp:Label> 
        <asp:TextBox                id="txtORate" 
                runat="server"   Visible="false" Width="5px" height = "18px"></asp:TextBox> 
        <asp:TextBox                id="txtReason"
                runat="server"  Visible="false" Width="5px" height = "18px"></asp:TextBox>
   </ItemTemplate>
</telerik:GridTemplateColumn>

The javascript (in onClientClose)

 

var arg = args.get_argument();

if (arg)

{

  var RatePerc = arg.RatePerc;

  var seldate = arg.Reason;

  var masterTableView;

  var length;

  var grid = $find("<%

= grvCoverelements.ClientID %>");

 

  if (grid)

  {

    masterTableView = grid.get_masterTableView();

  }

  if (masterTableView)

  {

    var firstDataItems = masterTableView.get_dataItems();

    if (firstDataItems)

    {

       length = firstDataItems.length;

       // alert("length = " + length);

    }

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

    {

       alert(i ); //Successful

       var dataItem = firstDataItems[i].get_element("ORateCBX");

      if (dataItem)

      {

         //unsuccessful condition everytime...i.e. not getting the GridTemplateColumn UniqueName ="ORateCBX"

         alert("dataItem is " + dataItem);

         // 1. Is it the correct row (the one the user clicked on to insert (via popup) the new values from args.

 

        if (checkBox && checkBox.checked )

       {

            // 1. Get the rate textbox

            var txtRate = dataItem.findElement("txtORate");

            //2. Is it the correct row and checkbox

             if ( txtRate.value =" " )

           {

               //3. Insert the new value from Arg.RatePerc

                txtRate.value = Arg.RatePerc;

               //4 Insert the new value from Arg.Reason

                var txtReason = dataItem.findElement("txtReason");

                txtReason.value = Arg.Reason;

            }

        }

    }

}

__doPostBack(

"NewOrate", arg);

}

 

In other words it never finds the Column (GridTemplate col with the unique name of "ORateCBX" ???

I have tried this approach as well, but it does not even iterate thru the grids rows!

// for (var i=0; i < masterTableView.Rows.length; i++)

// {

    // alert("looping" ); //...............//NOT successful

    // var cell = masterTableView.GetCellByColumnUniqueName(masterTableView.Rows[i] , "ORateCBX");

    // if (cell) {alert("Cell")};

        // var dataItem = dataitems[i].findElement("txtORate")[0];

        // if (checkBox && checkBox.checked)

        // {

             // Find the textboxes   "txtRate and TxtReason and populate them from args

       /// }

// }


Thanks
Neal
Neal
Top achievements
Rank 1
 answered on 10 Aug 2010
2 answers
76 views
After sorting on any of the columns, the data is disappers from page 2 onwards. Verified and found that needDataSource is firing on page index change and also when sorting. The grid properties are listed below. Any help is much appreciated.
<telerik:RadGrid ID="rdCodes" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                Width="990px" Skin="new" EnableEmbeddedSkins="False" AllowPaging="True"
                                                GridLines="None" PagerStyle-AlwaysVisible="true"
                                                SelectedItemStyle-BackColor="AppWorkspace" OnItemDataBound="rdReconCodes_ItemDataBound"
                                                OnPreRender="rdReconCodes_PreRender" OnPdfExporting="rdReconCodes_PdfExporting"
                                                OnNeedDataSource="rdReconCodes_NeedDataSource"
                                                OnPageIndexChanged="rdReconCodes_PageIndexChanged" OnPageSizeChanged="rdReconCodes_PageSizeChanged"
                                                OnInsertCommand="rdReconCodes_InsertCommand" OnUpdateCommand="rdReconCodes_UpdateCommand"
                                                OnExcelMLExportStylesCreated="rdReconCodes_ExcelMLExportStylesCreated">
Prasanth
Top achievements
Rank 1
 answered on 10 Aug 2010
2 answers
170 views
Hi,

I have a RadGrid similar to the example (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx) it has EnablePostBackOnRowClick="true" and this works fine. However my problem is when you introduce a ClientSelectColumn which then triggers a postback on every selection, I don't want it to. I want to keep my action on row click yet i also want a user to be able to select multiple rows with ease without the interuption of a postback. I have looked to try to find something i can use to determine what was clicked but the ItemCommand "RowClick" doesn't provide much and looking through client side is taking a while, any suggestions?

Shane
Shane Leipper
Top achievements
Rank 1
 answered on 10 Aug 2010
1 answer
129 views
Dear telerik Team,

I am working with the resource grouping where my scheduler shows multiple resources. And I am applying timeslots back colour depending on my conditions.  Now I need to show the timeslot with two different colours. I tried it by changing the css class of scheduler stylesheet shown below.

.RadScheduler_NewSkin .rsContentTable .rsAlt td
{
    border-left-width: 15px;
border-left-color: Green;
border-left-style: solid;
}

then i got timeslot colour for alternate rows of scheduler which shown in below image with name timeslot_colors.jpg.
But I need to apply colours to all the rows such as shown in below figure with name color_repr.jpg

Please refer color_repr.jpg image and give me possible modifications to achieve that functionality.

Thanks and Regards
--------------------------
Pradeep
Kamen Bundev
Telerik team
 answered on 10 Aug 2010
1 answer
366 views
I have a RadGrid that is not using enabled themes, so I have made my own skin. This Grid looked perfect before I started making changes to that, but the customer wants it to look like previous grids.

So... there is an unexplained gap between the header row and the first data row now in my grid. (screenshot attached)
Can anyone help me figure out why, and how to close that gap?

Thanks in advance!

Here is the ASPX code:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" ShowGroupPanel="false" ShowStatusBar="false" EnableViewState="false" GridLines="Both" ShowFooter="false" EnableEmbeddedSkins="false" SkinID="radgridSkin" OnItemDataBound="RadGrid1_OnDataBound" OnPreRender="RadGrid1_PreRender">
  <MasterTableView EnableColumnsViewState="false" Width="100%" TableLayout="Auto" >
  <Columns>
  <telerik:GridBoundColumn DataField="TaxonName" HeaderText="Taxon" ItemStyle-Wrap="false" HeaderStyle-BorderWidth="0px" >
  </telerik:GridBoundColumn>
  <telerik:GridBoundColumn DataField="StrainNumber" HeaderText="Strain #" ItemStyle-Wrap="false" HeaderStyle-BorderWidth="0px">
  </telerik:GridBoundColumn>
  </Columns>
  </MasterTableView>
<HeaderStyle Wrap="true" BorderStyle="Solid" BorderWidth="1px" BorderColor="SlateGray" />
<ClientSettings>
  <Selecting AllowRowSelect="true" />
  <Scrolling AllowScroll="True" ScrollHeight="500px" FrozenColumnsCount="2" UseStaticHeaders="true" />
</ClientSettings>
</telerik:RadGrid>

Here is the Skin Code:
<telerik:RadGrid  runat="server" ShowGroupPanel="false" ShowStatusBar="false" SkinId="radgridSkin" ItemStyle-BackColor="GhostWhite" AlternatingItemStyle-BackColor="LightGray" HeaderStyle-BackColor="Transparent" HeaderStyle-Font-Bold="true" AlternatingItemStyle-CssClass="dgRow" ItemStyle-Height="28px" AlternatingItemStyle-Height="28px" ItemStyle-CssClass="dgRow" ItemStyle-BorderColor="LightSlateGray" ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1px" AlternatingItemStyle-BorderColor="LightSlateGray" AlternatingItemStyle-BorderStyle="Solid"  AlternatingItemStyle-BorderWidth="1px">
</telerik:RadGrid>

Here is the CSS Code:
.dgRow{}
.dgRow td
{
    height: 31px;
    padding: 0px 0px 0px 2px;
    border: solid 1px LightSlateGray;
}
TABLE.dgRow th
{
    padding-left:4px;
    padding-right:4px;
    padding-bottom:4px;
    max-height:60px;
    vertical-align:bottom;
    white-space:nowrap;
    text-align:left;
}
Dimo
Telerik team
 answered on 10 Aug 2010
1 answer
88 views
Hi,
 I am using  RadSplitter that occupies 100% browser width and height, RadPane wraps map control and sets its width,height and extent at OnClientResized event. When  Rad-splitter re sizes for the first time I would like to set my map's restricted extent  to the current extent of map. How can I know splitter has  finished setting width and height of RadPanes so that I can call this function SetRestrictedExtent(). I want this function to be called just once on page load not on postback.





Is there any specific function/events that can be used ?
Thanks
Prava
Tsvetie
Telerik team
 answered on 10 Aug 2010
4 answers
657 views
Hi,

Iam configuring the below grid and I have to display  "Yes / No" message box on Save & Cancel Click.
Based on user response I have to display few more "Ok" message box & few more "Yes / No" message boxes.
Can you please explain how to achieve this functionality in radgrid ?
Your help is very much appreciated. Thank you.


OrderTypeRankingGrid.AddNeedDataSourceEventHandler(NeedDataSource); // Binding master table view
            OrderTypeRankingGrid.AddGridCommandEventHandler(DataGrid_ItemCommand); // Events for the standard ngm controls
            OrderTypeRankingGrid.PreRender += new EventHandler(OrderTypeRankingGrid_PreRender);
                       
             
            OrderTypeRankingGrid.AllowColumnsReorder = false;             
            OrderTypeRankingGrid.GridHeaderText = "Order Type Ranking"; 
            var masterView = OrderTypeRankingGrid.ConfigureMasterTableView("vDivisionOrderTypeRanking", new string[] { "DivisionOrderTypeRankId","CategoryCode", "PurposeCode", "ReasonCode", "ReasonDescription"});
            masterView.AllowFilteringByColumn = true;
            masterView.AllowSorting = true;
            masterView.FullEditMode = true;
            masterView.EditMode = GridEditMode.InPlace;
            masterView.EnableShowHideColumns = true;
            masterView.SetPaging(GridPagerMode.NextPrevAndNumeric);
            masterView.GridTableView.ShowHeader = true;
            masterView.ShowHeader = true;
            masterView.ShowFooter = true;
            masterView.ShowHeadersWhenNoRecords = true;
            masterView.AllowPaging = true;
            masterView.PageSize = 10;
              
                          
            masterView.AddNgmCommandButton(NgmButtonType.Save, "btnSave", null, null, null, Unit.Pixel(50));
            masterView.AddNgmCommandButton(NgmButtonType.Cancel, null, null, null, null, Unit.Pixel(50));
              
            masterView.CommandItemDisplay = GridCommandItemDisplay.Bottom;
  
              
            if (!IsPostBack)  //must check for postback; otherwise, columns will be duplicated
            {
                //masterView.AddBoundColumn("DivisionOrderTypeRankId", "Rank ID", "DivisionOrderTypeRankId", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("CategoryCode", "Category Code", "CategoryCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("PurposeCode", "Purpose Code", "PurposeCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("ReasonCode", "Reason Code", "ReasonCode", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("ReasonDescription", "Reason Description", "ReasonDescription", true, false, true, Unit.Percentage(7.0));
                masterView.AddBoundColumn("OrderTypeRank", "Rank", "OrderTypeRank", false, false, true, Unit.Percentage(7.0));
                  
            }

I have the below code in my .aspx page.

<telerik:RadScriptManager ID="RadScriptManager2" runat="server">
        </telerik:RadScriptManager>
  
//Customized Radgrid Datagrid usercontrol
<tr> <uc1:DataGrid ID="OrderTypeRankingGrid" runat="server" />  </tr>
  
  
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid" />
                    <telerik:AjaxUpdatedControl ControlID="lblBindTime" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnExport">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid" />
                    <telerik:AjaxUpdatedControl ControlID="btnExport" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnExportMultilevelGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid" />
                    <telerik:AjaxUpdatedControl ControlID="btnExportMultilevelGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        <ClientEvents OnRequestStart="RequestStarted" OnResponseEnd="ResponseEnd" />
    </telerik:RadAjaxManager>
Radoslav
Telerik team
 answered on 10 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?