Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
151 views
Hi,

I am using a RadGrid with autogeneratecolumns is Enabled because i have 150 columns in the Grid.

I have many bit fields , for that Grid generating checkboxes.I am exporting the data to excel sheet.

Everything upto here working fine, But when i see the Exported sheet , its not showing anything for the checkBox fields in the excel sheet.

I need to replace or modify the checkBox fields data to YES or NO when the RadGrid loads.

I can do it if i have columns addes using bound fields or template fields.But i am using autogenerated columns , How to fix my problem.

Please help me , If this is not done i have to add 150 template fields manually.

Thank you
Princy
Top achievements
Rank 2
 answered on 26 Nov 2010
3 answers
349 views
Hello All,

I am trying to compare the todays date and the selected date from user when the DatePicker Popup is closed .
Once the selected date is greater than todays date i need to enable the checkbox=true.

I am trying to compare the values but giving error.

Please correct me where am i going wrong.

<telerik:RadDatePicker ID="dateActivation" runat="server" 
Calendar-CultureInfo="English (United Kingdom)" Calendar-DateRangeSeparator=" /" Calendar-Height="40px" DateInput-ReadOnly="True" Width="200px">
   <Calendar ID="CalendarStart" runat="server" CultureInfo="English (UnitedKingdom)" DayStyle-ForeColor="Black" FocusedDate="1/1/1980 00:00:01 AM" OutOfRangeDayStyle-BackColor="#CCCCCC"  OutOfRangeDayStyle-ForeColor="#CCCCCC" WeekendDayStyle-BackColor="#FF5050" WeekendDayStyle-ForeColor="#CC0000"
</Calendar>
<DateInput ID="DateInputStart" runat="server" DateFormat="dd/MM/yyyy"></DateInput>
<ClientEvents OnPopupClosing="PopupClosing" />
</telerik:RadDatePicker>
  
<javascript>
function PopupClosing(sender, args) 
    {
  
        var datePicker = $find("<%= dateActivation.ClientID %>");
        var SelectedDate = datePicker.get_calendar().get_selectedDates();
        var todaysdate = datePicker.get_selectedDate();
  
        var SelDate = new Date(datePicker[((datePicker.length))], datePicker[((datePicker.length))]- 1, datePicker[((datePicker.length))]);
        alert("SelDate==" + SelDate);
        var SDate = new Date(todaysdate);
  
        if (SelectedDate > SDate)
        {
            var chkActive = $find("<%= chkIsActive.ClientID %>");
            chkActive.checked = false;
        }
  
    }
  
<javascript>





sudhakar
Top achievements
Rank 1
 answered on 26 Nov 2010
2 answers
57 views
Hi I'd like to use a drop down list as a custom field.  I have managed to add all of the correct values but GetFieldValue doesn't seem to return the selected value.  Is there a way to do this?

Thanks!
Devin
Devin
Top achievements
Rank 1
 answered on 26 Nov 2010
17 answers
304 views
I have a RadGrid (Grid1) with Master table edit mode = popup. I have the following code in the commandItemTemplate. The popup is a user control.The popup has some textboxes and another Grid (Grid2).
<CommandItemTemplate> 
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0"
                                        <tr style="height: 20px"
                                            <td style="width: 100%; color: #074768" align="right"
                                                <asp:LinkButton ID="lnkBtnAddLocation" runat="server" CommandName="InitInsert" Style="font-weight: bold;
                                                    padding-right: 2px; color: #074768;"
                                                    <asp:ImageButton ID="imgbtn_AddLocation" runat="server" SkinID="AddRecord" CommandName="InitInsert" /> 
                                                    Add Location 
                                                </asp:LinkButton> 
                                            </td> 
                                        </tr> 
                                    </table> 
</CommandItemTemplate> 

If I click on "Add Location" it opens a popup. I enter some data and when I click on save, It closes the popup and inserts the data in the RadGrid. But I want the popup to remain open. This is because I want to have a Save button for saving the textboxes data to Grid1 and a OK button for saving the selections in the Grid2 to the Grid1.

Is it possible to keep the popup open after Inserting data into Grid1?
Jonx
Top achievements
Rank 2
 answered on 26 Nov 2010
3 answers
224 views
Hi I have a tree view with checkboxes on each node. I have written some javascript to check relevant nodes when parent and child nodes on the tree view.

When i try to iterate through nodes on server side ie

foreach (RadTreeNode node in RadTree.CheckedNodes)
{
    string value = node.Text.ToString();
}

the value of CheckedNodes.Count = 0

