Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
79 views

Hi,

 I have a grid column declared as follows:

 

<telerik:GridDateTimeColumn CurrentFilterFunction="GreaterThanOrEqualTo" DataField="ClockedInAt" DataType="System.DateTime" EditDataFormatString="dd-MMM-yyyy HH:mm" FilterControlAltText="Filter column column" FilterDateFormat="dd-MMM-yyyy HH:mm" PickerType="DateTimePicker" UniqueName="column">
</telerik:GridDateTimeColumn>

As you can see even though I have set the time to 16:16 I am still getting entries earlier than that, namely 16:15. Can anyone shed any light on how I can fix this?

Konstantin Dikov
Telerik team
 answered on 28 May 2015
4 answers
83 views

I have the following code in my project:

 

protected void radGrid1_OnItemDataBound(object sender, GridItemEventArgs e)
      {
          var rowIndex = -1;
 
          if (e.Item is GridDataItem)
          {
              GridDataItem dataItem = e.Item as GridDataItem;   
 
              if ((dataItem[" "].Text == "<b>Total Capacity</b>") || (dataItem[" "].Text == "<b>Total Requested Capacity</b>")
                  || (dataItem[" "].Text == "<b>Total Remaining Capacity</b>"))
              {
                  rowIndex = dataItem.ItemIndex;
                  dataItem.BackColor = System.Drawing.ColorTranslator.FromHtml("#F7E69E");
 
              }
 
          }
 
      }

I've attached a screen shot. If you look at the column headers the last one is "4/2016". However the data is just gone. That whole column is blank. The colored rows do not extent into that column. If i drag select the columns on the screen it's like that column does not even exist. 

Any idea why a simple change such as this would cause an issue with the columns?

 

Julian
Top achievements
Rank 1
 answered on 28 May 2015
1 answer
117 views

Hi,

Do you have a control that allows users to add items and delete, like the tags selection on forums works (see screenshot)?

Nencho
Telerik team
 answered on 28 May 2015
7 answers
133 views

Hi,

I'm using this project as base for an application.
Each grid item has a className in this format "row1col3". The project has implemented custom navigation with the arrow keys, that uses these names.
My problem is that when I add a RadComboBox it is not named as such. In fact its className is empty this poses problems with the custom navigation and is a huge problem in my application. My implementation of the RCB in the grid is as follows:

<telerik:GridTemplateColumn runat="server" UniqueName="time_code_id" HeaderText="Time Code" SortExpression="time_code" DataField="time_code_id">
                        <FooterTemplate>Footer Template</FooterTemplate>
                        <FooterStyle VerticalAlign="Middle" HorizontalAlign="Center"></FooterStyle>
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem,"time_code_id") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox runat="server" ID="cellCombo" DataValueField="time_code_id"
                                DataTextField="description"
                                HighlightTemplatedItems="True" Height="140" Width="220" DropDownWidth="420"
                                DataSourceID="SqlDataSource5" SelectedValue='<%#Bind("time_code_id") %>' ShowDropDownOnTextboxClick="True" EnableLoadOnDemand="True" Filter="Contains" OnClientDropDownOpening="Opening">
                                <HeaderTemplate>
                                    <label>Time Code</label>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <%#DataBinder.Eval(Container,"Text") %>
                                </ItemTemplate>
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>

I hope you are able to point me in the right direction

 

Regards

Casper Andersen

Casper
Top achievements
Rank 1
 answered on 28 May 2015
6 answers
545 views
I am using inplace editing on a RadGrid that is built using a class file. Everything is working well except I am having an issue the SelectedIndexChanged event not firing when the grid is in edit mode. Any thoughts?

Column Definition:
GridDropDownColumn _ID = new GridDropDownColumn
                         {
                             DataField = "ID",
                             HeaderText = "ID",
                             UniqueName = "ID",
                             ListTextField = "ID",
                             ListValueField = "ID",
                             ListDataMember = "ID",
                             DropDownControlType = GridDropDownColumnControlType.RadComboBox,
                             HeaderStyle = { Width = Unit.Pixel(140) },
                             ItemStyle = { Width = Unit.Pixel(140) },
                             ReadOnly = false,
                             Display = true,
                         };
_reinsurerRadGrid.MasterTableView.Columns.Add(_ID);

