Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
300 views
hi all,
  
  I am using a Template Form to edit values from a RadGrid, When the grid is displayed the checkboxes appear to be properly bound, and are showing the correct "checked state", based on the value of 1 or 0 coming from the back-end.

  However, when I try to update from this edit form, I consistently get the error message "Cannot insert the value NULL into column DepositReceived ...."

   I can understand that on a new record ( INSERT ) that these values might be interpreted as NULL, however, as I've just returned the existing data, with valid checkbox values, I don't understand why they are still being seen as NULL ??? This is for all check boxes, including those which are "True" and checked ( please see attached image file )

   In the EditForm, I am binding as follows :
<asp:CheckBox ID="cbDepositReceived" runat="server" Checked='<%#Eval("DepositReceived") %>' />

  In the Grid, I am binding as follows :

<telerik:GridCheckBoxColumn DataField="DepositReceived" DataType="System.Boolean"
                                 HeaderText="DepositReceived" SortExpression="DepositReceived" UniqueName="DepositReceived"
                                 Visible="False" DefaultInsertValue="False" ConvertEmptyStringToNull="False">
                            </telerik:GridCheckBoxColumn>

  Any suggestions are very welcome -- I really don't want to have to deal with code-behind and hopefully I've missed something simple.

  thanks in advance
 b. stensrud
    
Brian
Top achievements
Rank 1
 answered on 20 Apr 2011
2 answers
109 views
I was wondering if there was a work around or another way of handling the load on demand functionality for the combo box that does not result in the "Non-Negative Number Required" error when scroll down? Currently we are working on the ASP.Net AJAX Q3 2009 Net35 version, I dont believe there is a free upgrade to the latest version is there?
Shinu
Top achievements
Rank 2
 answered on 20 Apr 2011
1 answer
779 views
on a button click "btn1_Click" event on server side, i want to change the time value in the raddatetimepicker to a new time value.
Is this possible?

thanks in advance
Shinu
Top achievements
Rank 2
 answered on 20 Apr 2011
4 answers
291 views
I'm trying to make a label control update to display the key value for the users row selection in a Radgrid.  For some reason I can't get this to work.  Data is populated by way of some Linq to Entities code in a separate class.  Can someone show me what I'm doing wrong?

Below is the relevant code from my aspx page and code behind.  

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="654px"
            width="654px">
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server"
            ontabclick="RadTabStrip1_TabClick" SelectedIndex="0" AutoPostBack="True"
            Skin="Vista">
                <Tabs>
                    <telerik:RadTab runat="server" Text="Pending" Selected="True">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="In Storage">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Returned">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
            <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None"
                Height="300px" Width="654px" OnItemCommand="RadGrid1_ItemCommand"
                AutoGenerateColumns="False">
                <ClientSettings EnablePostBackOnRowClick="True">
                    <Selecting AllowRowSelect="True" />
                    <Scrolling AllowScroll="True" />
                    <Resizing AllowColumnResize="True" />
                </ClientSettings>
                <MasterTableView Width="100%" DataKeyNames="Tag">
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Tag"
                            FilterControlAltText="Filter column column" HeaderText="Tag"
                            UniqueName="column">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Name"
                            FilterControlAltText="Filter column1 column" HeaderText="Name"
                            UniqueName="column1">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="Received"
                            FilterControlAltText="Filter column2 column" HeaderText="Received"
                            UniqueName="column2">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn DataField="Shipped"
                            FilterControlAltText="Filter column3 column" HeaderText="Shipped"
                            UniqueName="column3">
                        </telerik:GridDateTimeColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>
            <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
        </telerik:RadAjaxPanel>

public partial class Inventory : System.Web.UI.Page
{
            
    protected void Page_Load(object sender, EventArgs e)
    {
         
        string CurrentUserEmail = Membership.GetUser().Email;
 
        int CurrentUserId = Sample.Data_Access.UserViewModel.GetUserIdByEmail(CurrentUserEmail);
 
        Label1.Text = CurrentUserEmail;
 
        int StatusID;
 
        StatusID = RadTabStrip1.SelectedIndex;
 
        RadGrid1.DataSource = Sample.Data_Access.PackageViewModel.GetUserBoxesByStatus(CurrentUserId, StatusID);
        RadGrid1.DataBind();
                   
                                 
    }
     
        protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
        {
         
        string CurrentUserEmail = Membership.GetUser().Email;
 
        int CurrentUserId = Sample.Data_Access.UserViewModel.GetUserIdByEmail(CurrentUserEmail);
 
        Label1.Text = CurrentUserEmail;
 
        int StatusID;
 
        StatusID = RadTabStrip1.SelectedIndex;
 
        RadGrid1.DataSource = Sample.Data_Access.PackageViewModel.GetUserBoxesByStatus(CurrentUserId, StatusID);
        RadGrid1.DataBind();
 
        }
 
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            Label3.Text = RadGrid1.SelectedItems[0].OwnerTableView.DataKeyValues[RadGrid1.SelectedItems[0].ItemIndex]["column"].ToString();
            //Label2.Text = RadGrid1.SelectedItems[0].OwnerTableView.DataKeyValues[RadGrid1.SelectedItems[0].ItemIndex]["tag"].ToString();
            //e.ToString() = Label3.Text;
        }
 
 
 
    //TextBox1.Text = grdCategory.SelectedItems[0].OwnerTableView.DataKeyValues[grdCategory.SelectedItems[0].ItemIndex]["category_id"].ToString();
 
               
 
}
Daniel
Top achievements
Rank 1
 answered on 19 Apr 2011
1 answer
289 views
We populated radComboBox in page_load method once it not from post back. When the user click a button and we will read selected item using following code

cmbCustAcctNo.SelectedItem.Text

However, we got object null reference because SelectedItem is null. We have verified EnableLoadOnDemand = false and AllowCustomText = false. Do we miss anything? 

version: 2008.2.826.35

<telerik:RadComboBox ID="cmbCustAcctNo" Width="128px"
    runat="server" Skin="Office2007" CausesValidation="false" AutoPostBack="true"
    ToolTip="Select Account Number"
    onselectedindexchanged="cmbCustAcctNo_SelectedIndexChanged">
</telerik:RadComboBox>

IList<prcWebAccountsForUserResult> listOfAcctNo = accountNumbers.ToList();
cmbCustAcctNo.DataSource = listOfAcctNo;
cmbCustAcctNo.DataTextField = "AccountNumber";
cmbCustAcctNo.DataValueField = "AccountNumber";
cmbCustAcctNo.DataBind();
Helen
Telerik team
 answered on 19 Apr 2011
2 answers
64 views
Hi Telerik team,

We got an issue when we use RadEditor ajax to input email address.  The issue happens in IE only

To replicate issue:

1. open the editor in IE, try to input email format string ( such as 123@hotmail.com ) then enter a space after it
2. right-click on the link and select properties.
3. enter a Subject and click OK.
4. Right-click on the link and select properties, you will see the Subject link is empty.

 Firefox has no such issue.

Thanks,
lan luo
Top achievements
Rank 1
Iron
 answered on 19 Apr 2011
3 answers
86 views
Hai how to disable the resizing of the editor window..? also, is their any option to give page break inside the editor..???
Rumen
Telerik team
 answered on 19 Apr 2011
1 answer
95 views
Hi,
I'm very new to Ajax and am trying to update a RadPanelBar on the Master page from a User Control to display or hide certain options.

The example reads like this:
1. Project page loads Control1, hide RadPanelBarItems (1 thru X) on the Master page
2. Project page loads Control 2, show RadPanelBarItems (1 thru X) on the Master page

The first page to load is Control 1, and I have been able to get #1 above to work, but then if I load Control 2 I don't get #2 above to work.

I am guessing I need to update this panelbar on the Master Page dynamically from the Project Page, but I have tried all of the examples for doing this without any luck.

RadAjaxManagerProxy's Name on the master page: "ram"
RadPanelbar's Name on the master page: "rpbMain"

Project's Page Load:
Dim AjaxManagerProxy As RadAjaxManagerProxy = CType(Me.Master.FindControl("ram"), RadAjaxManagerProxy)
Dim PanelBar As RadPanelBar = CType(Me.Master.FindControl("rpbMain"), RadPanelBar)
 AjaxManagerProxy.AjaxSettings.AddAjaxSetting(rsProjects, PanelBar)

Both Dim'd objects always return as nothing and I get an object ref not set error.

Thanks,
Jason
Iana Tsolova
Telerik team
 answered on 19 Apr 2011
3 answers
106 views
Hello,

I am trying to use the treeview in the RadComboBox: http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/treeviewcombobox/defaultcs.aspx?product=combobox

I'm having two issues I can't figure out why:

1. The text of the item isn't changing when disabled.  When the control is disabled to prevent the user from changing the value, the value is not changing when set from server-side code.  I have rcbCode.Items[0].Text = "New Value", but the old value still appears.
2. Initially, when hitting the drop down the first time, the drop down is pretty small, but later on it returns to the correct size.  I am explicitly setting a CSS class for the drop down at 500px, but the first time it drops down to 200px.

Any ideas why?

Thanks.
Dimitar Terziev
Telerik team
 answered on 19 Apr 2011
3 answers
62 views
Hi!

Is there any way for localization of help help page in multiple languages?

I have seen this topic but proposed approach will work only for 1 language.
Rumen
Telerik team
 answered on 19 Apr 2011
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
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
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?