Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
121 views
Hi guys,

I'm trying to resize an EditableImage on the server side.

// Resize image to the required resolution
EditableImage image = new EditableImage(currentImage);
image.Resize(imageWidth, imageHeight);

Using this code the image is simply cropped to the given resolution. Is this behaviour intended?
I was hoping for the whole image to become bigger or smaller depending on it's original size. 
softwarea
Top achievements
Rank 1
 answered on 24 Sep 2011
0 answers
74 views
Dear All
I hope to find the solution of my first problem post it at this nice forum .
I am developing ASP.Net 3.5 application
using IDE Visual Studio 2008 SP1
Fire Fox 6 web browser

I developed a web user control to work properly I need to disable and enable controls on certain condition on the client side , my user control has an updated panel .And so , I shall use the method
ScriptManager.RegisterStartupScript
Now this method works fine in context of ASP.NET controls , but when try to use it with telerik controls I found two problems

Problem : when try to disable the RadComboBox at page load I git script error that variable to handle RadComboBox is null let us see the below code , Also I got the same problem when put same code in different location were suppose the asp.net loaded successfully .for example, at button click event handler

' Try to execute below code at web user control page load or another location at
' the vb.net asp.net 3.5 code
' I encounter the script error combo is null
 
' str1 of type StringBuilder
str1.Append("var combo = $find('" & RadComboBox1.ClientID & "');")
 
str1.Append("combo.disable();")
 
ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType(), "key1", str1.ToString(), True)


Second : sometimes I got the below script error in the Error Console in the Fire Fox , when trying to execute code like the above code mentioned ealier

Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative"  nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 854"  data: no]
Omar
Top achievements
Rank 1
 asked on 23 Sep 2011
1 answer
74 views
Hi All,

I am trying to fetch the images from database, if no images are available from the data base it is showing "DBNull' Error.

If I write the following code snippet with in the binding value '<%#Eval(Picture):null?Null:Eval("Picture")%> then all the images which even have the content are not getting displayed as required. Please do help me out of this problem.

Thanks,
Syed Danish
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
1 answer
88 views

Posted 1 minute ago (permalink)

Hi,
   I have been stuck on this problem for a couple of days and even with trying everything havnt been able to resolve this. I am using a Masterpage and content pages with RadGrid. I have read its better to put a RadAjaxManager on the main page and use RadAjaxmanagerproxy on each page. I have some common functions like the Show/Hide filters functionality as shown in the demos. Instead of having these and other Grid client side events I want to put  these common client side event in the Masterpage or preferably in an external js file but when i take them out and put them in the Masterpage it just does not let me access the Grid client side events like .get_MasterTableView() . Can someone from Telerik please show with an example how to access the grid and the grids clientside events in the Masterpage? Also can I call the functions  (showFilterItem() /hideFilterItem()) like showFilterItem(gridID)  and pass the GridClient ID to the masterpage somehow? I have these filter options on every page and dont want to repeat these and other client side events on every page or hard code the GridID (GridProducts, GridOrders etc) in the function like i am doing below, can someone show me by code example please how to pass in the Grid ID on every page to the master page to access the grid from there?

Note*: I did var grid = $('[id$=GridProducts]')[0];   in the Masterpage javscript since Masterpages changes the ID of the grid and it becomes something like ct100_Masterpagecontent_productGrid.

Please give an example in code on how to do this since im sure having common client side functionality is a common request and would hopefully others as well. Thanks in advance!


