Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
Hi,

I'm displaying the reults in the radgrid based on the dropdown value change
for example one of my dropdown value "INS1" giving the 200 records.So in my grid i'm displaying the 200 records as 20 pages(means 10 records per page(ISSUE1.png)) and i navigated to 15th page.
after that i selected one more value "INS2" from dropdown which gives 100 records( in my grid i suppose to  display the 100 records as 10 pages(means 10 records per page),like ISSUE3.png).But i not able to see the results in grid as i was on 15th page of previous selected value("INS1") results.but  INS2 has 10 pages only So i not able to see the results(no results are showing(ISSUE2.png)).

For Reference Please find the below 3 screen shots

Tsvetoslav
Telerik team
 answered on 04 Jul 2012
3 answers
159 views
I want to achieve the following:

I have two Listboxes, one contains available items, the other contains 'current' items. The user must be able to transfer available items into the current items' listbox, or back again to the available items' listbox, which is standard functionality, so no problem there.

HOWEVER, the current items may not be transferred into the available items' listbox, so I need a way to prevent this, but I don't see how.. Is this possible?
CRMR
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
163 views
Hey,

I call a method OnItemDatabound that loads a Control for the ItemTemplate. This works fine, however always at the top of the list the default ItemTemplate from the Markup shows?
Why is my default ItemTemplate showing in my list??
I always see the default "THIS IS THE DEFAULT TEMPLATE" at the top of my list and then the real list items display below that.
If I remove the <ItemTemplate> Then I see the contents of the EmptyDataTemplate only, and If I remove that my list becomes empty all together?

<telerik:RadListView ID="rlvJobsListPage" runat="server" ItemPlaceholderID="phJobsList" DataSourceId="objJobList"
    OnItemDataBound="rlvJobsListPage_ItemDataBound" AllowCustomPaging="true" AllowPaging="true" PageSize="20" AllowSorting="True">
    <LayoutTemplate>
        <div id="searchList">
            <div id="phJobsList" runat="server">

            </div>
        </div>
    </LayoutTemplate>
    <EmptyDataTemplate>
        No records found
    </EmptyDataTemplate>
    <ItemTemplate>
        THIS IS THE DEFAULT TEMPLATE<br />
    </ItemTemplate>    
</telerik:RadListView>
protected void rlvJobsListPage_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
    // Set each bound item to status "Loaded"
    if (e.Item is RadListViewDataItem)
    {
 
        RadListViewDataItem thisDataItem = (RadListViewDataItem)e.Item;
        Job thisListing = (Job)thisDataItem.DataItem;
         
        //Determine which template to get from cache
        Templating listingTemplate = Templating.GetTemplateForListing(thisListing.ListingTemplate);
        rlvJobsListPage.ItemTemplate = Templating.Render_ITemplate(listingTemplate.TemplatePath, TemplateType.Summary, this);
        e.Item.DataBind();
    }
}
Marin
Telerik team
 answered on 04 Jul 2012
2 answers
111 views
Hi,

I have a grid on which i have put by default group by functionality. But the problem is that, It showing the expend collapse button just left on the grouped text

I have use in the grid for set the default group by functionality

  <GroupByExpressions>
             <telerik:GridGroupByExpression >
                             <GroupByFields >
                                    <telerik:GridGroupByField FieldName="DateSubmitted" SortOrder="Descending" />
                              </GroupByFields>
              </telerik:GridGroupByExpression>
 </GroupByExpressions>

So please tell me to hide the   expend collapse button.
PLEASE SEE ATTACHED IMAGE YOU WILL UNDERSTAND THE ACTUAL PROBLEM
Manish
Top achievements
Rank 2
 answered on 04 Jul 2012
1 answer
199 views
Hi everyone !

I am currently working with grid, generated on server-side depending on a parameter, with multi-header function.

Here is my code and some explanations :

