Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views

Rewrote the queries to load the grids...

Maria Ilieva
Telerik team
 answered on 08 Jan 2014
1 answer
266 views
I have a telerik radgrid in my application as below and related codes for binding. My Problem is eventhough I have set my GroupByFields SortOrder = "Descending" it still in ascending mode. Is there anything wrong in my code? [this is developed by previous developer and I'm new for telerik controls]. Please advice. Thanks in advance.
Dim tblTable As DataTable = DirectCast(ViewState("dtTblData"), DataTable)
         
''some codes ...
 
ViewState("dtTblData") = tblTable
rgInvoiceList.DataSource = tblTable
Try
     Dim expression1 As GridGroupByExpression = GridGroupByExpression.Parse("ClaimsFor [Claims Type], count(ClaimsFor) Items [My Items], Sum(Total) [Group Total] Group By ClaimsFor")
     Me.CustomizeExpression(expression1)
          Me.rgInvoiceList.MasterTableView.GroupByExpressions.Add(expression1)
          rgInvoiceList.Rebind()
Catch ex As Exception
            Console.WriteLine("error" & ex.Message)
Finally
End Try
<telerik:RadGrid ID="rgInvoiceList" runat="server" CellSpacing="0" GridLines="None" ShowFooter="True" Skin="Hay" AllowSorting="True">
     <ClientSettings EnablePostBackOnRowClick="True">
          <Selecting CellSelectionMode="None" AllowRowSelect="True"></Selecting>
     </ClientSettings>
     <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" AllowCustomSorting="true">
          <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
          <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
               <HeaderStyle Width="20px"></HeaderStyle>
          </RowIndicatorColumn>
          <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
               <HeaderStyle Width="20px"></HeaderStyle>
          </ExpandCollapseColumn>
          <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
          </EditFormSettings>
          <GroupByExpressions>
               <telerik:GridGroupByExpression>
                    <SelectFields>
                         <telerik:GridGroupByField FieldName="Total"/>
                    </SelectFields>
                    <GroupByFields>
                         <telerik:GridGroupByField FieldName="ClaimsFor" SortOrder="Descending"/>
                    </GroupByFields>
               </telerik:GridGroupByExpression>
          </GroupByExpressions>
     </MasterTableView>
     <FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 08 Jan 2014
6 answers
745 views
Did you consider integrating a Bootstrap skin for telerik controls? I mean a skin wich relies on default boostrap classes so that just using the bootstrap skins (+ base Telerik controls skin) themes the controls? And changing the Bootstrap themes of course changes the controls theming.
Bootstrap is always become more popular, not just as a flexible grid system, but for skinning as well. There are zounds of sites with both free and priced Bootstrap skins.
Ivan Zhekov
Telerik team
 answered on 08 Jan 2014
2 answers
549 views
Hi,
I have the following grid and I'm trying to expand/collapse nested view on double click

<telerik:RadGrid ID="HomeRadGrid" runat="server" OnNeedDataSource="HomeRadGrid_NeedDataSource"
          EnableEmbeddedSkins="False" AllowPaging="True" AllowAutomaticUpdates="false"
          AllowAutomaticInserts="false" AllowAutomaticDeletes="false" AllowSorting="True"
          AllowFilteringByColumn="True" CellSpacing="0" Culture="it-IT" GridLines="None"
          OnItemCommand = "HomeRadGrid_ItemCommand" OnGroupsChanging="HomeRadGrid_GroupsChanging"
          OnItemDataBound = "HomeRadGrid_ItemDataBound"
          Skin="MySkin" ShowGroupPanel="True">
          <PagerStyle Mode="NextPrevAndNumeric" />
          <MasterTableView AutoGenerateColumns="False"  CommandItemDisplay="Top" DataKeyNames="Id">
           <ColumnGroups>
                      <telerik:GridColumnGroup Name="GeneralInformation" HeaderText="General Information"
                          HeaderStyle-HorizontalAlign="Center" />
                      <telerik:GridColumnGroup Name="WarningsIcon" HeaderText="Warnings"
                          HeaderStyle-HorizontalAlign="Center" />
                  </ColumnGroups>
          <CommandItemSettings RefreshText="" ShowAddNewRecordButton="false" />          
              <GroupByExpressions>
                  <telerik:GridGroupByExpression>
                      <SelectFields>
                          <telerik:GridGroupByField FieldAlias="Company" FieldName="Cdc.CompanyCode"></telerik:GridGroupByField>
                      </SelectFields>
                      <GroupByFields>
                          <telerik:GridGroupByField FieldName="Cdc.CompanyCode" SortOrder="Descending"></telerik:GridGroupByField>
                      </GroupByFields>
                  </telerik:GridGroupByExpression>
                  <telerik:GridGroupByExpression>
                      <SelectFields>
                          <telerik:GridGroupByField FieldAlias="Project" FieldName="Cdc.Code" ></telerik:GridGroupByField>
                      </SelectFields>
                      <GroupByFields>
                          <telerik:GridGroupByField FieldName="Cdc.Code"></telerik:GridGroupByField>
                      </GroupByFields>
                  </telerik:GridGroupByExpression>
              </GroupByExpressions>
              <Columns>
                  <telerik:GridBoundColumn DataField="Cdc.CompanyCode" HeaderText="Company Code" SortExpression="Cdc.CompanyCode"
                      UniqueName="Cdc.CompanyCode" Visible="false" ColumnGroupName="GeneralInformation" >
                  </telerik:GridBoundColumn>
                  <telerik:GridBoundColumn DataField="Cdc.Code" HeaderText="Project" SortExpression="Cdc.Code"
                      UniqueName="Cdc.Code" Visible="false" ColumnGroupName="GeneralInformation" >
                  </telerik:GridBoundColumn>
                   
                  <telerik:GridHyperLinkColumn
                  DataNavigateUrlFields="Bt1Asset.Asset.Code,Cdc.CompanyCode, Bt1Asset.Code, Ambiente"
                  DataNavigateUrlFormatString="Default.aspx?id={0}&filtro_soc2={1}&cgrcod={2}&amb_anag={3}&site=*&commessa=*&codicemezzo=*"
                  DataTextField="Bt1Asset.Asset.Code"
                  UniqueName="Bt1Asset.Asset.Code" HeaderText="Asset Code" HeaderStyle-Width="150px"
                  ColumnGroupName="GeneralInformation" ></telerik:GridHyperLinkColumn>
                                                          
                  <telerik:GridBoundColumn DataField="Bt1Asset.Asset.Description" HeaderText="Asset Description"
                      SortExpression="Bt1Asset.Asset.Description" UniqueName="Bt1Asset.Asset.Description" Visible="true" ColumnGroupName="GeneralInformation" >
                  </telerik:GridBoundColumn>
                  <telerik:GridImageColumn HeaderText="BT1" AllowFiltering="false" HeaderStyle-Width="50px" ItemStyle-Width="50px" ColumnGroupName="WarningsIcon"
                  UniqueName="Bt1Asset.Bt1">
  
                  </telerik:GridImageColumn>
                  <telerik:GridImageColumn HeaderText="BT2" AllowFiltering="false" UniqueName="Bt1Asset.Bt2"
                   HeaderStyle-Width="50px" ItemStyle-Width="50px" ColumnGroupName="WarningsIcon">
 
                  </telerik:GridImageColumn>
                  <telerik:GridImageColumn HeaderText="Tx/Rx" AllowFiltering="false" HeaderStyle-Width="50px" ItemStyle-Width="50px" ColumnGroupName="WarningsIcon">
                  </telerik:GridImageColumn>
                  <telerik:GridImageColumn HeaderText="Alerts" AllowFiltering="false" HeaderStyle-Width="50px" ItemStyle-Width="50px" ColumnGroupName="WarningsIcon">
                  </telerik:GridImageColumn>
              </Columns>
                <NestedViewTemplate>
                      <div class="carBackground">
                          <div style="float: left; padding-left: 40px; padding-right:20px; padding-top:10px">                           
                             <asp:Image ID="ItemImage" runat="server" AlternateText="" ImageUrl='<%# GetItemImageUrl(Container)%>' Width="200px" />
                          </div>
                          <div style="float: left; width: 50%">
                              <div class="carTitle">
                                  <%# Eval("Bt1Asset.Asset.Code")%>
                              </div>
                              <span style="color: #555555">
                                  <%# Eval("Bt1Asset.Asset.Description")%>
                                  times</span>
                              <hr class="lineSeparator" />
                              <table width="100%" class="carInfo">
                                  <tr>
                                      <td>
                                          <strong>Site:</strong>
                                          <%# Eval("Cdc.Site")%>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td>
                                          <strong>Plate:</strong>
                                          <%# Eval("Bt1Asset.Asset.Targa")%>
                                      </td>
                                  </tr>
                                 
                              </table>
                          </div>
                          <div style="float: right; padding-right: 40px; padding-left:20px;padding-top:10px">                           
                             <div style="width:200px; border:solid 1px black" id="small_map_div"></div>
                          </div>
                          <div style="clear: both">
                          </div>
                      </div>
                  </NestedViewTemplate>
          </MasterTableView>
          <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
          <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
              <Selecting AllowRowSelect="False"></Selecting>
              <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
                  ResizeGridOnColumnResize="False"></Resizing>
          </ClientSettings>
          <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
      </telerik:RadGrid>

And that's my missing script

            function RowDblClick(sender, args) {
 
                //expand/collapse nested row
}

Mattia
Top achievements
Rank 2
 answered on 08 Jan 2014
1 answer
171 views
hello sir

I want to save this image on specific path inn project
it does not allow to save Radhtmlchart

please help


below attached is RadhtmlChart image
Princy
Top achievements
Rank 2
 answered on 08 Jan 2014
4 answers
420 views

on button click do a validation on RadCombobox

Rahul
Top achievements
Rank 1
 answered on 08 Jan 2014
3 answers
188 views
Hi,
        i want to do asp.net form validation on button click using jquery. please Help me with live examples.

Kind Regards,
Rahul
Princy
Top achievements
Rank 2
 answered on 08 Jan 2014
3 answers
180 views
hello All

i have updated my application with new version of telerik controls. in my Application i have 1 radgrid,but my problem is that
in radgrid there is multiple columns somes are showing and some are visible false,in my grid there is one column i.e. Display name in that for each row i am displaying tooltip i.e my one of the grid column but it is visible false.
i am using the following code on Radgrid_ItemDataBound

//Set tool tip
        if (e.Item is GridDataItem)
        {
            GridDataItem gridItem = e.Item as GridDataItem;
            foreach (GridColumn column in RadGrid_PurchaseOrderDetail.MasterTableView.RenderColumns)
            {
                if (column is GridBoundColumn)
                {
                    gridItem["PartItems"].ToolTip = gridItem["SKUNumber"].Text;
                    gridItem["Price"].ToolTip = gridItem["StandardCost"].Text;
                }
            }
        }

but i am getting value of gridItem["SKUNumber"].Text this is '&nbsp'

plz tell the solution how to display tooltip (value of another radgrid boundcolumn)for radgrid bound column.

thank you...
Princy
Top achievements
Rank 2
 answered on 08 Jan 2014
1 answer
94 views
Hi,
              I want to get absolute path of selected image or file when i selected it.

Thanks,
Rahul
Shinu
Top achievements
Rank 2
 answered on 08 Jan 2014
4 answers
479 views
Hi guys,

Is there any way to allow a user to unselect an item from the RadListBox (assuming that there is no checkbox, and it is a single selection type).

I can only find client events which relate to the selectedIndexChanging or itemChecking, neither of which would be correct for a single-selection type.

Cheers
Mike
Michael
Top achievements
Rank 1
 answered on 07 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?