Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
55 views
When I try to execute the line of code 

RadGridUserTypeWorkflows.MasterTableView.CommandItemSettings.AddNewRecordImageUrl = 

"~/App_Themes/" + Page.Theme + "/Grid/AddRecord_na.gif"; to change the image of the 

"AddNewRecordButton" Command Item button  in a Radgrid , it doesn't change the Image.
Also after executing the above line of code and if we try to access this control 
using the following code
Button imgAddNewRecord = (Button)e.Item.FindControl("AddNewRecordButton");
in the ItemCreated event of the grid it returns null. 

But if I execute the commands in the follwing manner it return the control but the image 

icon is not changed.

Button imgAddNewRecord = (Button)e.Item.FindControl("AddNewRecordButton");
RadGridUserTypeWorkflows.MasterTableView.CommandItemSettings.AddNewRecordImageUrl = 

"~/App_Themes/" + Page.Theme + "/Grid/AddRecord_na.gif";

How do we change the Image of the "AddNewRecordButton" programatically and disable the 

same control.
Eyup
Telerik team
 answered on 30 Oct 2015
4 answers
101 views

Hi,

 

How can I achieve that the Mobile RadMenu is expanded by default when I load the page?

 

Thanks,

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 30 Oct 2015
1 answer
814 views

Hi,

I'm using radgrid with checkbox to select row in there. I have a lot of data, and I use paging in my Grid.

I think that my code is OK, when i check one row or more. When i check chekbox header, i think that my all of my data's are checked but actually

my data in other pages are not checked.

Please advise,

Thank you so much

 

Bellow is my code in aspx :

<telerik:RadGrid ID="RgTrial" runat="server" OnNeedDataSource="RgTrial_NeedDataSource" AutoGenerateColumns="false" ClientSettings-Resizing-AllowColumnResize="false"
                                ClientSettings-Resizing-AllowResizeToFit="false" ClientSettings-Resizing-EnableRealTimeResize="false" Width="1046" Height="550" ClientSettings-Scrolling-AllowScroll="true"
                                ClientSettings-Scrolling-UseStaticHeaders="true" AllowMultiRowSelection="true" AllowFilteringByColumn="true" GroupingSettings-CaseSensitive="false" AllowPaging="True" PageSize="50" EnableEmbeddedSkins="false" Skin="CustomSkin">
                                 
                                <MasterTableView DataKeyNames="Nomor,BatchNo,BatchDate,SO,SOType,SODate,BusinessUnit,BUName,POCustomer,Customer,SalesID,SalesName,IndexProduct,IndexService,GPMSA,GPMActual
                                    ,Currency,RealAmount,ExchangeRate,Amount,ServiceAmount,CollAmount,Revenue,COGS,GPMAchievement,PctgCommPaid,Formula,Commision,ActiveFlag,EditReason,Calculation,IsFinal">
                                    <Columns>
 
 
                                        <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" HeaderStyle-Width="45px" ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="CBSelectRow" runat="server"  AutoPostBack="True" OnCheckedChanged="CBSelectRow_CheckedChanged"  />
                                            </ItemTemplate>
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="CBHeader" runat="server" AutoPostBack="True" OnCheckedChanged="CBHeader_CheckedChanged" />
                                            </HeaderTemplate>
                                        </telerik:GridTemplateColumn>
 
                                        <telerik:GridBoundColumn DataField="NOMOR" HeaderText="No" ReadOnly="true" HeaderStyle-HorizontalAlign="Center" DataType="System.String" HeaderStyle-Width="75" ShowFilterIcon="false" FilterControlWidth="60"
                                            AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ItemStyle-HorizontalAlign="Center" AllowFiltering="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="BatchNo" HeaderText="Batch No" ReadOnly="true" HeaderStyle-HorizontalAlign="Center" DataType="System.String" HeaderStyle-Width="100" ShowFilterIcon="false" FilterControlWidth="85"
                                            AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ItemStyle-HorizontalAlign="Center" AllowFiltering="true">
                                        </telerik:GridBoundColumn>
 

and code behind, i use c# :

 