- First part : Generating the first headergroup column. It contains my labels.
- Second part (first "for" loop) : Generate all my column headers
- Third part (second "for" loop) : Generate the databoundcolumns. I will bind data with it.

    //Indices
    int i_incrementA = 0,
        i_incrementB = 0;
 
    // Return the number of molds we are working for with the samples
    int i_gridLines = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_MOULE.Count();
    // Return the number of controls we are working on.
    int i_gridColumns = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_RESULTAT.Count();
 
    long i_currentResult = 0;
    long i_currentMold = 0;
 
    GridColumnGroup GCG_headerGroup = new GridColumnGroup();
    GridBoundColumn GCO_columns = new GridBoundColumn();
 
    // Add the first column wich will content mold numbers.
    // First header row : Controls
    GCG_headerGroup.Name = "control0";
    GCG_headerGroup.HeaderText = "";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    //Second header row : Buttons
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "buttons0";
    GCG_headerGroup.HeaderText = "";
    GCG_headerGroup.ParentGroupName = "control0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    // Third header row : Max
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "max0";
    GCG_headerGroup.HeaderText = "Max :";
    GCG_headerGroup.ParentGroupName = "buttons0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    // Fourth header row : MaxWarn
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "maxWarn0";
    GCG_headerGroup.HeaderText = "Warn :";
    GCG_headerGroup.ParentGroupName = "max0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    // Fifth header row : Target
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "target0";
    GCG_headerGroup.HeaderText = "Target :";
    GCG_headerGroup.ParentGroupName = "maxWarn0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    // Sixth header row : MinWarn
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "minWarn0";
    GCG_headerGroup.HeaderText = "Warn :";
    GCG_headerGroup.ParentGroupName = "target0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    // Seventh header row : Min
    GCG_headerGroup = new GridColumnGroup();
    GCG_headerGroup.Name = "min0";
    GCG_headerGroup.HeaderText = "Min :";
    GCG_headerGroup.ParentGroupName = "minWarn0";
    GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
 
    for (i_incrementB = 0; i_incrementB < i_gridColumns; i_incrementB++)
    {
        i_currentResult = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_RESULTAT[i_incrementB].RECLEUNIK;
        i_currentMold = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_MOULE[i_incrementB].MOCLEUNIK;
             
        // Create a headerGroup for the control name.
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "control" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = l_resMou.Where(r => r.OBJ_RESULTAT.RECLEUNIK == i_currentResult & r.OBJ_MOULE.MOCLEUNIK == i_currentMold).Single<EntityRESMOU>().OBJ_RESULTAT.OBJ_TOLERANCES.OBJ_CONTROLE.OBJ_TYPECTRL.NOMTYPE;
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // buttons header groups
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "buttons" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "control" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "buttons";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // Tolerances Max
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "max" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "buttons" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // Tolerances MaxWarn
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "maxWarn" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "max" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // Tolerances Target
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "target" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "maxWarn" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // Tolerances MinWarn
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "minWarn" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "target" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
        // Tolerances Target
        GCG_headerGroup = new GridColumnGroup();
        GCG_headerGroup.Name = "min" + (i_incrementB + 1);
        GCG_headerGroup.ParentGroupName = "minWarn" + (i_incrementB + 1);
        GCG_headerGroup.HeaderText = "";
        GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
    }
 
    // Data fields
    // WARNING : Be careful of the column name which must be the same as the datasource column name.
    for (i_incrementB=0;i_incrementB<i_gridColumns+1;i_incrementB++)
    {
        GCO_columns = new GridBoundColumn();
        GCO_columns.ColumnGroupName = "min" + i_incrementB;
        GCO_columns.UniqueName = "col" + i_incrementB;
        GCO_columns.DataField = "col" + i_incrementB;
        GCO_columns.HeaderText = "col" + i_incrementB;
        GRD_CONTROLLIST.MasterTableView.Columns.Add(GCO_columns);
    }
 
}

my headergroups are correctly generated.
So, i do my databinding with static data from a DataTable :

DataTable TBL_setOutResults = new DataTable();
for (int i = 0; i < 9; i++)
{
    TBL_setOutResults.Columns.Add("col"+i);
}
 
