Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
178 views
I get an error on export if the data contains "<" or ">" b/c it thinks its part of the XML when it is exporting to PDF.  When I replace these characters it messes up the RadGrid.  Is there a solution to this?  Thanks.
Daniel
Telerik team
 answered on 12 Jun 2009
4 answers
454 views
Hi,

I want to add value for ConfirmText in run time. I have a ragdrid and gridbuttoncolumns. Of that first column is an image button and rest are some data from the db. On clicking that button in the grid, we can set a confirmtext in design time. But I need the text to be set during runtime in my C# code. Is that possible?

Thanks.
Saranya
Saranya
Top achievements
Rank 2
 answered on 12 Jun 2009
1 answer
216 views
I have a unique reqiuremnt for validation.

I have 2 bound fields and a calculated fiels that is the difference of the 2 bound fields.
if the difference is not zero than the user must add a comment (a third bound field).  The validation must make sure something is in the comment field.  If the difference is zero the comment is optional

I am using a custom validator and i a correctly entering it.  I guess what i need is a javascript function that will return me the value of a calculated field

Thanks in advance, john
Veli
Telerik team
 answered on 12 Jun 2009
1 answer
108 views
Hello everyone,

Here is what i am trying to do.

I am trying to hide a Gridcolumn in a RadGrid.

I have found the code to do it... i just don't seem to get it to fire when i am first loading the Grid.

Here is my setup

Radtabstrip (6 tabs) with RadMultipage with 6 RadPageviews
each tab(views) has a RadGrid in it.  Each one of the grids has a maximum amount of columns that can be displayed and i have a check box control that limits what is displayed.

I have the code that iterates through the checkboxlist and hides the columns... I just cannot get this code to fire when the page first loads...

