Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
218 views
I have a datagrid with hierarchical data that I want to populate not using the SqlDataSource reference but from the code behind cs.

I can populate the root data table but not sure how I go about populating the sub tables of the datagrid.

From aspx:

<telerik:RadGrid ID="rgrid_Data" runat="server" AllowPaging="True" AutoGenerateColumns="False" ShowGroupPanel="True" OnItemDataBound="rgrid_Data_ItemDataBound">                    
                    <MasterTableView AutoGenerateColumns="false">                                      
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="Month" DataField="item" UniqueName="item"></telerik:GridBoundColumn>
                    </Columns>                    
                    <DetailTables>
                    <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="item" >
                    <ParentTableRelation>
                       <telerik:GridRelationFields DetailKeyField="StartMonth" MasterKeyField="item" />
                    </ParentTableRelation>
                    <Columns>
                                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName= "DeleteColumn"></telerik:GridButtonColumn>
                                <telerik:GridButtonColumn CommandName="Update" Text="Update" UniqueName= "UpdateColumn"></telerik:GridButtonColumn>
                                <telerik:GridBoundColumn HeaderText="ID" DataField="Id" UniqueName= "Id"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Start Date" DataField="StartDate" UniqueName= "StartDate"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Expiry Date" DataField="ExpiryDate" UniqueName= "ExpiryDate"></telerik:GridBoundColumn>                           
                            </Columns>
                    </telerik:GridTableView>                    
                    </DetailTables>                     
                    </MasterTableView>
                    
                </telerik:RadGrid>

So to populate the root dataset I've been using

this.rgrid_Data.DataSource = dataSet;
this.rgrid_Data.DataBind();

and in trying to populate the sub sections I've been going down the path

this.rgrid_Data.MasterTableView.DetailTables[0].DataSource = subDataSet;
this.rgrid_Data.MasterTableView.DetailTables[0].DataBind(); 

Any help, much appreciated.
Eyup
Telerik team
 answered on 03 May 2013
6 answers
241 views
Hi All,

On one of my pages I have a growing issue with performance.  The grid has 72K records and comes from an SQL data source.  I've done gotten rid of unneeded columns from the data and have reduced page size from 200 to 50 records.  These things have speeded it up slightly.

When I do a test and return the top 100 records from the datasource the grid is rendered much faster so the issue is certainly down to the IIS - SQL connection rather than the IIS to client side of it.

With that in mind I've looked at the options, I could build an elaborate mechanism for displaying the top 100 records then passing on any filters and sort order info that the user uses however that seems like a lot of custom work for one grid.  

Another option that seems to be open is using a LinqDataSource rather than a SQLDataSource. I've not used a LinqDataSource before and from my casual look at it just now can see that it will be a big change from where I am at.

1) Can I use a SP with LinqDataSource and still gain the paging benefits that it provides or does a SP essentially make a LinqDataSource run the same way that a SQLDataSource does?

2) Would I experience big improvements by using the LinqDataSource - is it worth the change?

Any advice would be very much appreciated.

Regards,

Jon
Doroteya
Telerik team
 answered on 03 May 2013
3 answers
52 views
asp.net controls have, and want to make a style menu window 8, is there a control to it or as we could make?
Iana Tsolova
Telerik team
 answered on 03 May 2013
3 answers
738 views
Hi, We've upgraded our application from RadControls ASP.net Q3 2012 to Q1 2013. We now have a problem with SelectedValue when binding data to the radCombobox. For some reason the SelectedValue isn't set to the first item added. It works fine using Q3 2012 so wondering if you've heard issues.

This issue is what we are experiencing

http://www.telerik.com/support/pits.aspx#/details/Issue=2147

Thanks
Eric

Plamen
Telerik team
 answered on 03 May 2013
5 answers
270 views
Hello,

I wrap some markup with a RadAjaxPanel.  I'm getting an error in a callback related to this, and I can't figure out why it's happening.  It's preventing the page from working, even though the debugger shows everything correctly setup.  So I was wondering: is there an event that fires when an error happens, so I know that it's an error that comes from the server, or is actually the error the debugger is telling me it is?  How can I potentially resolve where it may really be coming from?

