Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
134 views
I'm using the radscheduler to export a timetable to iCAL  -  I need to include more fields (ie location, staff) to export than just the start date time ,title , description etc,  and so have added 2 fields in the CustomAttributeNames, - these appear on the calendar but are not included in the export file - is this possible or is outlook/google not able to read these fields? 

Are there more fields that can be added to the Vcard - ie location or are these not included in the Telerik control.

Thanks
Peter Milchev
Telerik team
 answered on 07 Feb 2017
6 answers
422 views
Hi.

I have a RadGrid on an ASP.NET page. When I do something that requieres a postback directly on the grid, like changing the page size, or browsing to a new page in the grid, my data gets lost and my grid becomes empty. Here's my markup:

<telerik:RadGrid ID="ReporteGridView" runat="server" AllowPaging="True" PageSize="20"
    AllowAutomaticInserts="false" AllowSorting="True" ShowStatusBar="true" Width="880px">
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />
    <MasterTableView NoMasterRecordsText="No hay registros para mostrar" ShowHeadersWhenNoRecords="True"
        PageSize="20" CommandItemDisplay="None" Width="100%">
        <PagerStyle FirstPageToolTip="Primera página" LastPageToolTip="Ultima página" NextPagesToolTip="Página siguiente"
            PageSizeLabelText="Tamaño página" PrevPagesToolTip="Página anterior" />
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
</telerik:RadGrid>

I'm binding my grid to a DataTable at runtime. Is there something I'm missing?

Thanks.
Arash
Top achievements
Rank 1
 answered on 07 Feb 2017
7 answers
393 views
Hi
I have a RadGrid with Grouping, Collapse and Expand functionality.
That works very well.

My problem:
When I click the command "Edit", edit mode = "popup", go to Collapse and Expand selections lost.
What can I do that the users stay with selection Collapse and Expand exist forever?

Sorry for my bad English
Rolf Burri
Switzerland


<telerik:RadGrid ID="RadGrid_Zeiten" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource_Zeiten" GridLines="Vertical" Skin="Office2007"
AllowAutomaticUpdates="True" AutoGenerateEditColumn="True"
style="font-weight: 700">
<ExportSettings ExportOnlyData="True" IgnorePaging="True">
</ExportSettings>
<MasterTableView CommandItemDisplay="None" datakeynames="ID"
datasourceid="SqlDataSource_Zeiten" editmode="PopUp" font-bold="False"
font-italic="False" font-names="Verdana" font-overline="False" font-size="8"
font-strikeout="False" font-underline="False">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="nachname" HeaderText=" "
HeaderValueSeparator=" " />
<telerik:GridGroupByField FieldName="vorname" HeaderText=" "
HeaderValueSeparator=" " />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="username" SortOrder="Ascending" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn DataField="user_id" ReadOnly="True"
SortExpression="user_id" UniqueName="user_id" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="name_tag" HeaderText="Tag"
SortExpression="name_tag" UniqueName="name_tag" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Datum" DataFormatString="{0:dd.MM.yyyy}"
HeaderText="Datum" SortExpression="Datum" UniqueName="Datum"
ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Vorname" HeaderText="Vorname"
SortExpression="Vorname" UniqueName="Vorname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Nachname" HeaderText="Nachname"
SortExpression="Nachname" UniqueName="Nachname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="total_zeiten" HeaderText="Total Zeiten"
UniqueName="total_zeiten" ReadOnly="True" SortExpression="total_zeiten">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="total_arbeiten" HeaderText="Total Arbeiten"
ReadOnly="True" SortExpression="total_arbeiten" UniqueName="total_arbeiten">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="abgeschlossen" HeaderText="Gesendet"
ReadOnly="True" UniqueName="abgeschlossen">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormStyle BackColor="#E6EBF3" />
<FormTableStyle BackColor="#E6EBF3" />
<FormMainTableStyle BackColor="#E6EBF3" BorderStyle="Double" />
<FormTableItemStyle BorderStyle="Solid" Height="20px" />
<FormTableAlternatingItemStyle BackColor="White" Height="20px" />
</EditFormSettings>
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
</MasterTableView>
<GroupingSettings GroupByFieldsSeparator="" />
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
<FilterMenu EnableTheming="True" Skin="Gray">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
Eyup
Telerik team
 answered on 07 Feb 2017
6 answers
424 views
Here's what I did:
1. Created a new skin based on Hay using the Online Visual Style Builder.
2. Changed the background colour of the input control in read only state.
3. Downloaded and extracted the modified style to my skin directory.

These lines have been added to the CSS file:
.RadInput_MMSM_MTS input.riRead {
 
    background-color: rgb(216, 216, 216);
 
}

Using Firebug to inspect I see this rule has been crossed out:
.RadInput_MMSM_MTS input.riRead {
    background-color: #D8D8D8;
}

And this rule is in effect (except for the border-color)::
html body .RadInput_MMSM_MTS .riTextBox, html body .RadInputMgr_MMSM_MTS {
    background: none repeat scroll 0 0 #FFFFFF;
    border-color: #898772;
    color: #272722;
    font: 12px "segoe ui",arial,sans-serif;
}