Where should i be putting this code in (right now it is in the checkboxlist selecteditem changed event... which is good ... but i also need this filtering done on first page load.

Thanks for any ideas...

Corey
Princy
Top achievements
Rank 2
 answered on 12 Jun 2009
3 answers
167 views
I am using RadAjaxManager in master page. we are loading pages in Master page. we placed the RadAjaxManager for loading particular forms when click the button.everything work fine.

If i tried to redirect the page using the Server.Transfer then it was not able to redirect and its giving error 
    "error executing child request default.aspx". If I remove the Ajax manager it was loading the page with out error.

I want to use server.transfer to redirect(need to maintain same url).

If any sample of code appreciate.

Pls help me out to find the solution.
Vlad
Telerik team
 answered on 12 Jun 2009
2 answers
1.1K+ views
Greetings
when i try to debug my web applicaton


Line 6:  <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

how i can fix it 

NB: it was work!

More info

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
afnan
Top achievements
Rank 1
 answered on 12 Jun 2009
3 answers
235 views
In your examples you use a special SessionDataSource and asp:AccessDataSource on the asp page. At our installation we do not place datasources on the asp page - they are usually implemented as typed/non-typed datasets stored in a session variable that are bound to the grid in the grid_NeedDataSource  event: grid.DataSource = DataTable; 
What do I need to do for Command item Template model to work  as it does in your example?
Vlad
Telerik team
 answered on 12 Jun 2009
2 answers
390 views

Hi,

my problem is that i want to filter clientside.

Within tabs i use the RadGrid - Control.

To Filter clientside i define in the RadGrid

  • a <ClientSettings> Section and
  • a the MasterTAbleView - Attribute "DataKeyNames"

But when i go through the Records the Statement:
(Triggert by RadComboBox OnClientSelectedIndexChanged)

DataItems[i].getDataKeyValue("DataKeyName")

is always null.

Here the Code snippets

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
    <script type="text/javascript">  
 
        var RadGrid1;  
 
        function GetGridObject(sender, eventArgs) {  
             RadGrid1 = sender;  
        }  
 
        function OnClientSelectedIndexChanged(sender, eventArgs) {  
 
            var item = eventArgs.get_item();  
            if (item.get_value() == "1") {  
                 ShowRow();  
            }  
            else {  
                ShowRow();  
                HideRow(item.get_text());  
            }  
             
 
           }  
 
          function HideRow(absencetype) {  
            var DataItems = $find("<%=rdgInbox.ClientID %>").get_masterTableView().get_dataItems();  
                     
              
            for (i = 0; i < DataItems.length; i++) {  
                
                    if (DataItems[i].getDataKeyValue("WText") == absencetype) {  
                        RadGrid1.get_masterTableView().hideItem(i);  
                         
                    }                                  
            }  
        }  
 
        function ShowRow() {  
 
            var DataItems = $find("<%=rdgInbox.ClientID %>").get_masterTableView().get_dataItems();  
            for (i = 0; i < DataItems.length; i++) {  
                RadGrid1.get_masterTableView().showItem(i);  
            }  
        }  
 
    </script> 
 
</telerik:RadCodeBlock> 
 
      
<table cellpadding="0" cellspacing="0" width="100%">  
    <tr> 
        <td> 
            <telerik:RadToolBar ID="rdtbWorklist" runat="server" Style="display: block; float: none" Visible="false" 
                Width="100%">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                <Items> 
                    <telerik:RadToolBarButton Value="rtbWorklistTypes">  
                        <ItemTemplate> 
                            <telerik:RadComboBox ID="rcbWorklistTypes" runat="server" CssClass="DefaultText"  OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" 
                                DataTextField="Shorttext" 
                                DataValueField="Shorttext" HighlightTemplatedItems="True">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </telerik:RadComboBox> 
                        </ItemTemplate> 
                    </telerik:RadToolBarButton> 
                </Items> 
            </telerik:RadToolBar> 
        </td> 
    </tr> 
    <tr> 
        <td width="100%">  
            <telerik:RadGrid ID="rdgInbox" 
                             runat="server"   
                             AutoGenerateColumns="False" 
                             GridLines="None"   
                             AllowPaging="True" 
                             onneeddatasource="rdgtInbox_NeedDataSource"   
                             PageSize="8" 
                             AllowSorting="true">  
                <HeaderContextMenu> 
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
 
                <MasterTableView DataKeyNames="WText" ShowHeadersWhenNoRecords="true" AllowSorting="True" runat="server">  
                     
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="WId" UniqueName="WiId" Visible="false">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn HeaderText="Category" SortExpression="WText" UniqueName="WText" DataField="WText">  
                            <ItemTemplate> 
                                <asp:Label ID="lblTaskCategory" runat="server" Text='<%# GetTaskCategory(Eval("WTask")) %>' ToolTip="" /> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn HeaderText="Decision" SortExpression="" UniqueName="Decision">  
                            <ItemTemplate> 
                                <asp:DropDownList ID="ddlDecision" DataSource='<%# GetDataSource(Eval("WTask")) %>' DataValueField="Description" DataTextField="Shorttext" runat="server"></asp:DropDownList> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn HeaderText="Description" DataField="WiText"   
                            UniqueName="WiText">  
                            <ItemTemplate> 
                                <asp:LinkButton ID="lbWiText" runat="server"   
                                    CommandArgument='<%# Eval("WiId") %>'   
                                    CommandName="ShowDetails"   
                                    Text='<%# Eval("WiText") %>' OnCommand="btnShowDetails">  
                                </asp:LinkButton> 
                        </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridDateTimeColumn HeaderText="Created Date" DataField="WiCreatedDate" AllowSorting="true" 
                            UniqueName="WiCreatedDate" DataFormatString="{0:d}">  
                            <ItemStyle Width="100px" /> 
                        </telerik:GridDateTimeColumn> 
                        <telerik:GridBoundColumn HeaderText="Status" DataField="Statustext" AllowSorting="true" 
                            UniqueName="Statustext">  
                            <ItemStyle Width="100px" /> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="true" /> 
                    <ClientEvents OnGridCreated="GetGridObject"></ClientEvents> 
                </ClientSettings> 
                <FilterMenu> 
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 
        </td> 
    </tr> 
</table> 

In the function HideRow is my problem located. DataItems[i].getDataKeyValue("WText")  is always NULL

Thanks for help
Laz
Top achievements
Rank 1
 answered on 12 Jun 2009
7 answers
161 views

I'm adding an image to a leaf node in code-behind like this:

rNode.ImageUrl = "images/icon_navflag.gif"

 

This works fine. Now, I'd like to move the position of the image to the left about 50px within the treeview. How can I do it?

Yana
Telerik team
 answered on 12 Jun 2009
2 answers
132 views
Hi There,

Here is my error:
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation

I have a button within my RadGrid. The button is supposed to fire the event RadGrid1_ItemCommand but it doesn't even get there. Instead I get that error. I have a RadScriptManager on my masterpage so I can add another one. I've tried EnableEventValidation="true" I've tried to even add it to the web.config but I keep receiving this error.

Any help would be appreciated thanks.

edit: Incase it matters. The Button carries the RecordId as an Argument which I want to use in code. If it got there.
peter
Top achievements
Rank 1
 answered on 12 Jun 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?