Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
I have a RadGrid with a TemplateColumn that contains an ItemTemplate, InsertItemTemplate & EditItemTemplate.

I am getting the attached error.

My markup is as follows for the RadComboBox in the grid:
<telerik:GridTemplateColumn DataField="description" HeaderText="Service Type" UniqueName="ServiceType">
                                <ItemTemplate>
                                    <asp:Label ID="lblServiceType" runat="server" Text='<%# Eval("description") %>'></asp:Label>
                                </ItemTemplate>
                                <InsertItemTemplate>
                                    <telerik:RadComboBox ID="ServiceTypeDDLIns" runat="server" DataSourceID="SqlDataSource2"
                                        DataTextField="description" DataValueField="code" ValidationGroup="CarrierSvc"
                                        SelectedValue='<%#Bind("code") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ServiceTypeDDLIns"
                                        ForeColor="Red" Text="*This field is required" runat="server" Display="Dynamic"
                                        ValidationGroup="CarrierSvc">
                                    </asp:RequiredFieldValidator>
                                </InsertItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="ServiceTypeDDLEdit" runat="server" DataSourceID="SqlDataSource2"
                                        DataTextField="description" DataValueField="code" ValidationGroup="CarrierSvc"
                                        SelectedValue='<%#Bind("code") %>' />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="ServiceTypeDDLEdit"
                                        ForeColor="Red" Text="*This field is required" runat="server" Display="Dynamic"
                                        ValidationGroup="CarrierSvc">
                                    </asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>

My DataSource is as follows:
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:wmssql03Trident %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SelectServiceType" SelectCommandType="StoredProcedure"
        runat="server"></asp:SqlDataSource>

The results from my sql query is also attached with a column named "description".

I understand what the error means, but don't know why it is getting the error when I see the "description" column coming out in the SQL query.

Can someone please explain to me what I'm doing wrong so I can correct this? I am "dead in the water" with this right now and can't proceed testing until I get some insight what is the problem.....

Thanks in advance....
 
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
214 views
Is it possible to dynamically create a RadButton on the client? 

I tried

var MyBtn = new Telerik.Web.UI.RadButton();

When I do this, I get an error:

Sys.ArgumentException: Value must be a DOM element.
Parameter name: element

Is it possible to do this?
Princy
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
83 views
I have a page that has a Grid on it.  It also has a UserControl that contains a button. How do I add an AjaxSetting to the AjaxManager so that when the Button is clicked, the grid will be updated?

Thanks
Shinu
Top achievements
Rank 2
 answered on 18 Mar 2013
1 answer
144 views
Am using a radgrid. One of the columns is a Telerik:GridTemplateColumn, within which i have the asp:linkbutton. On click of the link button, i need to call a server side method, by passing the value of another column to that. But am getting a parse error. Mu code is:

<telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name" SortExpression="PayeeName">
     <ItemTemplate>
          <div style="display : block; width : 100%" class="blueLinkText">
               <asp:LinkButton ID="lnkReject" runat="server" OnClick="lnkAddVendorID_Click('<%#Server.HtmlEncode(BindingHelper.Format(Eval("PayeeName")))%>')"><%# Server.HtmlEncode(BindingHelper.Format(Eval("PayeeName")))%></asp:LinkButton>
            </div>
       </ItemTemplate>
</telerik:GridTemplateColumn>

When i run this code, i get an error as "Parse Error" The server tag is not well formed.

Have anyone came across such an issue. Please let me know, how to fix this.
Shinu
Top achievements
Rank 2
 answered on 18 Mar 2013
