Hi,
I have a RadGrid2 inside Radgrid1 Edit form Template. When RadGrid1 is in edit mode, the command item row shrinks. I checked my css and that's not the problem. Has anyone ever dealt with this before?
Thanks
<
OlapSettings
ProviderType
=
"Adomd"
>
<
AdomdConnectionSettings
Cube
=
"Leads"
DataBase
=
"DBName"
ConnectionString
=
"Provider=MSOLAP.5;Data Source=ServerName;User ID=webuser;Initial Catalog=DBName;"
>
</
AdomdConnectionSettings
>
</
OlapSettings
>
rpg.OlapSettings.ProviderType = Telerik.Web.UI.PivotGridOlapProviderType.Adomd
rpg.OlapSettings.AdomdConnectionSettings.Cube =
"Leads"
rpg.OlapSettings.AdomdConnectionSettings.DataBase =
"DBName"
rpg.OlapSettings.AdomdConnectionSettings.ConnectionString =
"Provider=MSOLAP.5;Data Source=ServerName;User ID=XXX;Initial Catalog=DBName;"
Hello, I've been using the export to excel settings in the rad grid, which works great, but many of the users that work with my system have been complaining on the button size since it seems to be pretty small, I tried to change it myself but didn't seem to find a property to do that, I've only been able to change the command items bar but the button stays the same size.
Is there any way to change the button size and place for the "CommandItemSettings ShowExportToExcelButton"?
I leave my code below
<MasterTableView CommandItemDisplay="Top">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowExportToPdfButton="true" ShowRefreshButton="false"/>
Hi,
I have a multipage control that has 5 tabs. On the 2nd tab Ihave a grid which displays order details and on the 5th tab I have another grid which allows the selection of a product to be inserted into the grid on tab #2. When the product row is double-clicked a RadWindow is popped into which the full order details can be added. On completing the data entry a button then inserts the added data into the datatable which is the source of the grid on tab #2 and executes a "CloseAndRebind" script in the window code-behind e.g.:
protected
void
btnInsertClicked(
object
sender, EventArgs e)
{
DataSet ds = Session[
"OrdersTables"
]
as
DataSet;
DataRow nr = ds.Tables[
"LineItems"
].NewRow();
nr[
"LineItem_Id"
] = GetNewItemId(23);
...
.... data inserted into DataRow
...
ds.Tables[
"LineItems"
].Rows.Add(nr);
// update the session
Session.Remove(
"OrdersTables"
);
Session.Add(
"OrdersTables"
, ds);
ClientScript.RegisterStartupScript(Page.GetType(),
"mykey"
,
"CloseAndRebind();"
,
true
);
}
This script comes from one of your examples :
function
CloseAndRebind(args) {
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().close();
}
which bubbles back to the parent page and triggers this AJAX request to execute a ReBind on the grid in tab #2
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
DefaultLoadingPanelID
=
"mainLoadingPanel"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid2"
LoadingPanelID
=
"grid2LoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
The AJAX request triggers the NeedDataSource event of the grid on tab #2 to re-load the DataSource however on switching to tab #2 the grid was still showing the old data. At this point clicking the refresh option top-right of the grid the NeedDataSource event is again triggered and this time the new line is displayed.
I'd like the AJAX request to switch to tab #2 and then issue the refresh so coded:
protected
void
RadAjaxManager1_AjaxRequest(
object
sender, AjaxRequestEventArgs e)
{
if
(e.Argument ==
"Rebind"
)
{
// swap back to the order lines tab then refresh it
RadTab rt = RadTabStrip1.Tabs.FindTabByText(
"Order Items"
);
rt.Selected =
true
;
RadGrid1.MasterTableView.SortExpressions.Clear();
RadGrid1.MasterTableView.GroupByExpressions.Clear();
RadGrid1.Rebind();
}
}
However the swap back to tab #2 fails to happen and the grid is still not refreshed.
Hi
I'm working with Gantt control but I'm stuck on 2 things. I need to handle events like:
- Change progress of a task
- Delete key pressed on (in order to cancel deleting process)
I'd be grateful for your help because I spent a few hours already on that and didn't find the solution.
Thanks,
Maciek
My RadScheduler, on page load, appears squished up (see the squished.jpg). When I click the "today" button in the RadScheduler, it expands and appears normal size (see NormalSize.jpg).
Why does it do this, and how can I just make it appear normal size on page load?
Thanks
Hi Telerik,
1. Is there a way to validate a GridBoundColumn so that it does the following:
2. Is there a way to validate another GridBoundColumn so that it does the following:
3. How do I convert No. 2 above to a GridDropdownColumn and also satisfy the same validation requirements? Dropdown option should display:
Thanks as always.
Hello, I have a radGrid on my page that reads a SQL statement and returns the data in the grid upon first load. I have a button where users could import a tab delimited CSV file and display it to the grid. I believe that the process would go as: 1) Import CSV & store in dataTable 2)Clear radGrid original Data 3)set datasource of Radgrid to the newly made Datatable. Is this a efficient way of going about this? If so How would I clear the radGrid & set the radgrid to a new datasource?
aspx.vb(UploadButton)
Protected Sub Upload(sender As Object, e As EventArgs)
'Upload and save the file
Dim csvPath As String = Server.MapPath("~/File") + Path.GetFileName(FileUpload1.PostedFile.FileName)
FileUpload1.SaveAs(csvPath)
Dim dt As New DataTable()
dt.Columns.AddRange(New DataColumn(3) {New DataColumn("Category ID", GetType(String)), New DataColumn("Category Label", GetType(String)), New DataColumn("Attribute Label", GetType(String)), New DataColumn("Attribute Type Label", GetType(String))})
Dim csvData As String = File.ReadAllText(csvPath)
For Each row As String In csvData.Split(Environment.NewLine) 'How to split csv?'
If Not String.IsNullOrEmpty(row) Then
dt.Rows.Add()
Dim i As Integer = 0
For Each cell As String In row.Split(","c)
dt.Rows(dt.Rows.Count - 1)(i) = cell
i += 1
Next
'ReceiptGrid.DataSource = Nothing
''ReceiptGrid.Rebind(dt.DataSet);
End If
Next
Me.ReceiptGrid.DataSource = Nothing
Me.ReceiptGrid.DataBind()
'Dim consString As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
'Using con As New SqlConnection(consString)
' Using sqlBulkCopy As New SqlBulkCopy(con)
' 'Set the database table name
' sqlBulkCopy.DestinationTableName = "" 'What database to write it to?
' con.Open()
' sqlBulkCopy.WriteToServer(dt)
' con.Close()
' End Using
'End
End Sub
aspx(RadGrid)
<telerik:RadGrid ID="ReceiptGrid" runat="server" AllowFilteringByColumn="True" AllowMultiRowEdit="True" AllowPaging="True" DataSourceID="Attributes" Height="787px" Skin="Glow" Width="1000px" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" style="margin-left: 0px; margin-top: 4px;" HorizontalAlign="Justify" CellPadding="0" PageSize="18" RenderMode="Native">
<GroupingSettings CollapseAllTooltip="Collapse all groups">
</GroupingSettings>
<ExportSettings ExportOnlyData="True">
<Excel Format="Xlsx" />
<Csv EncloseDataWithQuotes="False" ColumnDelimiter="Tab" RowDelimiter="Comma" />
</ExportSettings>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataSourceID="Attributes" CommandItemDisplay="Top" PageSize="15">
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="41px" />
</RowIndicatorColumn>
<ExpandCollapseColumn Created="True">
<HeaderStyle Width="41px" />
</ExpandCollapseColumn>
<CommandItemSettings ShowExportToExcelButton="True" ShowExportToCsvButton="True" />
<Columns>
<telerik:GridBoundColumn DataField="CategoryID" FilterControlAltText="Filter CategoryID column" HeaderText="Category ID" SortExpression="CategoryID" UniqueName="CategoryID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CategoryLabel" FilterControlAltText="Filter CategoryLabel column" HeaderText="Category Label" SortExpression="CategoryLabel" UniqueName="CategoryLabel">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="AttributeLabel" FilterControlAltText="Filter AttributeLabel column" HeaderText="Attribute Label" SortExpression="AttributeLabel" UniqueName="AttributeLabel">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="AttributeTypeLabel" FilterControlAltText="Filter AttributeTypeLabel column" HeaderText="Attribute Type Label" SortExpression="AttributeTypeLabel" UniqueName="AttributeTypeLabel">
</telerik:GridBoundColumn>
<telerik:GridEditCommandColumn>
</telerik:GridEditCommandColumn>
<telerik:GridClientDeleteColumn FilterControlAltText="Filter column column" UniqueName="column">
</telerik:GridClientDeleteColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu RenderMode="Native"></FilterMenu>
<HeaderContextMenu RenderMode="Native"></HeaderContextMenu>
</telerik:RadGrid>