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

Hi,

I have a RadGrid with EditFormType="WebUserControl". In my usercontrol I have a custom validator to check the value and allow to update or not.

My problem is that  _dataItem is null on the CustomValidator_ServerValidate event.
I try this code :

public object DataItem
{
    get
    {
        return (object)ViewState["DataItem"];
    }
    set
    {
        ViewState["DataItem"] = value;
    }
}

But even with ViewState DataItem is always null (in CustomValidator_ServerValidate event).

Have you a solution ?

Eyup
Telerik team
 answered on 14 Nov 2016
3 answers
300 views
I am not able to change the height for rwzContent

<div class="rwzContent" style="height: 267px;"> 

Please suggest how to change the height of the rwzContent, and is it possible to get vertical scrollbar?

Thanks 
Ivan Danchev
Telerik team
 answered on 14 Nov 2016
2 answers
196 views
I am working on RadGrid. Somehow not able to find a css to distinguish sortable and non-sortable column. I need this because I wanted to underline only sortable columns.
Ravishankar
Top achievements
Rank 1
Iron
 answered on 11 Nov 2016
4 answers
445 views

I'm having an issue with date formats on the grid. I've read through lot's of related threads, but they don't seem to be correcting my situation. The date is display as: 11/03/2016T00:00:00

The page has the column defined as:

<telerik:GridDateTimeColumn UniqueName="RECORDSTARTDATE" HeaderText="Record Start Date" DataField="RECORDSTARTDATE" ShowFilterIcon="false"
    DataFormatString="{0:dd MMM yyyy}" DataType="System.DateTime" HtmlEncode="false" ItemStyle-CssClass="center"
    CurrentFilterFunction="GreaterThanOrEqualTo" HeaderStyle-Width="120px" />

 

The DataFormatString is defined as ="{0:dd MMM yyyy}" so my dates not coming out even close.

Any help would be appreciated.

 

 

 

 

 

 

Eyup
Telerik team
 answered on 11 Nov 2016
1 answer
157 views

I have two radlistbox inside of a radgrid, I want to use the transfer between this two radlistbox, but only works the first transfer, later if I want to transfer again it doesn't work in any direction. What am I missing?

Thanks!

 

<telerik:GridTemplateColumn HeaderText="Plants" UniqueName="Plants" Visible="false">
                        <EditItemTemplate>
                            <telerik:RadListBox Width="200px" RenderMode="Lightweight" runat="server" DataKeyField="PlantId"
                                ID="rdlPlants" EnableDragAndDrop="True" Skin="Bootstrap" SelectionMode="Multiple" AutoPostBackOnTransfer="true"
                                Height="200px" AllowTransfer="true" TransferToID="rdlSelectedPlants" OnItemDataBound="rdlPlants_ItemDataBound"
                                OnTransferred="rdlPlants_Transferred">
                                <ButtonSettings ShowTransferAll="false" ShowReorder="false"></ButtonSettings>
                                <ItemTemplate>
                                    <%# Eval("Pint").ToString() + " - "  + (Eval("Name1") != null ? Eval("Name1").ToString() : string.Empty) %>
                                </ItemTemplate>
                            </telerik:RadListBox>
                            <telerik:RadListBox RenderMode="Lightweight" Width="200px" ID="rdlSelectedPlants" runat="server"
                                DataKeyField="PlantId" Height="200px" Skin="Bootstrap" OnItemDataBound="rdlPlants_ItemDataBound">
                                <ButtonSettings ShowTransfer="false" ShowTransferAll="false"></ButtonSettings>
                                <ItemTemplate>
                                    <%# Eval("Pint").ToString() + " - "  + (Eval("Name1") != null ? Eval("Name1").ToString() : string.Empty) %>
                                </ItemTemplate>
                            </telerik:RadListBox>
                        </EditItemTemplate>
                        <InsertItemTemplate>
                            <telerik:RadListBox Width="200px" RenderMode="Lightweight" runat="server" DataKeyField="PlantId"
                                ID="rdlPlants" EnableDragAndDrop="True" Skin="Bootstrap" SelectionMode="Multiple"  AutoPostBackOnTransfer="true"
                                Height="200px" AllowTransfer="true" TransferToID="rdlSelectedPlants" OnItemDataBound="rdlPlants_ItemDataBound"
                                OnTransferred="rdlPlants_Transferred">
                                <ButtonSettings ShowTransferAll="false" ShowReorder="false"></ButtonSettings>
                                <ItemTemplate>
                                    <%# Eval("Pint").ToString() + " - "  + (Eval("Name1") != null ? Eval("Name1").ToString() : string.Empty) %>
                                </ItemTemplate>
                            </telerik:RadListBox>
                            <telerik:RadListBox RenderMode="Lightweight" Width="200px" ID="rdlSelectedPlants" runat="server"
                                DataKeyField="PlantId" Height="200px" Skin="Bootstrap" OnItemDataBound="rdlPlants_ItemDataBound">
                                <ButtonSettings ShowTransfer="false" ShowTransferAll="false"></ButtonSettings>
                                <ItemTemplate>
                                    <%# Eval("Pint").ToString() + " - "  + (Eval("Name1") != null ? Eval("Name1").ToString() : string.Empty) %>
                                </ItemTemplate>
                            </telerik:RadListBox>
                        </InsertItemTemplate>
                    </telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 11 Nov 2016
