Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
94 views
Hi,
we are using 2013 Q1 Radgrid.

I came to know that Radgrid doesn't have clientside sorting unless it is done through webservice call etc. Only other option is to enable sorting on server side. In sort command event, help link suggest to rebind the grid. My situation is like this:

I bind the grid in page load event when it is not a postback like this:

protected

 

void Page_Load(....)

 

 

    if (!IsPostBack)

 

    {

 

        //bind radgrid
        bindgrid(txtbox1.text, dropdownlist1.selectedvalue);
     }
}

private void bindgrid(string txtvalue, string ddlvalue)
{
      radgrid1.DataSource = customobject;   //data retrieved as custom object from databased using those parameters
      radgrid1.DataBind();
}

Based on certain conditions some columns are shown/hide in ItemDataBound event. On the page, there are many other controls along with Radgrid. User can select different choices of these controls (like different data, different list item from dropdown etc) and click on another button called refresh. In this button click event we are binding grid again with different parameter values.

We have a button called 'ShowStatus'. When this button is clicked, status column (which is hidden initially) should be shown. we loop thru all the rows and get key values (as xml) and send to database and get back status for each item as xml. Then again we loop thru rows and assign status to each row status cell.
This is working fine and when 'ShowStatus' button is clicked, status column is showing up with data.

 

protected

 

void btnShowStatus_Click(object sender, EventArgs e)

    // setting status column to be displayed
    // loop thru grid items and set status column to appropriate status coming from database as xml.

 

}

The problem is after this, if user clicks on one of the columns to sort, I am not sure what to do in sort command event. According to help, I need to bind the grid again. If I call bindgrid routine, I lose how it was before. I need the grid to display as it was before (before postback) with sorted data. How can I restore grid.


I appreciate your response.
Thanks,
Prathiba.

Kostadin
Telerik team
 answered on 08 Apr 2013
3 answers
281 views
Hi,

I have a RadGrid with a nested GridTableView (detail table). In my detail table I've specified a RadComboBox as one of the columns like this:

<telerik:ComboBox ID="tcbCompanyType" runat="server" DataTextField="Text" DataValueField="Value"
    EmptyMessage="Company type" MarkFirstMatch="True" AutoPostBack="True"
    CausesValidation="false" onselectedindexchanged="tcbCompanyType_SelectedIndexChanged" />


As expected, on changing the selection, the appropriate method is called; but I need this method to show/hide other columns in the same detail table - my other columns are all of type <telerik:GridBoundColumn>. The columns to be shown/hidden all have unique names defined for them but no IDs.

Thanks for looking :)

Eyup
Telerik team
 answered on 08 Apr 2013
1 answer
113 views
I ran into a problem where i am using a RadListView and I set the GroupItemCount programmatically depending on the size of the dataset. It seems that the property isn't persisted across a post-back and is reset to default value after page is submitted. Is this behavior by design?

Thank you.
Andrey
Telerik team
 answered on 08 Apr 2013
2 answers
84 views
Hi friends,

I want my grid to use Skin="Transparent" but my popup edit form's window to use  Skin="Glow".

how can I achieve this ? thanks...
aykut
Top achievements
Rank 1
 answered on 08 Apr 2013
5 answers
132 views
Hello,

I am using Radgrid. I have dynamically added columns in this grid like mentioned below. I wanted to add filter for some of the columns. What is the way to enable this so that some columns will have filter. I am using custom paging so how to make filter on complete records instead of current page records? Also there is column for phone where records are displayed as (123)-456-1234. If user enters 12345.. then also it should search the phone.      
GridBoundColumn boundColumn1 = new GridBoundColumn();
RadGrid1.MasterTableView.Columns.Add(boundColumn1);
boundColumn1.ItemStyle.Wrap = false;
boundColumn1.DataField = DataField;
boundColumn1.SortExpression = DataField;
boundColumn1.HeaderText = HeaderText;

Eyup
Telerik team
 answered on 08 Apr 2013
3 answers
110 views
Hello,

I have created usercontrol with radcombobox for multiple use, I have given windosxp skin to radcombobox.
Now I have used this usercontrol in radgrid in EDITFORM Template at top tr to select employee.


my problem is that when I open editform in popup, Skin of radcombo get disappear
I have found in firebug that it renders two css at time "Radcimbobox Radcimbobox_WindosXp"  

so please suggest me any solution .

Thanks
Amit
Galin
Telerik team
 answered on 08 Apr 2013
1 answer
88 views
Currently I'm displaying the filters for each column. The users want to show/hide the filters. What's the easiest way to allow the user to show/hide these column filters?
Kostadin
Telerik team
 answered on 08 Apr 2013
6 answers
103 views
Hi

I have a RADCombo Box updating another RADCombo on selected changed event. This is done with the RadAjaxManager.

It works for the first selection, but I'm not able to make any selection in the first Radcombo box following the first one.

I have both combo boxes in a RadPanelBar Panel item content template.

Any ideas?

In addition the expand behaviour of the RadPanelBar is also broken following the AJAX roundtrip.

Andy
Kate
Telerik team
 answered on 08 Apr 2013
4 answers
107 views
Hi all,

Long time lurker first time poster.

I'm developing a report using the RadGrid control (full version) and one of the requirements is that it must be possible to filter the rows. Previously before using the RadGrid I'd obviously just filter the data source then re-render the html table but.... you know RadGrids are pretty and support so much functionality out of the box I thought what the hell?

Anyway - obviously I'm posting because its not gone too swell.

Initially I got the Expression Expected error... all fine and good, tons of threads with the answer set EnableLinqExpressions="False". Did that and sure enough the error disappeared.... however no filtering appeared? As in after the postback was finished no filtering had been applied. I was kind of under the impression from the Basic Filtering Tutorial that it should be a pretty much out of the box "hey presto no need to manually make all the filters" deal? Starting to think that's not the case.

Anyway - details: -

I'm using the OnNeedDataSource event, the code currently looks -roughly- like: -

protected void MyGrid_OnNeedData(object sender, GridNeedDataSourceEventArgs e)
    {
 
        ...General getting data stuff...
 
        MyGrid.DataSource = MyData;
    }

With MyData being a List<MyObject>.

Now there WAS something about using the OnNeedDataSource event in the basic filtering tutorial. I didn't think it was 100% clear though to be honest as it talked about "checking" the FilterExpression in the OnNeedDataSource event - is this actually implying that if you use this method of data binding you do have to manually do all the filtering? As you might have guessed I'm rather hoping thats NOT the case heh.

Anyway - appreciate any input. Thanks!
Craig
Top achievements
Rank 1
 answered on 08 Apr 2013
1 answer
398 views
I've been trying to debug this error that's been popping up in the event viewer and I can't figure out what's causing it. There are some oddities happening on the site, but I'm not sure (and somewhat doubt) this is the reason, but I'm just going through the process of elimination now.

Anyway, this is what I get: An error occurred processing a web or script resource request. The requested resource 'pTelerik.Web.UI.Skins|Telerik.Web.UI.Skins.Common.Metro.contextMenu.gif' does not exist or there was a problem loading it. 

Can anyone point me in the right direction and help me troubleshoot this? The version of RadControls that I'm using is 2013.1.220.45.

Thank you,
Andrew
Ivan Zhekov
Telerik team
 answered on 08 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?