Skinning causes some images to disapear

36 posts, 0 answers
  1. Sompop
    Sompop avatar
    26 posts
    Member since:
    Aug 2007

    Posted 07 Sep 2011 Link to this post

    Hi there,

    For me, when I try to edit multiple records, the date icon for the selected row in edit more for the grid will show only the last record. Please see the screenshot. How do I get icons for every selected records like the last record during edit mode?

    Thank you,

    Below is the .aspx code and .aspx.cs code.

    .aspx

    <telerik:RadGrid ID="rgQuoteItems" runat="server" Height="600px" Style="overflow: hidden"

       AllowMultiRowEdit="True" AllowMultiRowSelection="True" AllowAutomaticUpdates="true"

       AllowAutomaticDeletes="true" AllowAutomaticInserts="false" PageSize="100" Skin="Gray"

       AllowPaging="true" AllowSorting="true" GridLines="none" DataSourceID="SQLDS_QuoteItems"

       AllowFilteringByColumn="true" AutoGenerateColumns="false" HeaderStyle-HorizontalAlign="center" OnItemCreated="rgQuoteItems_ItemCreated">

       <PagerStyle Mode="NextPrevNumericAndAdvanced" />

       <MasterTableView DataSourceID="SQLDS_QuoteItems" DataKeyNames="quoteItemGuid" CommandItemDisplay="Top"

          EditMode="InPlace">

       <Columns>

          <telerik:GridTemplateColumn AllowFiltering="false" ItemStyle-Width="20px" Visible="false">

          <ItemTemplate>

             <asp:HyperLink ID="hlQuoteItem" runat="server" Text="Edit" ImageUrl="~/RadControls/Gray/Grid/Edit.gif" />

          </ItemTemplate>

          </telerik:GridTemplateColumn>

          <telerik:GridBoundColumn SortExpression="interval" HeaderText="Interval" DataField="interval"

             UniqueName="interval" DataType="System.Int32" ItemStyle-HorizontalAlign="center"

             FilterControlWidth="40px" ColumnEditorID="gridNumericTextBoxColumnEditor" />

          <telerik:GridDateTimeColumn HeaderText="Due Date" DataField="nextCalDueDate" SortExpression="nextCalDueDate"

             UniqueName="nextCalDueDate" FilterControlWidth="60px" DataFormatString="{0:MM/dd/yyyy}"

             ColumnEditorID="gridDateTimeColumnEditor" />

          <telerik:GridBoundColumn SortExpression="price" HeaderText="Price" DataField="price"

             UniqueName="price" DataType="System.Double" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" FilterControlWidth="40px" ReadOnly="true" />                               

          <telerik:GridBoundColumn HeaderText="quoteItemGuid" DataField="quoteItemGuid" SortExpression="quoteItemGuid" UniqueName="quoteItemGuid" Visible="false" />

        </Columns>

        <CommandItemTemplate>

           <div style="padding: 0 5px;">

              <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# rgQuoteItems.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/Edit.gif" />Edit selected</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# rgQuoteItems.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/Update.gif" />Update</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# rgQuoteItems.EditIndexes.Count > 0 || rgQuoteItems.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/Cancel.gif" />Cancel editing</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# rgQuoteItems.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/AddRecord.gif" />Add new</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# rgQuoteItems.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/AddRecord.gif" /> Add this quote item</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="LinkButton1" OnClientClick="javascript:if(!confirm('Are you certain you want to delete the selected quote item(s)?')){return false;}" runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/Delete.gif" />Delete selected quote items</asp:LinkButton>&nbsp;&nbsp;

              <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="../../RadControls/Gray/Grid/Refresh.gif" />Refresh quote item list</asp:LinkButton>

           </div>

         </CommandItemTemplate>

       </MasterTableView>

       <GroupPanel Visible="True">

       </GroupPanel>

       <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True"

          ColumnsReorderMethod="reorder">

          <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />

          <Resizing AllowColumnResize="False"></Resizing>

          <Scrolling AllowScroll="True" UseStaticHeaders="False" SaveScrollPosition="True" />

       </ClientSettings>

       <GroupingSettings CaseSensitive="false" />

    </telerik:RadGrid>

    <telerik:GridTextBoxColumnEditor ID="gridTextBoxColumnEditor" TextBoxStyle-Width="100px"

                            runat="server" />

    <telerik:GridTextBoxColumnEditor ID="gridNumericTextBoxColumnEditor" TextBoxStyle-Width="60px"

                            runat="server" />

    <telerik:GridDateTimeColumnEditor ID="gridDateTimeColumnEditor" TextBoxStyle-Width="80px"

                            runat="server" />


    .aspx.cs (I tried to use from the thread above but not working.)

    protected void rgQuoteItems_ItemCreated(object sender, GridItemEventArgs e)

            {

                if (e.Item is GridEditableItem && e.Item.IsInEditMode)

                {

                    GridDateTimeColumnEditor gridColumnEditor = ((GridEditableItem)e.Item).EditManager.GetColumnEditor("nextCalDueDate") as GridDateTimeColumnEditor;

                    if (gridColumnEditor != null)

                    {

                        RadDateTimePicker picker = gridColumnEditor.PickerControl as RadDateTimePicker;

                        //picker.DatePopupButton.ImageUrl = "~/RadControls/Gray/DatePicker/Gray.gif";

                        //picker.DatePopupButton.ImageUrl = "../../RadControls/Gray/DatePicker/Gray.gif";

                        //picker.ImagesPath = "../../RadControls/Gray/DatePicker/";

                        Label1.Text = Convert.ToString(int.Parse(Label1.Text) + 1);

                    }

                }

            }


    Error that I got. I know the picker got generate as many as selected records that I selected. However, when I use .ImagesPath or .ImageUrl, this error occurs.

    Server Error in '/xTrakLocalhost' Application.


    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    Line 183:                    //picker.DatePopupButton.ImageUrl = "~/RadControls/Gray/DatePicker/Gray.gif";

    Line 184:                    //picker.DatePopupButton.ImageUrl = "../../RadControls/Gray/DatePicker/Gray.gif";

    Line 185:                    picker.ImagesPath = "../../RadControls/Gray/DatePicker/";

    Line 186:                    Label1.Text = Convert.ToString(int.Parse(Label1.Text) + 1);

    Line 187:                }


    Source File: C:\Inetpub\wwwroot\mydomain\Main\Customers\QuoteDetails.aspx.cs    Line: 185 

  2. Bodevain Svensson
    Bodevain Svensson avatar
    195 posts
    Member since:
    May 2006

    Posted 08 Sep 2011 Link to this post

    That's pretty odd - can you check that you are using the latest and greatest 2011.2.712 version of the telerik Ajax controls? Also test whether this happens only when you disable the embedded skins and use ImagesPath for the picker, or not. Let me know what your findings are, I will do my best to assist.

    Bodevain
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sompop
    Sompop avatar
    26 posts
    Member since:
    Aug 2007

    Posted 08 Sep 2011 Link to this post

    Hi Bodevain,

    When I took the skin out, the icons show up correctly. If so, what did I do wrong?

    Regards,

    Sompop
  5. Bodevain Svensson
    Bodevain Svensson avatar
    195 posts
    Member since:
    May 2006

    Posted 08 Sep 2011 Link to this post

    Sompop, do you confirm that you use the latest version I pointed? If this does not help, investigate what is wrong with the setup of ImagesPath and the actual popup images, there you will find the culprit.

    Bodevain
  6. Sompop
    Sompop avatar
    26 posts
    Member since:
    Aug 2007

    Posted 08 Sep 2011 Link to this post

    Hi Bodevain,

    I am currently using Q3 2008 and my manager has not approved a budget to renew it yet. We plan to recreate our web app in the future. Before that time, I have to use the current version I have.

    Anyway, I found out the solution from the link below.

    http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/shareddatepicker/defaultcs.aspx?product=grid


    I don't fully understand how it is like that, but all I did was to put one RadDatePicker somewhere in the web page and add three javascripts. Even though, it is not exactly the same as the link tro to make the shared RadDatePicker with TextBox, but it worked.

    Thank you again for your help.

    Regards,

    Sompop
  7. test
    test avatar
    5 posts
    Member since:
    May 2011

    Posted 17 May 2013 Link to this post

    HI,

    I have a default.aspx page and I have set of user controls say Control1.ascx and Control2.ascx so on.
    I am loading this user control through an Ajax - (Web service call).This ajax call is made from the default.aspx page.
    on "pageLoad()" - Javascript.

    This web service returns me the constructed usercontrol html tags,Which I am appending it to a div tag client side(Jquery

    Append).

    Problem:

    When I append,I see that Control1.ascx contains a RadCalender control.On border I see "corner round" image missing.

    Please help me out how to resolve it.


    Thanks...
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017