1 answer
120 views

Hi,

It looks like I encountered a previous mentioned bug "Incorrect AutoSize dimensions under Edge with tables in the content" (https://feedback.telerik.com/Project/108/Feedback/Details/173027-incorrect-autosize-dimensions-under-edge-with-tables-in-the-content).

I have a RadWindow with AutoSize is true that opens correctly in Google Chrome, but not in Microsoft Edge.

I read the release history but I didn't find the fix for the bug explicitly mentioned there:

http://www.telerik.com/support/whats-new/aspnet-ajax/release-history

 

Regards,

Chris.

Marin Bratanov
Telerik team
 answered on 11 Nov 2016
1 answer
101 views

Hi,

I have a GridTemplateColumn with itemtemplate, in this itemtemplate i have a linkbutton and ImageControl, when i click the link i want show the image. 

this is the aspx:

<telerik:GridTemplateColumn UniqueName="BtnPOD" HeaderStyle-Width="5%" ItemStyle-Width="10%" HeaderText="POD" AllowFiltering="false" >

                                            <ItemTemplate>
                                                <asp:LinkButton ID="btnPOD" CommandName ="detailPOD" Text='<%#Eval("POD")%>' runat="server"/>
                                                <asp:Image ID="ImgPOD" runat="server" ImageUrl='<%#Eval("POD")%>' />                                                                                                               </ItemTemplate>                                                                                  
</telerik:GridTemplateColumn>

 

in vb, in the ItemCommand event:

If Not Image Is Nothing AndAlso Image.Length <> 0 Then
            Dim arrpictures As Byte() = System.Convert.FromBase64String(Image)
            Dim myStream As New System.IO.MemoryStream(arrpictures)
            Dim base64String As String = Convert.ToBase64String(arrpictures, 0, arrpictures.Length)
            For i = 0 To CType(Session("GridViewData"), DataTable).Rows.Count - 1
                If i = e.Item.ItemIndexThen
                    CType(Session("GridViewData"), DataTable).Rows(i)("POD") = "data:image/jpeg;base64," & base64String
                End If
            Next
End If

i modify the DataTable and in needdatasource event:

RadGrid1.DataSource = CType(Session("GridViewData"), DataTable)

in needdatasource i check the changes in DataTable, but i can see the changes in radgrid

 

 

Vasil
Telerik team
 answered on 11 Nov 2016
1 answer
417 views

I have a RadSearchBox that is getting it's values from a WebMethod (in the standard way from the demo), I'm then trying to get the selected value on the client side. However I do not seem to be able to retrieve it. I can get the text easy enough but not the value. Could you please advise how this is done?

 

<telerik:RadSearchBox RenderMode="Lightweight" ID="racProp" runat="server" Width="90%"
              HighlightFirstMatch="true"
              EmptyMessage="[No Property Selected]"
              Filter="Contains"
              TextSettings-SelectionMode="Single"
              InputType="Text"
              MaxResultCount="10"
              OnClientDataRequesting="OnPropertiesClientRequesting"
              OnClientSearch="OnPropertyAdded"  DataKeyNames="Category">
      <WebServiceSettings Method="GetProperties" Path="GetProperties.aspx" />
</telerik:RadSearchBox>
Veselin Tsvetanov
Telerik team
 answered on 11 Nov 2016
2 answers
553 views
<p><telerik:RadGrid ID="SampleGrid"  GridLines="None" runat="server" AllowAutomaticDeletes="false"<br>                              AllowPaging="True" PageSize="10" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"<br>                              AutoGenerateColumns="False" MasterTableView-EditMode="EditForms" ShowFooter="false"<br>                              MasterTableView-CommandItemSettings-ShowRefreshButton="false"<br>                              OnNeedDataSource="SampleGrid_NeedDataSource" OnInsertCommand="SampleGrid_InsertCommand"<br>                              OnItemCommand="SampleGrid_ItemCommand" OnUpdateCommand="SampleGrid_UpdateCommand" OnItemDataBound="SampleGrid_ItemDataBound"<br>                              Width="100%"><br>                              <PagerStyle Mode="NextPrevAndNumeric" /><br>                              <MasterTableView Width="100%" CommandItemDisplay="Top" HorizontalAlign="NotSet" AutoGenerateColumns="False"<br>                                  DataKeyNames="ID" Caption="Sample" ><br>                                  <Columns></p><p><telerik:GridTemplateColumn HeaderText="Action" AllowFiltering="false"><br>                                          <ItemTemplate><br>                                              <asp:ImageButton ID="ImgBtnEdit" runat="server" CommandName="Edit" CausesValidation="False"<br>                                                  ImageUrl="../Images/icons/page-edit.png" ToolTip="Edit" ImageAlign="AbsMiddle"><br>                                              </asp:ImageButton><br>                                          </ItemTemplate><br>                                          </telerik:GridTemplateColumn></p><p>  <telerik:GridBoundColumn DataField="NAME" HeaderText="Name" UniqueName="NAME"<br>                                          ItemStyle-Width="120px"><br>                                      </telerik:GridBoundColumn></p><p>  </Columns><br>                                  <EditFormSettings EditFormType="Template"><br>                                      <FormTemplate></p><p><table class="detailtable" cellspacing="2" cellpadding="1" width="100%" border="0"<br>                rules="none" style="border-collapse: collapse;"><br>                <tr><br>                    <td class="detaillabel"><br>                        Brand:<br>                    </td><br>                    <td><br>                         <telerik:RadComboBox ID="Name" runat="server" Width="250px"   AllowCustomText="true" EmptyMessage="Select" EnabledStyle-HorizontalAlign="Right"><br>                                                       </telerik:RadComboBox><br>                    </td><br>                </tr><br>            </table><br>        </div><br>    </FormTemplate><br></EditFormSettings></p>  </MasterTableView><br>                              <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" /><br>                              <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="true" ReorderColumnsOnClient="true"<br>                                  AllowGroupExpandCollapse="true" AllowColumnsReorder="true"><br>                                  <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" /><br>                              </ClientSettings><br><br>                          </telerik:RadGrid><br>

 

I want to find the ComboBox and bind combo box with some values so that While inserting record , the end user can choose a value to insert or save

<p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;"></code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;"> protected void SumInsGrid_ItemDataBound(object sender, GridItemEventArgs e)<br>        {<br><br>            GridDataItem dataItem = e.Item as GridDataItem;<br><br>            if (e.Item is GridEditFormInsertItem)<br>            {<br>                RadComboBox Name = (RadComboBox)e.Item.FindControl("Name");<br>                BindComboBox(Name);<br>            }</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">            else if (e.Item is GridEditFormItem && e.Item.IsInEditMode)<br>            {</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">                     ...........</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">                     RadComboBox Name = (RadComboBox)e.Item.FindControl("Name");<br style="color: rgb(0, 0, 0); font-family: monospace;">                     BindComboBox(Name);</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">                     ...</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">            }</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">    }</code></span></span></p><p style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;"></code></span></span></p>

 

While Editing findControl method works by returning the ComboBox object but not While Inserting. I want to bind values programmatically to the RadComboBox. 

Eyup
Telerik team
 answered on 11 Nov 2016
3 answers
814 views

 

Is there a way to disable validation when the previous button or a navbar button < current step is clicked?

Ivan Danchev
Telerik team
 answered on 10 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?