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

I'm new to using radgrid.  I'd like to build a grid with grouping header by date.  See the image provided for clarification.  Any help would be appreciated.

Thanks,

Steve
Tsvetoslav
Telerik team
 answered on 24 May 2011
0 answers
67 views
Hello,
We have a table doctor appointment has field name recurring appointment.
This field is save from radscheduler control(it save string format like this: DTSTART:20110526T100000Z  DTEND:20110526T103000Z  RRULE:FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU).
we need to show diferrent row in a table according to DTSTART and DTEND date and time(it means that recurring  is weekly then show 7 rows in the gridview and recurring  is monthy then show 30/31 rows in the gridview from the start time and end time.

And  i Also try this code:

    private DataTable GetGridDataSource()
    {
        //Create a dynamic table to store the appointments' information:  
        DataTable table1 = new DataTable();
        table1.Columns.Add("Subject");
        table1.Columns.Add("StartDate");
        table1.Columns.Add("EndDate");




        SchedulesService schedulesService = new SchedulesService(); //Our custom service to get the schedules info from database
        TList<Schedules> schedulesList = schedulesService.GetAll(); //This will be a list of all schedules as it exists in database.


        foreach (Schedules schedule in schedulesList) //Each schedule as it exists in database
        {
            if (string.IsNullOrEmpty(schedule.RecurrenceRule)) //No recurrence rule
            {
                table1.Rows.Add(new string[] { schedule.Subject.ToString()
                    , schedule.StartTime.ToString()
                    , schedule.EndTime.ToString() });
            }
            else //Recurrence rule exists
            {
                RecurrenceRule parsedRule;
                RecurrenceRule.TryParse(schedule.RecurrenceRule, out parsedRule);
                foreach (DateTime occurrence in parsedRule.Occurrences)
                {
                    table1.Rows.Add(new string[] { schedule.Subject.ToString()
                        , occurrence.ToString()
                        , occurrence.AddHours(1).ToString() });
                }


            }
        }


        return table1;
    }
It will not work because this method is different from what we want.

please help me as soon as possible.
Thanks.

Mutum Jiten Singh
Akhil Systems
Jiten
Top achievements
Rank 1
 asked on 24 May 2011
1 answer
32 views
I have a grid with a detail table. I can expand each row and see the cooresponding detail record. I have a custom procedure on the grid event OnItemDataBound. I wanted to turn a couple images on or off based on a value in the database as well has build a URL for another hyperlink control. When the image control visibility is set to false or the navigateurl on the hyperlink is set, the row will not expand. I have verified that the page is posting back and making a call to the database when I attempt to expand the row. Any other row that I did not touch the image or hyperlink control still expands without a problem.

Thanks in advance.
Radoslav
Telerik team
 answered on 24 May 2011
3 answers
124 views
Hi,

I am basing my code off of the sample you have here:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

In your sample, on the aspx page for "Dialog2.aspx" is a javascript function:
function returnValue()
{
    //get the RadComboBox's selected item's text
    var combo = $find("<%= RadComboBox1.ClientID %>");
    var selectedCapital = combo.get_text();
 
    //Get a reference to the parent page (Default.aspx)
    var oWnd = GetRadWindow();
 
    //get a reference to the second RadWindow
    var dialog1 = oWnd.get_windowManager().getWindowByName("RadWindow1");
 
    // Get a reference to the first RadWindow's content
    var contentWin = dialog1.get_contentFrame().contentWindow
     
    //Call the predefined function in Dialog1
    contentWin.populateCityName(selectedCapital);
 
    //Close the second RadWindow
    oWnd.close();
}

This line here, works great, but I need to try to modify:
contentWin.populateCityName(selectedCapital);

instead of calling a function (in this case "populateCityName") I want to be able to set the control's value directly.
Is this possible?
So instead of the above line of code, I would like to do something like:
contentWin.document.getElementById("cityName").value = "hello";
Georgi Tunev
Telerik team
 answered on 24 May 2011
1 answer
195 views
Hi,

Is it possible to display an image in a grid cell based on the grid cell value. For example, if the cell value is say 'True/false', show a thumbs up or a thumbs down image.

Are there any inbuilt methods for doing this?

Or do we need to manipulate in the item_databound event?

Will there be performance issues if this is done for say (10 columns * 100 rows), i.e approximately 1000 cells?

Thanks,
Saravanan
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 May 2011
2 answers
66 views
Hi
I have grid which has 1000 rows, is there an example for filtering in client side in the 1000 rows(Not post back)?
thanks
Tsvetoslav
Telerik team
 answered on 24 May 2011
3 answers
92 views
<telerik:RadDataPagerTemplatePageField
    <PagerTemplate
        <asp:DropDownList ID="DropDownList1" runat="server"
        </asp:DropDownList
        <asp:Label ID="lblTimeAmount" runat="server" Text="..." ></asp:Label
    </PagerTemplate
</telerik:RadDataPagerTemplatePageField>
protected void Page_Load(object sender, EventArgs e)  
{
   //How to Get or Set Control's Value to Any in DropDownList1 or lblTimeAmount
  
}
also:
<telerik:RadToolBarButton runat="server" Text="SearchBox"
     <ItemTemplate
         <telerik:RadComboBox ID="RadComboBox1" Runat="server"
             <Items
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" 
                     Value="RadComboBoxItem1" /> 
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" 
                     Value="RadComboBoxItem2" /> 
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" 
                     Value="RadComboBoxItem3" /> 
             </Items
         </telerik:RadComboBox
     </ItemTemplate
 </telerik:RadToolBarButton
 <telerik:RadToolBarButton runat="server" Text="SearchCount"
     <ItemTemplate
         <asp:Label ID="lblTimeAmount" runat="server" Text="..." ></asp:Label>
     </ItemTemplate
 </telerik:RadToolBarButton>
protected void Page_Load(object sender, EventArgs e)   
   //How to Get or Set Control's Value to Any in DropDownList1 or lblTimeAmount
}
gzzn
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
86 views
Hello All,