protected void CBSelectRow_CheckedChanged(object sender, EventArgs e)
       {
           try
           {
               ((sender as CheckBox).NamingContainer as GridItem).Selected = (sender as CheckBox).Checked;
               bool checkHeader = true;
 
               foreach (GridDataItem dataItem in RgTrial.MasterTableView.Items)
               {
                   if (!(dataItem.FindControl("CBSelectRow") as CheckBox).Checked)
                   {
                       checkHeader = false;
 
                       break;
                   }
 
               }
               GridHeaderItem headerItem = RgTrial.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
               (headerItem.FindControl("CBHeader") as CheckBox).Checked = checkHeader;
           }
 
           catch (Exception x)
           {
               Logger.Instance.LogException(System.Reflection.MethodBase.GetCurrentMethod(), x, true, Helper.Instance.GetUserID());
           }
       }
 
       protected void CBHeader_CheckedChanged(object sender, EventArgs e)
       {
           try
           {
               CheckBox headerCheckBox = (sender as CheckBox);
               foreach (GridDataItem dataItem in RgTrial.MasterTableView.Items)
               {
                   (dataItem.FindControl("CBSelectRow") as CheckBox).Checked = headerCheckBox.Checked;
                   dataItem.Selected = headerCheckBox.Checked;
                   
               }
           }
           catch (Exception x)
           {
               Logger.Instance.LogException(System.Reflection.MethodBase.GetCurrentMethod(), x, true, Helper.Instance.GetUserID());
           }
       }

Eyup
Telerik team
 answered on 30 Oct 2015
1 answer
141 views

 

Hi guys.

 

I'm new implementing radsplitbutton, I have my splitbutton inside a gridtemplateColumn declared as follows:

<telerik:GridTemplateColumn  DataField="Portal_Id" UniqueName="templateCol">
                           <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                      <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                      <ItemTemplate>
                            <asp:Label runat="server" ID="labelss" Text='<%# Bind("Portal_Id") %>' ></asp:Label>
       <telerik:RadButton runat="server"  ID="splitButton" EnableSplitButton="true" Text="Selecionar" Skin="Bootstrap" Width="200px" AutoPostBack="false" OnClientClicked="OnClientClicked" OnClientLoad="storeSplitButtonReference"></telerik:RadButton >
                           <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Bootstrap"  OnClientLoad="storeContextMenuReference" >
                  <Items>
                      <telerik:RadMenuItem Text="Detalles" Value='<%# Eval("Portal_Id")%>'  NavigateUrl='<%# FriendlyUrl.Href("~/Portales/Details", DataBinder.Eval(Container,"Portal_Id"))%>' >
                          
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem Text="Editar" Value='<%# Eval("Portal_Id") %>'  NavigateUrl='<%# FriendlyUrl.Href("~/Portales/Edit",  Eval("Portal_Id"))%>' >
                      </telerik:RadMenuItem>
                      <telerik:RadMenuItem Text="Eliminar"  NavigateUrl='<%# FriendlyUrl.Href("~/Portales/Delete", Eval("Portal_Id"))%>'>
                           
                      </telerik:RadMenuItem>
                  </Items>
              </telerik:RadContextMenu>
                                         
                      </ItemTemplate>
                  </telerik:GridTemplateColumn>

What I want to do is to navigate through the navigateUrl Property of the radmenuItem and passing the portal_id wich is in a gridboundcolumn but when I click an item it redirects to the page without the portal_id, this behavior only occurs with radcontextmenu, as you can see I placed a label before the  button and bind the text property to the portal_id value and it is set correctly.

 

Can you help me to get the correct redirection with the portal_id parameter.

 

Best Regards

Cristian.

Danail Vasilev
Telerik team
 answered on 29 Oct 2015
3 answers
61 views

Hello,
we're having an issue with RadGrid object on sharepoint 2010 service pack 1environment. When we press the button to perform the update we find a javascript error that does not allow changing the value.
In our development environment we have resolved installing sharepoint service pack 2.
In our production environment  we can’t install the service pack 2. Actually we have installed the devcraft ultimate product (Version=2014.1.403.35).
Do you know if this bug is fixed in later versions or do you have a workaround in order to resolve this issue?

 

Best Regards,

Giulio

Marin
Telerik team
 answered on 29 Oct 2015
