Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
201 views

I have one scenario where the gridview has 2 rows like what i have attached.

Gridview having data as like I have mentioned in the file.

COLUMN 3 to COLUMN 6 having texbox where the values are entered by the user

COLUMN 1 and COLUMN 2 of ROW 1 and ROW 2 will have the same value as mentioned.

I need to know how to add a new row in the grid if the button is clicked

And the entered value should not get affected. It should be present.

The new row should be added with COLUMN1 and COLUMN 2 having same name as that of the ROW 1 and ROW 2

Even if the user clicks again the button the old rows should not get affected.

 

 

 

Viktor Tachev
Telerik team
 answered on 12 Apr 2016
5 answers
106 views

I have RadioButtonList with 2 items

<rad:GridTemplateColumn HeaderText="Modalidad" UniqueName="Modalidad">
                       <ItemTemplate>
                           <asp:Label runat="server" ID="lblModalidad" Text='<%# Eval("Modalidad") %>'></asp:Label>
                       </ItemTemplate>
                       <EditItemTemplate>
                           <asp:RadioButtonList runat="server" ID="rblModalidad" RepeatDirection="Horizontal"
                               AutoPostBack="true" OnSelectedIndexChanged="rblModalidad_SelectedIndexChanged1">
                               <asp:ListItem Text="Valor" Value="0"></asp:ListItem>
                               <asp:ListItem Text="Obligatorio" Value="1"></asp:ListItem>
                           </asp:RadioButtonList>
                           <asp:RequiredFieldValidator runat="server" ID="rfvRblModalidad" ControlToValidate="rblModalidad"
                               ErrorMessage="Debe seleccionar una Modalidad." Display="none"></asp:RequiredFieldValidator>
                       </EditItemTemplate>
                   </rad:GridTemplateColumn>

 

The radiobuttonlist with a RequiredFieldValidator in a EditItemTemplate, the Radgrid and the ValidationSummary is in side of a fieldset.

This RadioButtonList has a bit of logic in server side, and the visualization and server code works perfect.

If I use Ajax, the selected item set the "dot" but it disappears the dot, so if I do click a second time, then dot appears correctly

If I don't use Ajax, the dot appears correctly

 

<rad:RadAjaxManager ID="RajaxManager" runat="server" EnableAJAX="true">
       <AjaxSettings>
           <rad:AjaxSetting AjaxControlID="fsGrilla">
               <UpdatedControls>
                   <rad:AjaxUpdatedControl ControlID="fsGrilla" LoadingPanelID="RadAjaxLoadingPanel" />
               </UpdatedControls>
           </rad:AjaxSetting>
       </AjaxSettings>
   </rad:RadAjaxManager>
   <rad:AjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Transparency="25" ZIndex="10">
       <asp:Image ID="Image1" runat="server" ImageUrl="~/images/load.gif" AlternateText="Loading...">
       </asp:Image>
   </rad:AjaxLoadingPanel>

 

Any ideas?

saludos

 

Eyup
Telerik team
 answered on 12 Apr 2016
12 answers
1.0K+ views

I am wanting to try and create a reoccurance rule through just code I found the guide of http://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/recurrence-editor/server-side-programming/populating-the-recurrence-rule by the way their is a spelling error at the top of the document in the h2 created.

I understand that I need to use recurrenncerange but I am saving my appointment via entity framework so i have two properties which i gather I need to populate.

 

RecurrenceRule

RecurrenceParentID

Can you please explain using the below methods if I can save the required information into the nvarchar that will allow the re ourrance data to show I am wanting to use this to show the days off that a staff memeber has.

 

01./Creating a Weekly Recurrence rule
02.int interval = 2;
03.RecurrenceRange range = new RecurrenceRange();
04.range.Start = DateTime.Now;
05.range.EventDuration = TimeSpan.FromMinutes(30);
06.range.MaxOccurrences = 3;
07.RecurrenceDay recurrenceDay = RecurrenceDay.Wednesday;
08.recurrenceEditor.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range);
09.//DayOfWeek startDayOfWeek = DayOfWeek.Tuesday;
10.//recurrenceEditor.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range, startDayOfWeek);
Plamen
Telerik team
 answered on 12 Apr 2016