ON MASTER PAGE JAVASCRIPT:  
    
 <script type="text/javascript"
    
        function showFilterItem(grid) { 
                    
                //This finds the grid object but I cannot access  get_masterTableView() functions  
                var grid = $('[id$=GridProducts]')[0]; 
                    
              //Throws error Object reference not found??? 
                grid.get_masterTableView().showFilterItem(); 
            
    
            function hideFilterItem(grid) { 
                                           //Throws error cant find get_masterTableView() ??
                       grid.get_masterTableView().hideFilterItem();   
            
    
    </script
    
    
    
CONTENT PAGE HTML  
    
 <div style="text-align:center"
          <br /> 
            
             Show Filters:<input id="rad1" type="radio" name="showHideGroup" checked="checked" onclick="showFilterItem()" /><label for="rad1">Yes</label
                          <input id="rad2" type="radio" name="showHideGroup"  onclick="hideFilterItem()" /><label for="rad2">No</label
    
         </div>
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
3 answers
316 views
Hi

I have a grid with has paging enabled.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
    AllowPaging="True"  PageSize="5" ShowFooter="True" AllowSorting="True" AutoGenerateColumns="False" 
    CellSpacing="0"  GridLines="Both"
        ondeletecommand="RadGrid1_DeleteCommand" 
        onneeddatasource="RadGrid1_NeedDataSource" 
        onupdatecommand="RadGrid1_UpdateCommand" 
    oninsertcommand="RadGrid1_InsertCommand" onitemcreated="RadGrid1_ItemCreated" 
        onitemdatabound="RadGrid1_ItemDataBound" 
        Skin="Office2007" onitemcommand="RadGrid1_ItemCommand">

There is a Page-Size dropdown at the bottom of grid, having 5,10,20,50 as options. right now there are only 6 records, 
if user selects page size to 20 or 50,  the paging controls disappear.    What if user wishes to reset or set a new pagesize ?

We want that the pagesize control should remain on screen.  any workaround ?

-JD





Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
1 answer
119 views
Hi,
   I have been stuck on this problem for a couple of days and even with trying everything havnt been able to resolve this. I am using a Masterpage and content pages with RadGrid. I have read its better to put a RadAjaxManager on the main page and use RadAjaxmanagerproxy on each page. I have some common functions like the Show/Hide filters functionality as shown in the demos. Instead of having these and other Grid client side events I want to put  these common client side event in the Masterpage or preferably in an external js file but when i take them out and put them in the Masterpage it just does not let me access the Grid client side events like .get_MasterTableView() . Can someone from Telerik please show with an example how to access the grid and the grids clientside events in the Masterpage? Also can I call the functions  (showFilterItem() /hideFilterItem()) like showFilterItem(gridID)  and pass the GridClient ID to the masterpage somehow? I have these filter options on every page and dont want to repeat these and other client side events on every page or hard code the GridID (GridProducts, GridOrders etc) in the function like i am doing below, can someone show me by code example please how to pass in the Grid ID on every page to the master page to access the grid from there?

Note*: I did var grid = $('[id$=GridProducts]')[0];   in the Masterpage javscript since Masterpages changes the ID of the grid and it becomes something like ct100_Masterpagecontent_productGrid.

Please give an example in code on how to do this since im sure having common client side functionality is a common request and would hopefully others as well. Thanks in advance!


ON MASTER PAGE JAVASCRIPT: 
  
 <script type="text/javascript">
  
        function showFilterItem(grid) {
                  
                //This finds the grid object but I cannot access  get_masterTableView() functions 
                var grid = $('[id$=GridProducts]')[0];
                  
              //Throws error Object reference not found???
                grid.get_masterTableView().showFilterItem();
            }
  
            function hideFilterItem(grid) {
                                           //Throws error cant find get_masterTableView() ??
                       grid.get_masterTableView().hideFilterItem();   
            }
  
    </script>
  
  
  
CONTENT PAGE HTML 
  
 <div style="text-align:center">
          <br />
          
             Show Filters:<input id="rad1" type="radio" name="showHideGroup" checked="checked" onclick="showFilterItem()" /><label for="rad1">Yes</label>
                          <input id="rad2" type="radio" name="showHideGroup"  onclick="hideFilterItem()" /><label for="rad2">No</label>
  
         </div>

Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
5 answers
656 views
I have a scrollable grid and I am having trouble with the alignment of grid on IE7 and IE8.

I have attached a screenshot of what the page looks like in IE 7 and IE 8. I am using the latest RadControls for ASPNET AJAX
Below is my aspx:

<style type="text/css">       
        .rgExpand, .rgCollapse
        {
            display: none !important;
        }
        /*remove group splitter column padding*/
        .rgGroupCol
        {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
    </style>
    <br />
    <div style="width: 100%; text-align: center;">
        <table border="0" cellspacing="0" class="calendar" style="margin-left: auto; margin-right: auto;
            width: 980px; table-layout: fixed; border-style: none; text-align: left">
            <tr>
                <td colspan="8">
                    <br />
                </td>
            </tr>
            <tr>
                <th colspan="8" style="height: 23px; text-align: left; background: gray; width: 980px">
                    <table width="980px">
                        <tr>
                            <td style="color: #000000; font-size: 10pt; width: 100px">
                                User Calendar 
                            </td>
                            <td style="width: 200px">
                                  
                            </td>
                            <td style="width: 650px">
                                <asp:Label ID="DateLabel" runat="server" ForeColor="White"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </th>
            </tr>
            <tr style="background-color: #a7a7a9;">
                <td colspan="8">
                    <table width="980px">
                        <tr>
                            <td style="color: Black; text-align: right">
                                Date Range
                            </td>
                            <td style="text-align: left;">
                                <table >
                                    <tr>
                                        <td>
                                              
                                        </td>
                                        <td>
                                                                                    </td>
                                        <td>
                                                                                    </td>
                                        <td>
                                                                                   </td>
                                    </tr>
                                </table>
                            </td>
                            <td style="color: Black; text-align: right">
                                Activity Type
                            </td>
                            <td style="text-align: left">
                                                            </td>
                            <td style="color: Black; text-align: right">
                                Status
                            </td>
                            <td style="text-align: left">
                                                            </td>
                            <td style="color: Black; text-align: right">
                                Participant Level
                            </td>
                            <td>
                                                           </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr >
                <td colspan="8" style="text-align: left; vertical-align: middle; font-size: 11pt">
                    <telerik:RadGrid ID="RadGridCalendar" runat="server" GridLines="None" AllowPaging="true"
                        PageSize="20" AllowFilteringByColumn="true" Width="980px" ShowHeader="true" OnColumnCreated="RadGridCalendar_ColumnCreated"
                        OnItemCreated="RadGridCalendar_ItemCreated" OnItemDataBound="RadGridCalendar_ItemDataBound"
                        OnPreRender="RadGridCalendar_PreRender" AutoGenerateColumns="False" EnableLinqExpressions="false"
                        ShowGroupPanel="false" OnItemCommand="RadGridCalendar_ItemCommand" AllowSorting="true"
                        AllowCustomPaging="false" OnNeedDataSource="RadGridCalendar_NeedDataSource">
                        <ClientSettings Resizing-AllowColumnResize="true">
                            <ClientEvents OnGridCreated="GridCreated" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="450px" />
                        </ClientSettings>
                                                <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" ClientDataKeyNames="ActivityID"
                            Width="100%" CommandItemDisplay="Top" DataKeyNames="ActivityID">
                            <GroupByExpressions>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="ToDoType" HeaderText=" " HeaderValueSeparator=""
                                            FormatString="{0}" SortOrder="Ascending"></telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="ToDoType"></telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                                <telerik:GridGroupByExpression>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="ActivityDate"></telerik:GridGroupByField>
                                    </SelectFields>
                                    <GroupByFields>
                                        <telerik:GridGroupByField FieldName="Date" FormatString="{0:d}" SortOrder="Descending">
                                        </telerik:GridGroupByField>
                                        <telerik:GridGroupByField FieldName="ActivityDate" FormatString="{0:D}" SortOrder="None">
                                        </telerik:GridGroupByField>
                                    </GroupByFields>
                                </telerik:GridGroupByExpression>
                            </GroupByExpressions>
                            <Columns>
                                <telerik:GridTemplateColumn UniqueName="DateColumn" HeaderText="Date">
                                    <ItemStyle Width="60px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="60px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="TimeColumn" HeaderText="Time">
                                    <ItemStyle Width="110px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="110px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <%# DataBinder.Eval(Container.DataItem, "StartTime") %>
                                            <asp:Label ID="Label1" runat="server" Visible='<%# !Convert.IsDBNull(Eval("EndTime")) %>'>-</asp:Label>
                                            <%# DataBinder.Eval(Container.DataItem, "EndTime") %>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Subject" HeaderText="Subject">
                                    <ItemStyle BorderStyle="None" Width="200px"></ItemStyle>
                                    <HeaderStyle Width="200px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                                                                            
                                            <asp:Label ID="LabelSubject" runat="server" CssClass="label" Width="1px" Visible="false"><%# Eval("Subject")%></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Location" HeaderText="Location">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelLocation" runat="server" Text='<%# Eval("Location")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="DueDate" HeaderText="Due Date">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelDueDate" runat="server" Text='<%# Eval("DueDate")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Contact" HeaderText="Contact">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelContact" runat="server" Text='<%# Eval("Contact")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelDescription" runat="server" Text='<%# Eval("Description")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="ActivityStatus" HeaderText="Status" Visible="false"
                                    DataField="ActivityStatus" AllowFiltering="true">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelStatus" runat="server" Text='<%# Eval("ActivityStatus")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="ActivityType" HeaderText="Type" Visible="false"
                                    AllowFiltering="true" DataField="ActivityType">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelType" runat="server" Text='<%# Eval("ActivityType")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="ActivitySubType" HeaderText="Sub-Type" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelSubType" runat="server" Text='<%# Eval("ActivitySubType")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Keywords" HeaderText="Keywords" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelKeyword" runat="server" Text='<%# Eval("Keyword")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Priority" HeaderText="Priority" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelPriority" runat="server" Text='<%# Eval("Priority")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Company" HeaderText="Company" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelEmployer" runat="server" Text='<%# Eval("Employer")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Phone" HeaderText="Phone" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelPhone" runat="server" Text='<%# Eval("Phone")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="Participants" HeaderText="Participants">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelParticipants" runat="server" Text='<%# Eval("Participants")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="TimeSpent" HeaderText="TimeSpent" Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelTimeSpent" runat="server" Text='<%# Eval("TimeSpent")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="PercentComplete" HeaderText="% Complete"
                                    Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelPercentComplete" runat="server" Text='<%# Eval("PercentComplete")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn UniqueName="SmartPadNote" HeaderText="Latest SmartPad Note"
                                    Visible="false">
                                    <ItemStyle Width="100px" BorderStyle="None"></ItemStyle>
                                    <HeaderStyle Width="100px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <div>
                                            <asp:Label ID="LabelSmartPadNote" runat="server" Text='<%# Eval("LatestSmartPadNote")%>'></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="ActivityID" Visible="false" UniqueName="ActivityID">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="Date" AllowFiltering="true" Visible="false"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="Date">
                                </telerik:GridDateTimeColumn>
                                <%-- <telerik:GridBoundColumn DataField="ActivityStatus" AllowFiltering="true" Visible="false"
                                    UniqueName="Status">
                                </telerik:GridBoundColumn>--%>
                                <telerik:GridBoundColumn DataField="ActivityParticipant" AllowFiltering="true" Visible="false"
                                    UniqueName="ActivityParticipant">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ActivityParticipantPrimary" AllowFiltering="true"
                                    Visible="false" UniqueName="ActivityParticipantPrimary">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="PrimaryParticipant" Visible="false" UniqueName="PrimaryParticipant">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ActivityParticipantCreatedBy" Visible="false"
                                    UniqueName="CreatedBy">
                                </telerik:GridBoundColumn>
                            </Columns>
                            <HeaderStyle Width="125px" />
                            <CommandItemTemplate>
                                <asp:ImageButton ID="ImageButtonAdd" runat="server" ImageUrl="~/App_Themes/MLightning/Layout/plus-icon.png"
                                    AlternateText="Add" PostBackUrl="~/Calendar/CalendarActivityAddSettings.aspx" /> 
                                <asp:LinkButton ID="LinkButtonExport" runat="server" CommandName="ExportToPdf" CausesValidation="false">
                                    <img style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/MLightning/Layout/Reader.gif" />
                                    <span class="printTop" > Export</span>
                                </asp:LinkButton>  
                            </CommandItemTemplate>
                            <PagerStyle Position="TopAndBottom" PrevPageText="Prev" NextPageText="Next" Mode="NextPrev" />
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr style="width: 980px">
                <td colspan="8" align="center">
                    <br />
                       
                    <asp:Button ID="btnCancel" runat="server" OnClientClick="location.href='../Lookup.aspx';return false;"
                        Text="Cancel" />                </td>
            </tr>
        </table>
    </div>

If I change anything to adjust it according to one browser, it starts affecting the other browser. This is really bothering me. Please help.
Let me know if you need more info.
Jason
Top achievements
Rank 2
 answered on 23 Sep 2011
0 answers
36 views
At which event the data of a CalculatedGridColumn is bound to the Grid?

ItemDataBound event only has data for the BoundColumns.

Update:
sorry I meant GridHyperLinkColumn is not bound on ItemDataBound; GridCalculatedColumn is fine.
Pooya
Top achievements
Rank 1
 asked on 23 Sep 2011
3 answers
137 views
when i click on "RadControls for ASP.NET AJAX Q2 2011 Documentation" shortcut or "RadControls for ASP.NET AJAX Q1 2011 Documentation"

both of them they go to    http://msdn.microsoft.com/EN-US/library/D51A087E-5B68-446B-81F2-CA0F1AEB3C79 


which it has 

Page Not Found
We're sorry, but the page you requested could not be found. Please check your typing and try again, or use the search option on this page.

Joe
Top achievements
Rank 2
 answered on 23 Sep 2011
3 answers
241 views
I have the below GridCalculatedColumn object and it's being added to the GridTableView but it fails at runtime:

var calculatedColumn = new GridCalculatedColumn
            {
                DataFields = "Volume",               
                Expression = "iif({0}=null,'NA',{0}*100)",
                DataFormatString = "{0:0.00}%",               
            };

What is required to be done is that if the "Volume" field is null, it should display "NA" text otherwise it should display the Volume in 0:0.00 format.

How to achieve this with GridCalculatedColumn?

I'm getting this error:
Telerik.Web.UI.ParseException: Neither of the types 'String' and 'Nullable`1' converts to the other.

The data type of {0} i think is Nullable<decimal>.

Another try:

I removed the DataFormatString and put this expression:
iif({0}.HasValue, Convert.ToString({0}.Value), "NA")

and it worked but it just shows data in a different format e.g. it displays as 100.40 rather than 100.40%.

How to apply formatting inside the expression?

I used String.Format() but it gave an error message.

 Thanks guys,
Pooya
Top achievements
Rank 1
 answered on 23 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?