0 answers
135 views
Using Telerik.Web.UI version 2012.3.1120.40
I have a RadNumericTextBox using the js onchange event. This has been working previously, however I now notice the onchange is called again by onTextBoxBlurHandler as (if(this._initialValueAsText+""!==a){this.set_value(a)).
So now my onchange is beting called twice and breaking things.
Was this intended?

Wayne
Top achievements
Rank 1
 asked on 18 Mar 2013
2 answers
120 views
As I have a very large page,I decide to turn the viewstate off.
The problem I am facing now is that when I bind the Grid on PostBack,the TextBox retains the old value and it does not update to new value.
If I use a HTML input type text as shown below,then it binds correctly,but for ASP.Net TextBox it does not.(If the runat="server" attribute is present then it does not and if I remove that attribute it binds.)

For each items in the category I need to provide quantity,then save it and when I select a different category,the gridview will be build using the items of the selected category.So when I select a different category,the textboxes retains the value of previous items.

Does not bind:
<asp:TextBox ID="txtBoxQty" runat="server" Text='<%#DataBinder.Eval(Container, "DataItem.PhysicalWholeUnitsUsableOnHand")%>'
</asp:TextBox>

It does bind:
<input type="text" value='<%#DataBinder.Eval(Container, "DataItem.PhysicalQuantity")%>' />

Even,when I try to provide text in the ItemDataBound Event,it does not take the new value.
Even though,I have disabled the ViewState of the Grid,I am able to access the TextBox Control in the ItemDataBound Event.
I am using DataSet to bind the GridView. eg.gridView.DataSource=dataset;
I am posting all the value using javascript and WebService and then uisng __doPostBack to do a postback.

Kindly let me know if any additional information is required.
Also,kindly let me know how to make the above functionality work.

Thanks
Jignesh





Jignesh
Top achievements
Rank 1
 answered on 17 Mar 2013
3 answers
254 views
Hi

I am new to the RadControls, but I am enjoying using them.

I have an issue with the OnSelectedIndexChanged event not firing and running the codebehind.  I have it working with the standard Microsoft control but can't seem to get this one going.

Below is the code I currently have.

Thanks for your assistant.

Paul

            <div class="equipSalesGrid">  
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Web4.App_code.WebSiteContentDataContext" 
                    Select="new (ShortDescription, EquipmentId, ThumbNailURL)" TableName="EquipmentSales">  
                </asp:LinqDataSource> 
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="False" 
                    DataSourceID="LinqDataSource1" GridLines="None" Skin="Black" Width="260px" PageSize="4" 
                     MasterTableView-DataKeyNames="EquipmentId" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">  
                    <HeaderContextMenu> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </HeaderContextMenu> 
                    <MasterTableView DataSourceID="LinqDataSource1">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px" /> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px" /> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn DataField="EquipmentId" DataType="System.Int32" Display="False" 
                                ReadOnly="True" UniqueName="column2">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="ShortDescription" HeaderText="Item" ReadOnly="True" 
                                SortExpression="ShortDescription" UniqueName="column">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Image">  
                                <ItemTemplate> 
                                    <asp:Image ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ThumbnailURL").ToString().Trim()%>' 
                                        ID="GridImage" runat="server" Height="100px" Width="100px" /> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
                    <Selecting AllowRowSelect="true" /> 
                    </ClientSettings> 
                    <FilterMenu> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </FilterMenu> 
                </telerik:RadGrid> 
            </div> 
 
danparker276
Top achievements
Rank 2
 answered on 16 Mar 2013
4 answers
325 views
<asp:RadioButton ID="rb_yes" runat="server" GroupName="test" Text="Yes" AutoPostBack="true" />
<asp:RadioButton ID="rb_no" runat="server" GroupName="test" Text="No" AutoPostBack="true" />

the above works fine and it does go into the
checkedchanged function.

however, when i put
<telerik:radajaxmanager id="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline" >  
            <ClientEvents OnRequestStart="RequestStart" />
            <AjaxSettings>
                 <telerik:AjaxSetting AjaxControlID="rb_yes">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnl_Test" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="txt_imageurl" />
                        <telerik:AjaxUpdatedControl ControlID="txt_imagename" />
                        <telerik:AjaxUpdatedControl ControlID="btn_uploadImage" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
</telerik:radajaxmanager>

the postback doesn't fire. any ideas?
Adam
Top achievements
Rank 1
 answered on 15 Mar 2013
7 answers
752 views
Hi,

I am setting the datasource in the client side using JQuery to get the data from server. I want to use custom sorting.

 

function Grid_Command(sender, args) {

 

args.set_cancel(

 

true);/

 

 

args.get_commandName(), args.get_commandArgument());
//Do Sorting with JQuery
}

1. How do I know the sorting mode in client side (asc, desc or no sort..)?

2. Also I want to display custom sort image next to the coumn header. How do I do that?

Thanks

Anand
Top achievements
Rank 1
 answered on 15 Mar 2013
2 answers
81 views
Hi,

I have enabled headercontextmenu on my radgrid. On selecting columns, I can see all the columns with checkbox. The scrollbar works when I hower on top and bottom of the containter, but I can't see the scrollbar. Is there a property that I need to set to view the scrollbar.
I tried grid.EnableAutoScroll = true; but that didn't help.

Thanks for your time!
Raj
Raj
Top achievements
Rank 1
 answered on 15 Mar 2013
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?