Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
162 views
If I reference the AntiXss library (4.2.1) and then implement it through web config, e.g:
<system.web>
    <httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary"/>
</system.web>

When rendered, the RadMenu presents all links as href="%23".

How can I ensure RadMenu operates normally after adding AntiXss?

Richard
Richard Weeks
Top achievements
Rank 2
 answered on 22 Jan 2012
2 answers
215 views
Hi all!  I hope someone can help me with this...

I have a radgrid within a tab/pageview displaying a list of records.
I'm using the pageLoad() function to calculate the window height and resize the grid accordingly:

function pageLoad() {
             var $ = $telerik.$;
             var height = $(window).height();
             if (height == 0) {
                 alert('0 height');
             } else {
                 var totalHeight = height - 118;
                 document.getElementById('rGrid_GridData').style.height = totalHeight + "px";
             }
         }


This works fine when first loaded.  When clicking a record in the grid, another tab is opened for viewing and editing the record.
When the record is saved, I'm trying to refresh the grid in the "opener" tab by calling a function that essentially causes a postback.
(openerTabIndex is a variable I pass around to keep track of the correct tab).
function doRefreshOpener(openerTabIndex) {
    var openerPageView = window.top.getTabPageView(openerTabIndex);
    $telerik.getChildrenByTagName(openerPageView.get_element(), "iframe")[0].contentWindow.refreshPage();
}

function refreshPage() {
     __doPostBack('btnHiddenRefresh', '');
}

The problem is that the window height is being returned as 0 in IE8 when the pageLoad() function is called again, which is resulting in a javascript bomb.

Can anyone help me resolve this, or suggest a better way of achieving the same results?

Cheers
Rich
RichJ
Top achievements
Rank 1
 answered on 22 Jan 2012
3 answers
256 views
hi everybody i have some problem for get the value of some radnumerictexbox in my footer template of my radgrid, i have to  save this value in my database when the user push a button
this is my aspx code:



<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
                Width="1300px" GridLines="None" Skin="Sunset">
                <MasterTableView ShowFooter="true">
                    <Columns>
                        <telerik:GridBoundColumn DataField="COD_MATPRIMA" HeaderText="CODIGO">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="NOMMATPRI" HeaderText="NOMBRE">
                        </telerik:GridBoundColumn>
 
                        <telerik:GridTemplateColumn UniqueName="Quantity" HeaderText="UNIDADES">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Type="Number" DataType="System.Decimal" Value="0" ID="unidadesTextBox" runat="server"  Width="75">
                                    <NumberFormat   />
                                    <ClientEvents  OnBlur="recalculate" />
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Price" HeaderText="VALOR UNITARIO">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Type="Number" DataType="System.Decimal" ID="ValorUnitarioTextBox" Value="0" runat="server" Width="75">
                                    <NumberFormat  DecimalDigits="2" />
                                    <ClientEvents OnBlur="recalculate" />
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
                                Total:
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Result" HeaderText="VALOR TOTAL">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Value="0" DataType="System.Double" ID="ResultTextBox" runat="server"  ReadOnly="true">
                                    <NumberFormat  
                                        PositivePattern="$ n" NegativePattern="- $ n"/>
                                </telerik:RadNumericTextBox>
                            </ItemTemplate>
                            <FooterTemplate>
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Jan 2012
1 answer
63 views
I'm new to these radcontrols. I add subitems to panelbar items from my database and every item is expanded. I can't find a method to unexpand all items. Please help me. Thanks
Kugi
Top achievements
Rank 1
 answered on 22 Jan 2012
2 answers
297 views
Hi
I'm using radgrid in my applicaiton very commonly,almost in every page.
I have a requerement where I need to merge two columns headers and give the filter for second column.
curretly i'm doing as follows
<Columns>
     <telerik:GridTemplateColumn DataField="A" AllowFiltering="false">
     <ItemTemplate>
     <asp:Image id="image1"  runat="server" ImageUrl='<%# Bind("abc")%>' ToolTip='<%# Bind("def")%>' Height="15px"  />
     </ItemTemplate>
      </telerik:GridTemplateColumn>
     <telerik:GridHyperLinkColumn FilterControlToolTip="Filter Text"  DataTextField="Name" DataNavigateUrlFields="Name" UniqueName="HyperLinkColumn" DataNavigateUrlFormatString="some text" AllowFiltering="true" HeaderStyle-HorizontalAlign="Left"  FilterControlWidth="90px" Target="frame2" />
      </Columns>
Here I want to merge both grid template column and gridhyperlink column.
I want filter for hyperlink column with left alignment means,it will occupy enterire header.
please help me asap..
Ram
Top achievements
Rank 1
 answered on 22 Jan 2012