1 answer
132 views

I am trying to figure out how to achevie the following I am using the edit pop to allow user to edit multple note records my problem I am having is that I cant seem to figure out how to get the id passed to my save command on the popup dialog.

01.<telerik:RadGrid ID="rgNotes" runat="server" GroupPanelPosition="Top" OnItemCommand="rgNotes_ItemCommand">
02.                            <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
03.                            <MasterTableView NoDetailRecordsText="No notes for this Appointment" AutoGenerateColumns="False" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Notes" AllowAutomaticInserts="true" EditMode="PopUp">
04.                                <Columns>
05.                                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
06.                                    </telerik:GridEditCommandColumn>
07.                                     <telerik:GridBoundColumn DataField="notes_id" FilterControlAltText="Filter notes_id column" HeaderText="notes_id" ReadOnly="True" SortExpression="notes_id" Visible="false" UniqueName="notes_id">
08.                                    </telerik:GridBoundColumn>
09.                                    <telerik:GridBoundColumn DataField="Subject" FilterControlAltText="Filter Subject column" HeaderText="Subject" ReadOnly="True" SortExpression="Subject" UniqueName="Subject">
10.                                    </telerik:GridBoundColumn>
11.                                </Columns>
12. 
13.                                <EditFormSettings EditFormType="Template" InsertCaption="Add new Note" CaptionFormatString="Please enter or update note">
14.                                    <FormTemplate>
15. 
16.                                        <telerik:RadTextBox ID="txtNotesId" Width="200px" runat="server"></telerik:RadTextBox>
17. 
18.                                        Subject
19.                                        <p>
20.                                            <telerik:RadTextBox ID="txtSubjectNotes" Width="200px" runat="server"></telerik:RadTextBox>
21.                                        </p>
22.                                        <p>
23.                                            Notes<br />
24.                                            <telerik:RadTextBox ID="RadTextBox1" TextMode="MultiLine" Rows="10" Columns="10" Width="200px" runat="server"></telerik:RadTextBox>
25.                                        </p>
26. 
27.                                        <telerik:RadButton ID="rdSaveNotes" OnClick="rdSaveNotes_Click" Skin="Bootstrap" BackColor="#512479" ForeColor="White" runat="server" Text="Save Notes"></telerik:RadButton>
28.                                        <telerik:RadButton ID="rdCancel" OnClick="rdCancel_Click1" CommandName="Cancel" Skin="Bootstrap" BackColor="#512479" ForeColor="White" runat="server" Text="Cancel"></telerik:RadButton>
29.                                    </FormTemplate>
30.                                </EditFormSettings>
31.                            </MasterTableView>
32.                            <ClientSettings>
33.                                <ClientEvents OnPopUpShowing="PopUpShowing" />
34.                                <Selecting AllowRowSelect="true" />
35.                            </ClientSettings>
36.                        </telerik:RadGrid>
37.                    </telerik:RadAjaxPanel>

Obv I need a way of passing the value to my save event but I cant seem to think how at present I no in the grids normal way of doing it you can dothis in the item command.

 

01.protected void rdSaveNotes_Click(object sender, EventArgs e)
02.{
03.    try
04.    {
05.        int id = Convert.ToInt32(Request.QueryString["id"]);
06.        tblApertureNetNote _note = new tblApertureNetNote();
07. 
08.        // _note = _dal.GetNotesById(id);
09. 
10.        _note.appointment_id = id;
11. 
12.        _note.isActive = true;
13.        _note.isDeleted = false;
14.        _note.subject = txtSubject.Text;
15.        if (_note.EntityState == System.Data.EntityState.Detached)
16.            _dal.Addnotes(_note);
17. 
18.        rgNotes.DataBind();
19.    }
20.    catch (Exception ex)
21.    {
22.        logger.Error("Error in rdSaveNotes_Click function calandar edit.aspx" + ex.ToString());
23.    }
24.}

 

And this is how I would normally pass the primary key but here I do not no how to ?.

 