UserControl Code:
private void RadGrid_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        try
        {
            if ((e.Item as GridDataItem) == null) { return; }
            ((RadNumericTextBox) (e.Item as GridDataItem)["Percentage"].Controls[0]).Width = Unit.Pixel(75);
            ((TextBox) (e.Item as GridDataItem)["Code"].Controls[0]).Width = Unit.Pixel(75);
 
            RadComboBox _participantList = (e.Item as GridEditableItem)["ID"].Controls[0] as RadComboBox;
            if (null == _participantList) { return; }
 
            _participantList.Width = Unit.Pixel(120);
            _participantList.DataValueField = "ID";
            _participantList.DataTextField = "ID";
            _participantList.AutoPostBack = true;
            _participantList.DataSource = MAASBaseInterface.ParticipantAPI.GetParticipants();
            _participantList.DataBind();
            _participantList.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(_participantList_SelectedIndexChanged);
 
            if (!(e.Item.DataItem is GridInsertionObject))
                _participantList.SelectedValue = ((Participant) (e.Item.DataItem)).ID.ToString();
            if (e.Item.DataItem is GridInsertionObject)
                _participantList.EmptyMessage = "-- Select --";
        }
        catch (Exception ex)
        {
 
            string _ex = ex.Message;
        }
    }
}
 
void _participantList_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    //first reference the edited grid item through the NamingContainer attribute
    GridEditableItem editedItem = (sender as RadComboBox).NamingContainer as GridEditableItem;
    int _selectedValue = Convert.ToInt32((editedItem["ID"].Controls[0] as RadComboBox).SelectedValue);
    ParticipantList _participants = MAASBaseInterface.ParticipantAPI.GetParticipants();
    Participant _participant = _participants.Where(a => a.ID == _selectedValue) as Participant;
    RadTextBox _code = editedItem["Code"].Controls[0] as RadTextBox;
    _code.ReadOnly = false;
    _code.Text = _participant.Code;
}

Jaspal
Top achievements
Rank 1
 answered on 28 May 2015
33 answers
1.3K+ views
Hi Everybody!

I have a RadComboBox inside a RadGrid's GridTemplateColumn, and I'm having problems when trying to use the RadComboBox's SelectedIndexChanged event.

When the user is in Insert Mode, the event only fires after another control causes postback OR when he/she uses the Insert or Cancel commands. However, in Edit Mode there is NO problem at all.

I have tried declaring the event in design mode (aspx) and made some tests, and then declaring it in Codebehind and made another tests. I even have tried declaring it both ways at the same time, but the result is the same.

I'm wondering what could cause that behaviour, but I'm afraid I can't find any solution.

I would share with you some info, because I think one of these points could be the cause of the issue:
  • RadComboBox is multicolumn (2 columns)
  • RadComboBox is being filled in it's ItemsRequested event
  • The RadGrid, which contains the RadComboBox, is inside a RadAjaxPanel
  • RadGrid's MasterTableView EditMode Property is "PopUp"
  • Besides the RadGrid, there are a RadToolTipManager and a RadInputManager controls in the WebForm
  • The WebForm, which contains the RadGrid, belongs to a ContentPlaceHolder
  • I'm using RadGrid version 2009.2.286.20

I hope someboy can help me, or at least give me an idea to find a solution.

Please, if you consider that it is necessary watching the code I'm using, let me know!


Thanks for your attention!

Jaspal
Top achievements
Rank 1
 answered on 28 May 2015
1 answer
117 views

I am trying to use Batch edit mode in RadGrid. My problem is I need to display and edit different types of data in the same column of each row. I can query the data and set the Datasource of RadGrid programatically to display the data successfully. However, I don't know how to set the EditItemTemplate to let user edit the cell data depends on showing data type, eg. RadDropDownList for Status, RadTextBox for OrderNumber, RadNumericTextbox for Amount. My scenario is

Item          |     January    |  February    |    .....

---------------------------------------------------------- 

Status       |

Order#      |

Amount     |

What is the best way to implement this?

Thank you in advance.

Konstantin Dikov
Telerik team
 answered on 28 May 2015
4 answers
212 views

Hi,

I have a RadGrid with columns of type GridDateTimeColumn. This grid implements filtering.

What I need to do is very simple. I just would like to change the skin of the RadDatePicker. In fact, I would prefer not to specify a skin at all so that the default skin is used. The reason that I want the default (or no skin) is that it show's "today" at the bottom of the calendar and this would be very useful for our users.

At the moment I am playing around with using a FilterTemplate for these columns. However, I am running into some problems. So, before I go any further I am just wondering if there is an easier way to do this? Creating a FilterTemplate just for this (to make the today option appear) seems like a lot of work that might turn out to be unnecessary.

Please let me know.

Thanks,
John.

 

 

John
Top achievements
Rank 1
 answered on 28 May 2015
3 answers
110 views

I using Telerik for SharePoint on a page layout I am using the tag below

<telerik:RadHtmlField id="EnglishContent" FieldName="English Content" runat="server"> </telerik:RadHtmlField>

My customer requires to have a default text value inside this editor every time the user creates new page from the page layout. When I am trying to use rhe <content> tag I got an error that the tag content is not recognized as a Rad HTML Field tag.
Ianko
Telerik team
 answered on 28 May 2015
2 answers
108 views

I have a Radedior with rad window but editor tools are not working with in radwindow how to overcome this any suggestions .

 

Regards

SR.

SR
Top achievements
Rank 1
 answered on 28 May 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?