4 answers
133 views
Hi,
I have multiple controls (2 grids, 1 treview) with all of them opening separate radwindows via javascript to enter information. The radwindow saves the information and when it closes runs a callback javascript function that uses an ajaxrequest to reload the controls. Now all three use the ajaxrequest and according to the argument passed, the appropriate control is updated. On the page though, all three controls are added to the radajaxmanager list under the ajaxsetting for the ajaxmanager. So all three get updated when only 1 does.

Is there a way to separate this out so that only the control affected will be updated?

Roger
Top achievements
Rank 1
 answered on 22 Jan 2012
19 answers
979 views
i am having radgrid with some fields as  grid bound column and some fields numerictextboxes. I want to multiply one boundfield column(total Quantity) and 2 numerictextboox fields(NoOfDays,Price/Unit)and get the result on another numerictextbox(TotalPrice)  the numeric textboxes are editable and boundfield loaded as per query....and the sum of total price(TotalPrice) to be calculated as footer.......I tried as per the demo and i got the footer values .but i dont know how to multiply the boundfield value using script. which is the event fired on boundfield using script??
Robert
Top achievements
Rank 2
 answered on 22 Jan 2012
2 answers
52 views
hi 
i have a RadGrid control with template edit form implementation, i need to have a subset of controls in edit mode template different from the subset of controls in the add mode template, I've found a way to do that scenario but i'm not sure cause i'm new to Telerik Rad Controls and i did that by setting the controls in panels, at the code behind I've checked the type of the form and depending on the condition these controls turned on or off by setting the visibility property using this snippet:

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
           if (e.Item is GridEditFormInsertItem && RadGridConferences.MasterTableView.IsItemInserted)
           {
               Panel UploadConferenceImage = e.Item.FindControl("UploadConferenceImage") as Panel;
               Panel UploadConferenceNewsletter = e.Item.FindControl("UploadConferenceNewsletter") as Panel;
               Panel ConferenceImagePanel = e.Item.FindControl("ConferenceImagePanel") as Panel;
               RadEditor RadEditorConferenceTxtBody = e.Item.FindControl("RadEditorConferenceTxtBody") as RadEditor;
               if (UploadConferenceImage != null && UploadConferenceNewsletter != null && ConferenceImagePanel != null)
               {
                   UploadConferenceImage.Visible = true;
                   UploadConferenceNewsletter.Visible = true;
                   ConferenceImagePanel.Visible = false;
               }
               else
                   return;
               if (RadEditorConferenceTxtBody != null)
               {
                   RadEditorConferenceTxtBody.Style.Add("margin-top", "55px");
               }
               else
                   return;
           }
       }
  
another option i found is creating my own custom editor, please i need an advice, any help !! 
Rasheed
Top achievements
Rank 1
 answered on 22 Jan 2012
5 answers
712 views
Hi,

I have a radgrid.
<telerik:RadGrid ID="RGStyleGuideRestrictions" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" EnableEmbeddedSkins="False" Skin="Vista">
     <MasterTableView  EditMode="InPlace" DataSourceID="SqlDataSource1"  DataKeyNames="StartDate">
            <Columns>
              <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" UniqueName="StartDate"
               </telerik:GridBoundColumn>
               <telerik:GridTemplateColumn  UniqueName="TemplateColumn" HeaderText="Condition">
                <ItemTemplate>
                    <asp:Label ID= "lblCondition" runat = "server" ></asp:Label>
                </ItemTemplate>
               </telerik:GridTemplateColumn>
             </Columns>
      </MasterTableView>
</telerik:RadGrid>

Inside that few 'GridBoundColumn' are there and also 'GridTemplateCoulmn' are there.
When in server side, I want to access the values inside a 'GridBoundColumn', I can use 'datafield' property to get that. Like this:-
foreach (GridDataItem allitem in RadGrid1.MasterTableView.Items)
{
   if ((allitem["StartDate"].Text.ToString();
}

Now, my question is how to access values inside a 'GridTemplateColumn', as mentioned in aspx file above.
I want to access each value of that column, so that I could do some checking on each value and then move ahead.

Please tell what to do.
I would appreciate it.

thanks a ton:)

Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Jan 2012
6 answers
281 views
I would like to be able to access any menu item at runtime and based on certain logic be able to enable or disable or make it hide. What's the best way to identify each menu item at runtime? How do we give it an ID or some way to identify each one?

Reading form another post from three years ago, it was suggested to use Sitemap Datasource. Is there a better available now?
If we have to use the Sitemap Datasource (using XMLProvider the default), how can we use the icons that we have now at design time?

Thank you in advance!
Ben Hayat
Top achievements
Rank 2
 answered on 21 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?