1.protected void rgNotes_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
2.      {
3.          GridDataItem item = e.Item as GridDataItem;
4.          Guid id = new Guid(item.GetDataKeyValue("notes_id").ToString());
5.      }

Eyup
Telerik team
 answered on 12 Apr 2016
1 answer
114 views

Hello,

Saving to excel is not working depending on the amount of data. Columns with formulas are the cause.
Less amount of data can be converted to excel.

Sample JSON here: https://drive.google.com/file/d/0B-ORCNWgXhVoYWVvQUYybjhRWVE/view?usp=sharing

Telerik.Web.Spreadsheet.dll 2016.1.301.45

Nencho
Telerik team
 answered on 12 Apr 2016
1 answer
205 views
The scenario I am trying to achieve is below, I am displaying three fields in grid ProcessId, ProcessName, Process Desc. Once I display in the grid I want to have a hyperlink button in first column say Select. User when selects a row I want to display that row id and Name in a html list above or below grid. Is there a way I can achieve this using telerik grid, if any examples of it can you please point me over there.
Viktor Tachev
Telerik team
 answered on 12 Apr 2016
1 answer
164 views

Hello! I'm new to the forum,I hope you can help,I created a RadHtmlChart with Telerik,when I pass the mouse over a point the topltip shown as I show in the image Link: http://imgur.com/KE1D5qW

How I can do to change the format to Spanish?

 

 
 
LikHello! I'm new to the forum, I hope you can help
Hello! I'm new to the forum, I hope you can help
Hello! I'm new to the forum, I hope you can help
Hello! I'm new to the forum, I hope you can help
Hello! I'm new to the forum, I hope you can help
Danail Vasilev
Telerik team
 answered on 12 Apr 2016
2 answers
828 views
Hi Team,

I have a requirement in my application that, please check the scenario explained below.

Scenario1: if the no.of records in a grid are less than 10, grid height is fit to that size (no.of records). If the records count is more than 10 is pagination is required. Horizonatal scroll is required in both cases.

Solutions requierd:

1. If i used the property AllowScroll="True", Style="overflow: hidden" in ClientSettings, then fixed height is taking for the grid.Horizontal scroll is coming proprly. But our requirement is, height should be fixed to records count (explained in scenario1).
 2. If i am not using the AllowScroll="True", Style="overflow: hidden" in ClientSettings in page, page size is fiiting to no.of records but horizontal scroll bar is not coming. so other columns are missing.
3. if i used the only property Style="overflow: scroll", then both functionalites are satistifying, but some border is coming to the grid and columns. if you drag the horizontal scroll slowly, some line are coming. please refer the attached screen shot for reference.
4. I want to display the entire column data that cell (text-wrapping is reqiuired). ex. if there are 300 characters, all should show in wrap mode, but should not increase the column size to 300 or cut of text.

Please suggest me the solution for this.

Regards,
Chandrababu Nambi.
Venkat
Top achievements
Rank 1
 answered on 12 Apr 2016
1 answer
121 views

Dear Telerik team,

I am developing MVC web site. I am using telerik (grid in existing views) and Kendo(combobox in new view). In _layouts page Jquery-1.7.1.min.js was referenced.

Grid is working. but If I changed reference from JQuery-1.7.1 to Jquery.min.js file getting script issues like version not supported like that.

If I use JQuery-1.7.1 only then  KendoComboBox is undefined.

If I use both 2012.2.607/JQuery-1.7.1(_layouts) and Kendo/Jquery.min.js(view)  then nothing is working.

 

Please help me how to resolve these issues. Please suggest good approach.

Ivan Danchev
Telerik team
 answered on 12 Apr 2016
1 answer
84 views

Hello,

I want to export a grid whose width exceeds the width of a A4 in landscape. The last right column is cut in the middle and the right margin has disappeared. It's

very ugly.

Is there a standard solution or configuration to export correctly the grid i.e. that the last column is not exported because it is not complete ? or must I that completly program...

or it is possible at least to Keep the right margin even if the column is cut ?

Thanks in advance.

Sébastien

 

Pavlina
Telerik team
 answered on 12 Apr 2016
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?