How can this be fixed? When I uploaded the zip file I noted the style tool did not recognize the change. The textbox is simply declared as:
<telerik:RadTextBox ID="RadTextBox1" runat="server" ReadOnly="True">
        </telerik:RadTextBox>

Vessy
Telerik team
 answered on 07 Feb 2017
1 answer
111 views

I'm having an issue with the veritcal size of the Radgrid in chrome. Each time a control refreshes the grid the grid resizes and I lose the command menu at the bottom of the grid. 

 

This issue only happens in Chrome, i'm unable to replicate it on other browsers.

Eyup
Telerik team
 answered on 07 Feb 2017
1 answer
137 views

Hi

I am trying to style the generated table using the 'ApplyStylesToPdfExport' example, and all is working with fonts, and alignment, but I haven't found the way to set cell padding. I tried using cell.style("cellpadding")  = "5px" and, a few variants, but I can't make it work.  What is the right way to do this?

I am probably being dumb...

Thanks a lot

Clive

Eyup
Telerik team
 answered on 07 Feb 2017
0 answers
105 views

This code isn't firing the custom validator's ServerValidate event for my GridDropDown column.  The exact same code works fine if I hook it into a standard GridBoundColumn with an underlying TextBox control and the necessary underlying control type changes.

 

protected void dtgFields_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;

            GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor("EDocFieldTagCtl");
            TableCell cell = (TableCell)editor.ComboBoxControl.Parent;

            CustomValidator validator = new CustomValidator();
            validator.ControlToValidate = editor.ComboBoxControl.ID;
            validator.ErrorMessage = "testing custom validator";
            validator.Display = ValidatorDisplay.Dynamic;
            validator.ServerValidate += new ServerValidateEventHandler(tagvalidate);
            cell.Controls.Add(validator);
        }
    }

Bob
Top achievements
Rank 1
 asked on 07 Feb 2017
0 answers
129 views

I have the following scenario

Id Name UniqueId Country   City

1  xyz    abc123     UK        London

2 xyz      abc123    UK     Leeds

3 nop     tty123     USA         Dallas

4 nop     tty123     USA        Boston

5 bob     ght334   Canada   Ottawa

6 smith  ryh123    USA

7 smith ryh123     Canada

 

I want to merge the rows and show the list and represent it in the Radgrid with filtering and sorting

1 xyz    abc123     UK        London, Leeds
2 nop     tty123     USA         Dallas, Boston
3 bob     ght334   Canada   Ottawa

4 smith  ryh123    USA ,Canada

 

 

 

 

binny
Top achievements
Rank 1
 asked on 06 Feb 2017
0 answers
160 views

Hi All,

I have a radnumerictextbox within a grid. When this value is changed in edit mode, i want to perform some calculations.

I keep getting object reference not set to a instance on this line as well as the one after that.

  famIncome = Convert.ToDouble(((RadNumericTextBox)dataItem.FindControl("rntxtAnnualIncome")).Value );

Not sure what i am missing here.

Let me know how to get those values.

 

 

protected void rntxtAnnualIncome_TextChanged(object sender, EventArgs e)
    {
        foreach (GridDataItem dataItem in rg_ProgramApp.EditItems )
        {
            double famIncome;
            int famMembers;
            famIncome = Convert.ToDouble(((RadNumericTextBox)dataItem.FindControl("rntxtAnnualIncome")).Value );
            famMembers = Convert.ToInt32(((RadNumericTextBox)dataItem.FindControl("rntxtFamilymembers")).Text);
        }
    }
 
 
<telerik:GridTemplateColumn UniqueName="FamilyMembers" HeaderText="FamilyMembers">
    <ItemTemplate>
    <asp:Label runat="server" ID="lblFamilyMembers" Text='<%# Bind("FamilyMembers") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <telerik:RadNumericTextBox runat="server" ID="rntxtFamilymembers"   DbValue='<%# Bind("FamilyMembers") %>'
     MaxValue="20" NumberFormat-DecimalDigits="0" ></telerik:RadNumericTextBox>
    </EditItemTemplate>
    </telerik:GridTemplateColumn>
 
<telerik:GridTemplateColumn UniqueName="AnnualIncome" HeaderText="Annual Income">
    <ItemTemplate>
    <asp:Label runat="server" ID="lblAnnualIncome" Text='<%# Bind("AnnualIncome") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <telerik:RadNumericTextBox runat="server" ID="rntxtAnnualIncome" Value='<%# Bind("AnnualIncome") %>'
    Type="Currency" NumberFormat-DecimalDigits="2" OnTextChanged="rntxtAnnualIncome_TextChanged" AutoPostBack="true" ></telerik:RadNumericTextBox>
    </EditItemTemplate>
    </telerik:GridTemplateColumn>

 

Thanks in Advance

Jagat
Top achievements
Rank 1
 asked on 06 Feb 2017
0 answers
79 views

 I have a radgrid that uses Add New Record to enter data, then uses the server side validation to make sure that the User Id field is not duplicated in the database.  When the server side validation fails, I display a message why the insert failed. To keep the insert mode, I use e.Canceled but values are lost.
 I can't figure out how to keep the values in the textboxes after the server validation fails so the user won't have to retype everything. 

Thanks in advance.

Priya
Top achievements
Rank 1
 asked on 06 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?