Here is what I do with the javascript to check nodes
var node = args.get_node();
var parentnode = node.get_parent();
if (!node.get_checked()) {
    var childNodes = node._getChildren();
    var nodeArray = childNodes.toArray();
    for (var i = 0; i < nodeArray.length; i++) {
        nodeArray[i].set_checked(true);
        var GrandChildren = nodeArray[i]._getChildren();
        var nodeGCArray = GrandChildren.toArray();
        for (var x = 0; x < nodeGCArray.length; x++) {
            nodeGCArray[x].set_checked(true);
        }
    }

please help ..

Vinay
Top achievements
Rank 1
 answered on 26 Nov 2010
7 answers
290 views
Hi,

I have exported the rad grid data into excel format using the below LOC
ReportGrid.ExportSettings.IgnorePaging = true;  
            ReportGrid.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.Html;  
            ReportGrid.ExportSettings.ExportOnlyData = true;  
            this.ReportGrid.MasterTableView.ExportToExcel(); 

Now requirement is to add a policy statement in another spread sheet of the excel report that was generated. How can i achieve this using the rad grid properties?
Right now data source bound to the rad grid does not contain information related to the policy statement . It has to be either explicitely referred or include that in the data source.

Telerik guidence will be extremely helpful for me to solve these issue.

Thanks,
Nataraj
Daniel
Telerik team
 answered on 25 Nov 2010
2 answers
112 views
Hi there,

I am trying to do something with the scheduler that I'm not sure is possible.  Essentially, I want to allow users to "swap" two items - so if they drag an appointment over another appointment which is exactly the same duration, I would like the two appointments to swap positions.  

I have got the javascript going well enough to capture the onAppointmentMoving event to test to see if the appointment is being dragged onto another appointment, and have got logic to determine if the underlying appointment is of the same duration.  However, it's the last step that is causing me problems.

Once the user has held the moving appointment over an appointment of the same size for 2 seconds, I would like the underlying appointment to take up the position previously held by the other appointment.  Again, I've got the timeout bit working, but I don't want to post back to the server yet, I just want to the appointment to "tentatively" move - if the user were to press escape, or to move the moving appointment over another appointment, the previous one should revert to where it was, and the OTHER appointment be the one that was swapped.  Only when the user releases the mouse button do I want a postback to occur.

I have fiddled around in the client-side api for a bit and found a couple of promising functions: repaint and updateAppointment.  However, repaint doesn't seem to actually repaint, and updateAppointment causes a postback.  

Is there a way to do what I am after?  If not via natively implemented functions on the scheduler, could you point me in the right direction for actually manipulating the underlying HTML to do what I'm after?  I guess the appointments render as divs, so I figure I could probably get the left and top positions of those items, and reset them accordingly?  Can you point me in the right direction regarding which Ids I would need to grab hold of or how to get a reference to the containing divs?

Thanks very much for your help.

Matthew

Matthew
Top achievements
Rank 1
 answered on 25 Nov 2010
0 answers
73 views
First problem: modal advanced edit form interfase is broken. I tried adding the following code but it still doesn't shows the modal background.

<AdvancedInsertTemplate>
    <div class="rsAdvancedEdit rsAdvancedModal" style="position: relative">
        <div class="rsModalBgTopLeft">
        </div>
        <div class="rsModalBgTopRight">
        </div>
        <div class="rsModalBgBottomLeft">
        </div>
        <div class="rsModalBgBottomRight">
        </div>
        <div class="rsAdvTitle">
            <h3 class="rsAdvInnerTitle">Appointment</h3>
            <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
                CommandName="Cancel" CausesValidation="false" ToolTip='Cerrar'>
    <%# Container.Appointment.Owner.Localization.AdvancedClose%>
            </asp:LinkButton>
        </div>
        <div class="rsAdvContentWrapper">
          .......... (my content) ........
        </div>
    </div>
</AdvancedInsertTemplate>


Second problem: delete and resize links in appointments are shown incorrectly. Delete link is aligned to the left (over the text) and Resize link is valigned to top.

Thanks for your help!

EDIT: I noticed that "/* RadScheduler base stylesheet */" rules are overriding /* RadScheduler Telerik skin */ rules. For example, rsAdvTitle background is not shown because base stylesheet overrides with "background: none" (see attachment)
Jorge
Top achievements
Rank 1
 asked on 25 Nov 2010
1 answer
185 views
Hi,

is it possible to group a DateTime property only with the DatTime.Date part?
I get an object with the property "Beginning" of type DateTime from Database. But I want to group only the "Day" (DateTime.Date) part, because there are diefferent times.

<GroupByExpressions>
 <telerik:GridGroupByExpression>
  <SelectFields>
   <telerik:GridGroupByField HeaderValueSeparator=" am: " FieldName="Beginning"
                             FormatString="{0:dddd, dd MMMM yyyy}" 
                             FieldAlias="Date" />
  </SelectFields>
  <GroupByFields>
   <telerik:GridGroupByField FieldName="Beginning" SortOrder="Descending" />
  </GroupByFields>
 </telerik:GridGroupByExpression>
</GroupByExpressions>

But I get an output likes this:

http://s5.directupload.net/images/101123/agcdauma.png

The 31. December is splittet into two groups, because of the different times, but I want one single group of 31. December.

Thanks in advance.

Gregor D.
Veli
Telerik team
 answered on 25 Nov 2010
8 answers
507 views
Hi Telerik
I want to get selected row, selected row column value from codebehind but without any checkbox selection,
I want to click on row and row should get selected and then post back to Codebehind function to get selected row value.

reply me please asap



Kind Regards:
Hariindarr Siingh
McConnell Dowell
Ben
Top achievements
Rank 1
 answered on 25 Nov 2010
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?