TBL_setOutResults.Rows.Add("#6", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#12", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#16", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#17", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#20", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#24", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#32", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#33", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#34", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#36", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#41", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#47", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#52", "10", "10", "10", "10", "10", "10", "10", "10");
TBL_setOutResults.Rows.Add("#55", "10", "10", "10", "10", "10", "10", "10", "10");
 
GRD_CONTROLLIST.DataSource = TBL_setOutResults;
GRD_CONTROLLIST.DataBind();

DataTable column names are the same than databoundcolumn inside my grid.
But there is a problem. See the first attachement : "grid.jpg". The binding seems to be done 2 times.
In fact, i just want to remove the right part of the generated grid. ( the big columns col0, col1, col2 .. etc ...à).

So, i checked the HTML code and it seems that my datatable columns generate a columngroup on the same level that my first columngroup. See  the second attachement : "htmlcode.jpg"

Am i doing it wrong ? Is there a solution ?
Many thanks for your help !

  • ASP.NET version: 4.0
  • OS: WS2008R2
  • exact browser version: Firefox 13.0
  • exact version of the Telerik product : RadControls for ASP.NET AJAX Q2 2012
  • preferred programming language : C#
Maxime
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
160 views
Hi,
I have tried to use the codes are for validation in Asyncupload and uplod tools in these links:
http://demos.telerik.com/aspnet-ajax/upload/examples/async/validation/defaultcs.aspx?product=asyncupload
http://www.telerik.com/help/aspnet-ajax/upload-client-side-validation.html

But none of them works correcrtly! when I select a non-valid file (for example a pdf file which its extension is changed to jpg), it does not prevent uploading it.

this is all my code with Asyncupload:
<asp:Content ID="Content2" ContentPlaceHolderID="content2" Runat="Server">
<script type="text/javascript">
      //<![CDATA[
        function validationFailed(sender, eventArgs) {
            $(".ErrorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
        }
      //]]>
    </script>
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
 
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
<telerik:RadButton ID="uploadbtn" runat="server" Text="upload"
        onclick="uploadbtn_Click">
    </telerik:RadButton>
    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"
        AllowedFileExtensions="jpg,jpeg"
        TargetFolder="~/upload" OnClientValidationFailed="validationFailed"
        onfileuploaded="RadAsyncUpload1_FileUploaded" >
        <FileFilters>
        <telerik:FileFilter Description="Images(jpeg;jpg)" Extensions="jpeg,jpg" />
    </FileFilters>
    </telerik:RadAsyncUpload>

and in code behind for upload button:
protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
    {
        Label fileName = new Label();
        fileName.Text = e.File.FileName;
 
 
        if (e.IsValid)
        {
            Response.Write(fileName + "::true");
        }
        else
        {
            Response.Write("false");
        }
    }
 Is there anything missing from me?
Plamen
Telerik team
 answered on 04 Jul 2012
6 answers
156 views
Hi,
    When in week view the VisibleRangeStart date shows as a Monday (24/10/2011) which is expected but the VisibleRangeEnd also shows as a Monday (31/10/2011) which I would expect it to show as a Sunday (30/10/2011). I have only tried this in the latest 2011 Q2 SP1 build so I'm not sure if this is by design or a bug. I have FirstDayOfWeek set to Monday and LastDayOfWeek set to Sunday.

The screen shows Monday - Sunday so can not understand why VisibleRangeEnd property would be different.

Is this a bug or do I have my setings wrong?
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" Height="100%"
    OnDataBound="RadScheduler1_DataBound" AppointmentStyleMode="Default" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
    OnNavigationComplete="RadScheduler1_OnNavigationComplete" OnClientFormCreated="schedulerFormCreated"
    CustomAttributeNames="AppointmentColor" StartInsertingInAdvancedForm="true" EnableDescriptionField="true"
    DayView-EnableExactTimeRendering="True" ShowFooter="False" GroupBy="Room" DayEndTime="21:00:00"
    WorkDayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" Culture="en-GB"
    DayView-HeaderDateFormat="dddd, MMMM dd, yyyy">
    <AdvancedForm Modal="true" />
    <Reminders Enabled="true" />
    <AppointmentTemplate>
        <div class="rsAptSubject">
            <%# Eval("Subject") %>
        </div>
        <%# Eval("Description") %>
    </AppointmentTemplate>
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
            AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
            RoomID='<%# Bind("Room") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
            AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
            RoomID='<%# Bind("Room") %>' />
    </AdvancedInsertTemplate>
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <DayView EnableExactTimeRendering="True"></DayView>
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>
Peter
Telerik team
 answered on 04 Jul 2012
2 answers
116 views
Hello,
I`m using RadMenu, my custom skin.

Schema is: ImageUrl (image A), HoveredImage(image B), SelectedImage(image B). Unfortunately SelectedImage property won`t work. I was looking solution, couldn`t find.

<telerik:RadMenu ID="RadMenu1" runat="server" EnableEmbeddedSkins="False"
                      Skin="MyOwn"
                      EnableTextHTMLEncoding="True">
                      <Items>
                          <telerik:RadMenuItem runat="server" HoveredImageUrl="~/gfx/home_hover.png"
                              ImageUrl="~/gfx/home.png"
                              NavigateUrl="~/About.aspx"
                              SelectedImageUrl="~/gfx/home_hover.png">
                          </telerik:RadMenuItem>
                      </Items>
                  </telerik:RadMenu>
Marcin
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
127 views
I have a radgrid

<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True" AllowSorting="True"
     PageSize="25" AllowAutomaticUpdates="True" AllowMultiRowEdit="False" AutoGenerateColumns="False"
     AllowPaging="True" DataSourceID="DataSource1" OnItemUpdated="RadGrid1_ItemUpdated"
     AllowFilteringByColumn="True" OnItemDeleted="RadGrid1_ItemDeleted"
     OnDataBound="RadGrid1_DataBound">
     <PagerStyle Mode="NextPrevAndNumeric"  Position="TopAndBottom" PageSizeLabelText="Rows Per Page:" />
     <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataSourceID="DataSource1" EditMode="InPlace" UseAllDataFields="True">
         <Columns>
             <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                 <ItemStyle CssClass="MyImageButton" />
             </telerik:GridEditCommandColumn>
             <telerik:GridBoundColumn    DataField="InstallCount"
                                         HeaderText="Install Count"
                                         SortExpression="InstallCount"
                                         UniqueName="InstallCount"
                                         ReadOnly="True">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn    DataField="PackageName"
                                         HeaderText="Package Name"
                                         SortExpression="PackageName"
                                         UniqueName="PackageName"
                                         ReadOnly="True">
             </telerik:GridBoundColumn>
             <telerik:GridDropDownColumn DataField="ToBeTestedID"
                                         DataSourceID="SqlDataSource3"  
                                         HeaderText="To Be Tested"
                                         ListTextField="ToBeTested"
                                         ListValueField="ToBeTestedID"  
                                         UniqueName="ToBeTestedID"
             /> 
             <telerik:GridDropDownColumn DataField="StatusID"
                                         DataSourceID="SqlDataSource2"  
                                         HeaderText="Status"
                                         ListTextField="Status"
                                         ListValueField="StatusID"  
                                         UniqueName="StatusID"
             />                   
             <telerik:GridBoundColumn    DataField="LOB"
                                         HeaderText="Line Of Business"
                                         SortExpression="LOB"
                                         UniqueName="LOB"
                                         ReadOnly="False">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn    DataField="AlliancePartner"
                                         HeaderText="Alliance Partner"
                                         SortExpression="AlliancePartner"
                                         UniqueName="AlliancePartner"
                                         ReadOnly="False">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn    DataField="DslID"
                                         HeaderText="Dsl ID"
                                         SortExpression="DslID"
                                         UniqueName="DslID"
                                         ReadOnly="False">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn    DataField="Contacts"
                                         HeaderText="Contacts"
                                         SortExpression="Contacts"
                                         UniqueName="Contacts"
                                         ReadOnly="False">
             </telerik:GridBoundColumn>
             <telerik:GridBoundColumn    DataField="EmailSentDate"
                                         HeaderText="Email Sent Date"
                                         SortExpression="EmailSentDate"
                                         UniqueName="EmailSentDate"
                                         ReadOnly="False">
             </telerik:GridBoundColumn>
         </Columns>
         <EditFormSettings>
            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
             <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
             <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                 Width="100%" />
             <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
             <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
             <EditColumn ButtonType="ImageButton"
                 UniqueName="EditCommandColumn1" CancelText="Cancel edit">
             </EditColumn>
             <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
         </EditFormSettings>
     </MasterTableView>
 </telerik:RadGrid>


populated from datasource1

<asp:SqlDataSource
        SelectCommand="SELECT InstallCount,PackageName,ToBeTestedID,ToBeTested,StatusID,Status,LOB,AlliancePartner,DslID,Contacts,EmailSentDate FROM AppFactory.dbo.WFCpackageinstalls"
        UpdateCommand="
            UPDATE AppFactory.dbo.WFCpackageinstalls SET
                [StatusID] = @StatusID,
                [ToBeTestedID] = @ToBeTestedID,
                [LOB] = @LOB,
                [AlliancePartner] = @AlliancePartner,
                [Contacts] = @Contacts,
                [EmailSentDate] = @EmailSentDate,
                [DslID] = @DslID
            WHERE [PackageName] = @PackageName"
        ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>"
        ProviderName="System.Data.SqlClient"
        ID="DataSource1"
        runat="server" >
        <UpdateParameters>
            <asp:Parameter Name="StatusID" Type="Int32" />
            <asp:Parameter Name="ToBeTestedID" Type="Int32" />
            <asp:Parameter Name="LOB" Type="String" />
            <asp:Parameter Name="AlliancePartner" Type="String" />
            <asp:Parameter Name="PackageName" Type="String" />
            <asp:Parameter Name="Contacts" Type="String" />
            <asp:Parameter Name="EmailSentDate" Type="String" />
            <asp:Parameter Name="DslID" Type="String" />
        </UpdateParameters>
     </asp:SqlDataSource>   
    <asp:SqlDataSource
        SelectCommand="SELECT StatusID, Status FROM AppFactory.dbo.lu_tbl_status"
        ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>"
        ProviderName="System.Data.SqlClient"
        ID="SqlDataSource2"
        runat="server"
     />
    <asp:SqlDataSource
        SelectCommand="SELECT ToBeTestedID, ToBeTested FROM AppFactory.dbo.lu_tbl_tobetested"
        ConnectionString="<%$ ConnectionStrings:LC2ConnectionString %>"
        ProviderName="System.Data.SqlClient"
        ID="SqlDataSource3"
        runat="server"
     />

inside I have two drop downs populated from lookup tables  from the queries above in datasource 2 and 3

The correct values are selected based on the actual values of the id columns in the main table.

So everything works except when I change a value for anything and save the row....
the message at the bottom says "Item Updated!" but the database is not being updated with any new values. It's aggravating.

the code behind

Imports Telerik.Web.UI
 
Partial Class AppFactory
    Inherits System.Web.UI.Page
        Private gridMessage As String = Nothing
 
        Protected Sub RadGrid1_DataBound(ByVal sender As Object, ByVal e As EventArgs)
            If Not String.IsNullOrEmpty(gridMessage) Then
                DisplayMessage(gridMessage)
            End If
        End Sub
 
        Protected Sub RadGrid1_ItemDeleted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDeletedEventArgs)
            If Not e.Exception Is Nothing Then
                e.ExceptionHandled = True
                SetMessage("Delete failed. Reason: " + e.Exception.Message)
            Else
                SetMessage("Item deleted!")
            End If
        End Sub
 
        Protected Sub RadGrid1_ItemUpdated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridUpdatedEventArgs)
            If Not e.Exception Is Nothing Then
                e.KeepInEditMode = True
                e.ExceptionHandled = True
                SetMessage("Update failed. Reason: " + e.Exception.Message)
            Else
            SetMessage("Item updated! " + source.ToString)
            End If
        End Sub
 
        Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridInsertedEventArgs)
            If Not e.Exception Is Nothing Then
                e.ExceptionHandled = True
                e.KeepInInsertMode = True
                SetMessage("Insert failed. Reason: " + e.Exception.Message)
            Else
                SetMessage("New product is inserted!")
            End If
        End Sub
 
        Private Sub DisplayMessage(ByVal text As String)
            RadGrid1.Controls.Add(New LiteralControl(String.Format("<span style='color:red'>{0}</span>", text)))
        End Sub
 
        Private Sub SetMessage(ByVal message As String)
            gridMessage = message
        End Sub
End Class



Andrey
Telerik team
 answered on 04 Jul 2012
1 answer
191 views
Hi,

I downloaded  2012.2 607 and Hotfix 2012.2 626 and it seems to have a problem when you use RadNumericTextbox with SpinButtons. For some reason with these builds after clicking up on the SpinButton the value gets appended instead of being added.  When you try to press the down SpinButton, it doesn't work.  My Code snippet is below as well as an image of the problem.


<asp:Panel ID="myPanel" runat="server">
    <div align="center">
        <telerik:RadNumericTextBox ID="txtV" runat="server" Width="155px" Height="32px" ShowSpinButtons="True" EnableSingleInputRendering="false" Type="Number" InvalidStyleDuration="100" Font-Size="20px" MinValue="100" Value="100">
            <NumberFormat AllowRounding="False" KeepNotRoundedValue="False" />
            <IncrementSettings Step="100" />
        </telerik:RadNumericTextBox>
    </div>
</asp:Panel>






Milena
Telerik team
 answered on 04 Jul 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?