$find('<%= RadButton1.ClientID %>').set_toolTip('New tooltip');Hello,
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
with reference with above link...
i need to use grid with inline edit mode.
My column will be date,report type , description.
After clicking on edit it will convert as dattimepicker, dropdownlist, textbox.
my dropdown will be bind with datatable.
After clik of edit button it will covert in to update and cancel button. i dnt want that. after cllick of edit image it wiill alow data to be edit. and save changes button will be @ botton..
Can you please give me code for above...
Thanks,
Mugdha
<telerik:RadGrid ID="RadGrid2" runat="server" AllowMultiRowSelection="true" Width="300px"OnNeedDataSource="RadGrid2_NeedDataSource"> <MasterTableView AutoGenerateColumns="False" DataKeyNames="codigo" EditMode="InPlace"> <Columns> <telerik:GridTemplateColumn> <ItemTemplate> <asp:CheckBox runat="server" ID="CheckBox1" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn HeaderText="Código" DataField="codigo" UniqueName="codigo" ReadOnly="True" Display="true" ColumnEditorID="GridTextBoxColumnEditor1" /> <telerik:GridBoundColumn HeaderText="Descrição" DataField="descricao" UniqueName="descricao" ColumnEditorID="GridTextBoxColumnEditor1" /> <telerik:GridEditCommandColumn ButtonType="ImageButton"> </telerik:GridEditCommandColumn> </Columns> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" /> <asp:Button ID="btnDeletar" runat="server" Text="Deletar Items" OnClick="btnDeletar_Click" /> <asp:Button ID="btnInserir" runat="server" Text="Inserir Items" OnClick="btnInserir_Click" /> <asp:Button ID="btnEditar" runat="server" Text="Editar Items" OnClick="btnEditar_Click" /> <telerik:RadWindowManager ID="Window" runat="server" EnableShadow="true" />protected void RadGrid2_NeedDataSource(object sender, GridNeedDataSourceEventArgs e){ // Atribui dados a grid. RadGrid2.DataSource = this.GridSource; this.GridSource.PrimaryKey = new DataColumn[] { this.GridSource.Columns["codigo"] };}/// <summary>/// Obtem a source do grid./// </summary>private DataTable GridSource{ get { object obj = ViewState["GRID"]; if ((!(obj == null))) { return ((DataTable)(obj)); } DataTable myDataTable = new DataTable(); myDataTable = Preenche(); ViewState["GRID"] = myDataTable; return myDataTable; }}/// <summary>/// Obtem data table com dados para grid./// </summary>/// <returns>Retorna datatable</returns>public DataTable Preenche(){ C001 c001 = new C001(); DataTable dt = new DataTable(); dt = c001.ObterDados(); return dt;}Hi,
I have a RadGrid that contains two GridButtonColumns of HeaderButtonType LinkButton. I would like to control the behavior to dynamically hide one column and show the other and vice versa.
In addition, in one of the circumstances there is an additional GridBoundColumn that I would like to hide.
How do I do this? Also, can I do it in the ItemDataBound method or does it need to be done in a PreRender method?
In the Grid below, I want to show the RequestorName and RequestorPd columns and hide the InstitutionName column in one case and in the other I want to show the InstitutionName column and hide the RequestorName and RequestorPd columns.
<telerik:RadGrid ID="RadGridPrescriber" runat="server" AutoGenerateColumns="false" AllowSorting="True" AllowPaging="false" Skin="Simple" ClientSettings-Resizing-AllowColumnResize="true" ItemStyle-Wrap="false" Width="95%" HeaderStyle-Wrap="false" PageSize="25" OnNeedDataSource="RadGridPrescriber_NeedDataSource" OnItemDataBound="RadGridPrescriber_ItemDataBound" OnItemCommand="RadGridPrescriber_ItemCommand"> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings> <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true" /> <MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" DataKeyNames="RequestorSln" ShowFooter="false" PagerStyle-AlwaysVisible="false" CommandItemDisplay="Top" > <NoRecordsTemplate> <asp:Label ID="lblMsg" runat="server" Text="No Records found"></asp:Label> </NoRecordsTemplate> <CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false" /> <Columns> <telerik:GridButtonColumn HeaderText="Name" HeaderButtonType="LinkButton" UniqueName="RequestorName" CommandName="GetByRequestorSLN" DataTextField="RequestorName" ItemStyle-HorizontalAlign="Left" /> <telerik:GridButtonColumn HeaderText="Name" HeaderButtonType="LinkButton" UniqueName="InstitutionName" CommandName="GetByRequestorSLN" DataTextField="InstitutionName" ItemStyle-HorizontalAlign="Left" /> <telerik:GridBoundColumn HeaderText="PD" HeaderButtonType="TextButton" DataField="RequestorPd" ItemStyle-HorizontalAlign="Left" /> </Columns> </MasterTableView> </telerik:RadGrid>
Thanks,