I have one small issue while Saving RadGrid Settings using GridPersister Class.
Actually I want to Save All supported "PersistedSettingTypes" but not Paging settings.
So any one have idea how to exclude only Page Settings while Saving Grid Settings?

Thanks in Advance & Regards,

Dharmesh
Tsvetina
Telerik team
 answered on 24 May 2011
4 answers
174 views

Hi there,

Thanking you for very quick responses,

What I am trying to do is for a grid

1. add template columns to the grid
2. display the grid in edit mode
3. when click "save all", update all edited rows

What I did
for 1

GridTemplateColumn assResult = new GridTemplateColumn();  
this.RadGridGradingBatchEntry.MasterTableView.Columns.Add(assResult);  
assResult.DataField = "UniqueDateField";  
assResult.UniqueName = "UniqueDateField";  
assResult.SortExpression = "UniqueDateField";  
assResult.HeaderText = "UniqueDateField";  
assResult.SortExpression = "UniqueDateField";  
assResult.DataType = System.Type.GetType("System.Int32");  
assResult.Resizable = true;  
assResult.ItemStyle.Wrap = true;  
assResult.ItemStyle.Width = 15;  
assResult.ItemTemplate = new MyTemplate()  // Mytemplate returns implements Itemplate and I created this class according to one of forums I found here.  

for 2

protected void RadGridGradingBatchEntry_PreRender(object sender, System.EventArgs e)  
    {  
        foreach (GridDataItem item in RadGridGradingBatchEntry.Items)  
        {  
            item.Edit = true;  
            RadGridGradingBatchEntry.Rebind();  
        }  
    } 

for 3

protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument)  
    {  
        base.RaisePostBackEvent(source, eventArgument);  
        if (source is RadGrid)  
        {  
            string[] postBackEventArgumentData = eventArgument.Split(':');  
            switch (postBackEventArgumentData[0])  
            {  
                case "SaveAll":  
                    foreach (string l_EachItem in postBackEventArgumentData[1].Split(','))  
                    {  
                        if (!(l_EachItem == ""))  
                        {  
                            GridItem item = (GridItem)((Table)RadGridGradingBatchEntry.MasterTableView.Controls[0]).Rows[int.Parse(l_EachItem)];  
                            GridEditableItem editedItem = (GridEditableItem)item;  
                            Hashtable newnewValues = new Hashtable();  
                            item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);  
 
                        }  
                    }  
 
                    break;  
            }  
        }  
    } 

Now problem is that when I look up newValues, all dynamically created columns are not visible but only columns that have been specified as bound column are available to access.

Your help will be appreciated as always,

Toby 

Sebastian
Telerik team
 answered on 24 May 2011
1 answer
71 views
Hi,

I have searched some data using filtering column then export grid as PDF and excel format.
The filtering text also exported to pdf and excel.
Give me the solution ASAP. It's urgent.

Thank you,
Nagarajan
Princy
Top achievements
Rank 2
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?