Thanks.
Eyup
Telerik team
 answered on 03 May 2013
0 answers
88 views
hi ,

i have issue of print problem i am using a rad grid gvReportUnit and a print button
the grid is filled by run report button on click of print button the code is 

  btnRunReport_Click(nullnull);
   RadAjaxPanel1.ResponseScripts.Add("PrintRadGrid('" + gvReportUnit.ClientID + "')");
       

and on aspx page

 function PrintRadGrid(radGridId) {
                var radGrid = $find(radGridId);
                var previewWnd = window.open('about:blank'''''false);
                var sh = '<%= ClientScript.GetWebResourceUrl(gvReportUnit.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",gvReportUnit.Skin)) %>';
                var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
                var htmlcontent = styleStr + "<body>" + radGrid.get_element().outerHTML + "</body></html>";
                previewWnd.document.open();
                previewWnd.document.write("<b><center>Custom Report</center></b>");
                previewWnd.document.write(htmlcontent);
                previewWnd.document.close();
                previewWnd.print();
                previewWnd.close();
            }
it is opening a new window for print instead of opening a new window it should open a print pop up in which grid data should be filled in print popup Pankaj

Pankaj
Top achievements
Rank 1
 asked on 03 May 2013
4 answers
203 views
  • Hello,

    I have posted my issue- when I make use of client side item command in radgrid, the server side item command doesn't retrieve item datakey or the index or the item number as well. I wanted to give file download functionality on grid's specified command. So I wanted AJAX to be disabled at certain control's request...Please review the following conversation I had earlier but didn't got the proper answer.

    It would be great if I can see some specific example as well on this

    Thanks,
    Sunny

    _______________________________________________________________________________
    hello

    I need to disable AJAX on RadGrid's one command for file download purpose and so I, first, made use of client settings and there used onCommand client side where I make AJAX disabled which works fine at its part
    So the flow goes first at client side and first enables/disables AJAX and then goes server side on ItemCommand event where I can not access e.Item's values and even data key value

    Please refer to my code snippet for server side event-ItemCommand:

    GridEditableItem editedItem = e.Item as GridEditableItem; 
    Hashtable newValues = new Hashtable(); 
    editedItem.ExtractValues(newValues); 

    Edit your postReply

  • Telerik Adminadmin's avatar

    Posted on May 24, 2010 (permalink)

    Hi Sunny,

    One possible option in this case would be to not use the onCommand client side handler, but rather use the onrequest start client side event for the ajax control

    http://www.telerik.com/help/aspnet-ajax/ajxonrequeststart.html

    Give this suggestion a try and let me know how it goes.

    Greetings,
    Yavor 
    the Telerik team
  • Could you please give me a proper example of ragdrid having Item Command and onStartRequest integrated?
Eyup
Telerik team
 answered on 03 May 2013
1 answer
81 views
I'm seeing inconsistent results from my radgrid and find myself constantly tweaking the width & height property trying to get it jsut right.
I'm not sure how to solve this problem, but I've attached some screen shots to explain what I mean.

Figure 1 (emptygrid.png)
Shows that the empty radgrid does not fill the panel width and height

Figure 2 (gridoverflow.png)
Shows that a full grid that requires scrolling overflows past the height of the grid for some reason? You'd think it would start scrolling at where the grid's bottom border is but as you can see it looks like it's just overflowing on it's own?
Vasil
Telerik team
 answered on 03 May 2013
1 answer
45 views
HI all so basically the major problems thjat i have with telerik radgrid are:

1 - Cant fill the containerwith the grid .
2 - When i can do something similar with it the filters are cuted.
3 - Cant put a width on the columns(î need radgrid to be created automatic).
4 - some times the lines are not align with the head.
5 - How can i block the heigth?

Can anybody help with this.

Best Regards
 
Eyup
Telerik team
 answered on 03 May 2013
1 answer
104 views
how to disable click event in telerik radlistbox for asp.net and how to remove padding of telerik radlistbox ?
Shinu
Top achievements
Rank 2
 answered on 03 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?