Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
210 views
I am running into an issue and want to see if there is a standard way to do this.

I want to select a grid item on the client and keep the the styles defined in the grid.  I have the following event called when a checkbox is clicked in the grid.

           function selectRow(id, rowIndex) {  
 
               var grid = $find("<%= gvProperties.ClientID %>");  
 
               var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();  
 
               //grid.get_masterTableView().selectItem(rowControl, true);  
               grid.get_masterTableView().selectItem(rowControl);  
 
                 
               rowControl.style.backgroundColor='#c7c7c7';  
                 
               return true; 

The rowControl.style.background gets set correctly but I really want to use what is defined in SelectedItemStyle.  My main question is when the checkbox is unclicked I want to use what is set for the ItemStyle or the AlternateItemStyle.

How do I know what kind of item (regular or Alternate) I have?

Also, why doesn't the 'selectItem' method already already highlight the row using the SelectedItemStyle?

Thanks.
Iana Tsolova
Telerik team
 answered on 07 Apr 2009
4 answers
227 views
Hi All,

I have one hidden field in master page. I have created the property for this hidden field so that I am able to update the value of this hidden field from content page.
It works fine when there is no RadAjaxPanel in content page.
But if event get fired with the controls which are inside RadAjaxPanel in content page then the value of hidden field dosent get updated.
I have palced the hidden field in another RadAjaxPanel but still it is not working. In Update panel there is one property i.e. UpdateMode = "Always". I didn't found such property in RadAjaxPane. I just want,  hidden field should get updated for every sync or async postback always.
Sebastian
Telerik team
 answered on 07 Apr 2009
3 answers
77 views

I have worked around the floating issue with some parts of RadControls e.g. radeditor and upload, applying the position:absolute property to a css class in fildset container. The floating issue is solved but now the scrolling does not update the RadPane in real time mode, the radpane is update only when release mouse event occurs.

Can we refine this workaround this issue?

Thanks

Gilberto
Gilberto
Top achievements
Rank 1
 answered on 07 Apr 2009
1 answer
109 views
Hi,

Using the Iana method on this post : http://www.telerik.com/community/forums/aspnet-ajax/ajax/radpanel-when-call-a-service.aspx
I want to write something like that to ajaxify a button click.

 <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
        <AjaxSettings>              
            <telerik:AjaxSetting AjaxControlID="ClearBtn">  
                <UpdatedControls> 
                   <telerik:AjaxUpdatedControl ControlID="ClearBtn" LoadingPanelID="AjaxLoadingPanel">  
                   </telerik:AjaxUpdatedControl> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
</telerik:RadAjaxProxyManager> 

Now, I want to do the same thing but on a RadMenuItem. I define my RadMenu like that :

<telerik:RadMenu ID="SaveBtn" ClickToOpen="true" runat="server" EnableEmbeddedSkins="false" CausesValidation="false" OnItemClick="SaveBtn_Click">  
                    <Items> 
                        <telerik:RadMenuItem Text="save">  
                            <Items> 
                                <telerik:RadMenuItem Text="text 1" 
                                  Value="value 1" /> 
                                <telerik:RadMenuItem Text="text 2" 
                                    Value="value 2" /> 
                                <telerik:RadMenuItem Text="text 3" 
                                    Value="value 3" /> 
                            </Items> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenu> 

How to ajaxify the click on the first, second and third RadMenuItem using the same method as above ? (please pay attention I want to use the ClickToOpen set to true)

Thank you,

Sabrina
Shinu
Top achievements
Rank 2
 answered on 07 Apr 2009
1 answer
308 views

   Hi,

      I want to add the rad tooltip for the selected cell of radgrid.

      My problem is :i m getting tooltip for every cell.i want to diplay
 
      tooltip for selected cell only.

      I used the following javascript to select the multiple cells of
      the radgrid.

      Here is the javascript code:
     

         <script type="text/javascript">
   
    function RowCreated(sender, eventArgs)
     {
         var dataItem = eventArgs.get_gridDataItem();
       
        for (var i = 0; i < dataItem.get_element().cells.length; i++)
       
           {
                dataItem.get_element().cells[i].onclick = function()
              {
                this.selected = this.selected == true ? false : true;
                this.className = "ClickClass";
            };
        }
    }
</script>

    and in client settings of rad grid
    ----------------------------------

 

<ClientSettings>
   <Selecting AllowRowSelect="false" ></Selecting>
  
   <ClientEvents OnRowCreated = "RowCreated" ></ClientEvents>
</ClientSettings>

 

     and for tooltip i used the following code:
     ------------------------------------------

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {

     
          if (e.Item is GridDataItem)
            {

               foreach (GridTableCell cell in e.Item.Cells)
              {

                   cell.ToolTip = cell.Text;

                }
            }

        }

 

      so...instead of this how to get the tooltip of radgrid.....when the cell is selected?

      pls ..help me to solve this prob..

    thanks in advance

Princy
Top achievements
Rank 2
 answered on 07 Apr 2009
5 answers
627 views
Hi!

When using RadDate/RadDateTimePicker in formview insertitemtemplate it´s throwing a null reference exception if no date has been selected.

Code: 

<radControls:DateTimePicker ID="dateTimePicker1" runat="server"

FocusedDate='<%#DateTime.Now %>'

DbSelectedDate='<%#Bind("PremisesStartDate")%>'

TabIndex="4"/>

BR
Marcus

Grendizer
Top achievements
Rank 1
 answered on 07 Apr 2009
1 answer
98 views
We have a menu, with 900+ items (4 layers) and it seems pretty slow. When we toggle between different menu items there is about 10 seconds delay for the menu to hide so we can navigate. Is there something we can do to tune the performance? Thanks.
Paul
Telerik team
 answered on 07 Apr 2009
1 answer
180 views
I am exporting content from a RadGrid.  With the default settings, the grid data exports perfectly.  As soon as I make a change to any of the ExportSettings, I get a blank spreadsheet in Excel.  Has anyone else run into this problem?

I have an OnBubbleEvent setup in my Grid class.  When the user has clicked "Export Grid" from the GridToolBar inside the Grid CommandItemTemplate, I bubble the event up to the grid.  Eventually, the parameters are passed into the OnBubbleEvent which simply calls the code below:

 

        protected void CreateExportFile(string[] exportResults)  
        {  
            //Hide the GridToolBar  
            this.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;  
            //Hide the Pager  
            this.MasterTableView.PagerStyle.Visible = false;  
            //Hide the PreviewIcon Column  
            foreach (GridColumn col in this.MasterTableView.Columns)  
            {  
                if (col.ColumnType == "GridTemplateColumn")  
                {  
                    col.Visible = false;  
                }  
            }  
            //Hide the ExpandColumn  
            (this.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem)["ExpandColumn"].Visible = false;  
            foreach (GridDataItem dataItem in this.MasterTableView.Items)  
            {  
                dataItem["ExpandColumn"].Style["display"] = "none";  
                dataItem["ExpandColumn"].Visible = false;  
            }  
 
            switch (exportResults[0])  
            {  
                case "Excel":  
                    {  
                        SetExportSettings(exportResults);  
                        this.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.Html;  
                        this.MasterTableView.ExportToExcel();  
                        this.MasterTableView.Rebind();  
                        break;  
                    }  
                case "Word":  
                    {  
                        SetExportSettings(exportResults);  
                        this.MasterTableView.ExportToWord();  
                        break;  
                    }  
                case "CSV":  
                    {  
                        SetExportSettings(exportResults);  
                        this.MasterTableView.ExportToCSV();  
                        break;  
                    }  
            }  
        }  
 
        private void SetExportSettings(string[] exportParameters)  
        {  
            //0=Format1=IncludeColumnNames2=IgnorePaging3=OpenInNewWindow 
            this.ExportSettings.ExportOnlyData = false;// !(Convert.ToBoolean(exportParameters[1])); //IncludeColumnNames  
            this.ExportSettings.IgnorePaging = true; // Convert.ToBoolean(exportParameters[2]); //IgnorePaging  
            this.ExportSettings.OpenInNewWindow = true; // Convert.ToBoolean(exportParameters[3]); //OpenInNewWindow  
        }  
 

 

 

 

 

 

 

 

 

Pavlina
Telerik team
 answered on 07 Apr 2009
14 answers
188 views
Hello,

I want to add a radpanel on a asp page.
When I click on a button, a call to a service is made and this call can take some seconds when there is the postback. I would like to show a RadAjaxLoadingPanel. 

I don't know on which controls I have to put the radpanel to show the RadAjaxLoadingPanel.

Can you help me ?

Thanks,

Sabrina
Sabrina
Top achievements
Rank 1
 answered on 07 Apr 2009
2 answers
165 views
Hello,

I want to embed in the rad alert JavaScript code to display a running count-down counter.  Is that possible?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 07 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?