7 answers
1.7K+ views
HI,
      I am yogesh. i am working with asp.net ajax rad grid. i need to add checkbox column programmatically and should be able to select multiple rows and export to excel...could anyone help me out plz....its urgent(asp.net with c# code)
Meenakshi
Top achievements
Rank 1
 answered on 29 Oct 2015
3 answers
621 views

 

I would like to store some small SVG image files along with other information about each file as individual records in a SQL Database Table. I have not used SVG files before but I must use then as they are what customer uses/wants.

What SQL data type would I use in a table field where I could upload, download and view SVG files in and from a RadGrid.

What type of Grid column could I use to update, download and view each image in the grid view?

Really not here to discuss pro and con of storing SVG file in a SQL table field.  

I am here to ask for help and example if at all possible to store and view SVG images in a SQL Table record and view in a RadGrid Column.

 Is it doable?  I am using SQLDataSource control on ASP.NET content page as the source for the RadGrid.

 

Thank you very much for any help you can provide.

 

 

Konstantin Dikov
Telerik team
 answered on 29 Oct 2015
5 answers
215 views

Hi, I'm wondering if there is a way to dynamically ajaxify controls outside of a page load / postback event.  The specific scenario is that I have a grid that updates a user control.  The user control acts as a detail area for the items in the grid.  I would like to make it so a page or sort event on the grid does not update the user control, but a row edit or insert event does.  I tried doing this by creating a client event to handle the grid click.  If insert or edit row is clicked, I call a code-behind method to enable the user control update (calling AddAjaxSetting, and then later removing the Ajax setting).  But when I tried this, I got this error:

 

Controls cannot be ajaxified after page prerender

 

Is there another way to accomplish my goal, without doing a postback/reload of the page?  Thanks.

Maria Ilieva
Telerik team
 answered on 29 Oct 2015
3 answers
347 views

Hi

I'm adding custom special day using OnDayRender. this event is not working when i change or navigate to any other month.

here is my code

ASPX:

<telerik:RadDatePicker Calendar-DayNameFormat="Shortest" Calendar-ShowOtherMonthsDays="false" DateInput-ReadOnly="true" DatePopupButton-ImageUrl="/images/calander_icon.gif" DatePopupButton-HoverImageUrl="/images/calander_icon.gif"
                                                                  ID="rdpDeliveryDate" OnLoad="rdpDeliveryDate_Load"  runat="server" >
                                                                 <Calendar ID="Calendar1" runat="server" ShowRowHeaders="false"  OnDayRender="dayRender"  ShowFastNavigationButtons="false" FirstDayOfWeek="Sunday"></Calendar>
                                                             </telerik:RadDatePicker>
 

CS:

protected void rdpDeliveryDate_Load(object sender, EventArgs e)
       {
           (sender as RadDatePicker).MinDate = CommonLogic.CurrentGccTime().Date;
       }
 

protected void dayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        {
 
if (e.Day.Date.DayOfWeek == DayOfWeek.Wednesday|| e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
        {
                        // clear the default cell content (anchor tag) as we need to disable the hover effect for this cell
                        e.Cell.Text = "";
                        e.Cell.CssClass = "rcOutOfRange"; //set new CssClass for the disabled calendar day cells (e.g. look like other month days here)
 
                        // render a span element with the processed calendar day number instead of the removed anchor -- necessary for the calendar skinning mechanism
                        Label label = new Label();
                        label.Text = e.Day.Date.Day.ToString();
                        e.Cell.Controls.Add(label);
                        e.Cell.ToolTip = "Day Off";
 
                        RadCalendarDay dayoff = new RadCalendarDay();
                        dayoff.Date = e.Day.Date;
                        dayoff.IsSelectable = false;
                        dayoff.IsDisabled = true;
                        dayoff.ItemStyle.CssClass = "rcOutOfRange";
 
                        cln.SpecialDays.Add(dayoff);
                         
                    }
}

I'm using  Version 2015.2.826.45,

Visual studio 2012.

Please help me

Appreciate for Quick and best Response

 

Yasin

Konstantin Dikov
Telerik team
 answered on 29 Oct 2015
1 answer
120 views

Hi, every body,

 

Today I try to export pdf from one RadEditor ... but the function throw an nullReferenceException.

Here is my code :

 

RadEditor radEditor = new RadEditor();
radEditor.Content = "<div>Hello</div>";
radEditor.ExportSettings.FileName = "TextFile.pdf";
radEditor.ExportSettings.OpenInNewWindow = true;
radEditor.ExportToPdf();
 

Did I miss something ?

Thanks,

Corentin

RadEditor radEditor = new RadEditor();
radEditor.Content = "<div>Hello</div>";
radEditor.ExportSettings.FileName = "TextFile.pdf";
radEditor.ExportSettings.OpenInNewWindow = true;
radEditor.ExportToPdf();
RadEditor radEditor = new RadEditor();
radEditor.Content = "<div>Hello</div>";
radEditor.ExportSettings.FileName = "TextFile.pdf";
radEditor.ExportSettings.OpenInNewWindow = true;
radEditor.ExportToPdf();
Ianko
Telerik team
 answered on 29 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?