
| <telerik:RadComboBox ID="RcbDepot" runat="server" HighlightTemplatedItems="true" AllowCustomText="false" OnInit="RcbDepot_Init" Width="100%" /> |


| rik:RadGrid ID="gv_umowy" runat="server" DataSourceID="sql_moje_umowy" AutoGenerateColumns="False" |
| GridLines="None" AllowSorting="True"> |
| <MasterTableView DataKeyNames="id_umo" DataSourceID="sql_moje_umowy"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="nazwa_kh" HeaderText="Kontrahent" HeaderStyle-Width="200px" |
| ItemStyle-Width="200px"> |
| <HeaderStyle Width="200px"></HeaderStyle> |
| <ItemStyle Width="200px"></ItemStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="nr_ewidencyjny" HeaderText="Nr umowy AU" HeaderStyle-Width="90px" |
| ItemStyle-Width="90px"> |
| <HeaderStyle Width="90px"></HeaderStyle> |
| <ItemStyle Width="90px"></ItemStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="waznosc_umowy" HeaderText="Data obowiÄ…zywania" |
| DataFormatString="{0: dd-MM-yyyy}" HeaderStyle-Width="90px" ItemStyle-Width="90px"> |
| <HeaderStyle Width="90px"></HeaderStyle> |
| <ItemStyle Width="90px"></ItemStyle> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="odpowiedzialna" HeaderText="Osoba odpowiedzialna" |
| HeaderStyle-Width="90px" ItemStyle-Width="90px"> |
| <HeaderStyle Width="90px"></HeaderStyle> |
| <ItemStyle Width="90px"></ItemStyle> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <ItemTemplate> |
| <a href="#" target="_blank" onclick="klik('<%#Eval("id_umo")%>')"> |
| <table border="0" align="left" width="100%"> |
| <tr> |
| <td width="200px"> |
| <%#IIf(Len(Eval("nazwa_kh")) > 32, Left(Eval("nazwa_kh"), 32) + "...", Eval("nazwa_kh"))%> |
| </td> |
| <td width="90px"> |
| <%#Eval("nr_ewidencyjny")%> |
| </td> |
| <td width="90px"> |
| <%#IIf(Eval("waznosc_umowy") = "1900-01-01", "bezterminowa", String.Format("{0:d}", Eval("waznosc_umowy")))%> |
| </td> |
| <td width="90px"> |
| <%#Eval("odpowiedzialna")%> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="5" width="100%"> |
| <b> |
| <%#Eval("opis")%></b> |
| </td> |
| </tr> |
| </table> |
| </a> |
| </ItemTemplate> |
| </MasterTableView> |
| <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"> |
| <Selecting AllowRowSelect="True" /> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
<
SortExpressions>
<telerik:GridSortExpression FieldName="SupplierDueDate" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="CountyName" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="Municipality" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="PostalCode" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="CooperativeHousing" SortOrder="Ascending" />
</
SortExpressions>
Then i planned to change these settings(i.e) the columns programmatically in the server side (to overrride these settings based on the page) like these:
case "MyOrders":
this.grdOrderList.MasterTableView.SortExpressions.Clear();
sortExpr =
new GridSortExpression();
sortExpr.FieldName =
"CreatedTime";
sortExpr.SortOrder =
GridSortOrder.Ascending;
this.grdOrderList.MasterTableView.SortExpressions.AddSortExpression(sortExpr);
break;
But this seems not working ... since using the sortExpression.Clear() i see a small command button in the headers of the column(just beside the column name ) .... please tell me where im going wrong with the possible solution to implement the above
thanks in advance,
Balajee
