Hello,
Radgrid, Require to have some column disable edit. Some Cell Disable Edit.
Able to achieve by cell opening to block, but "TAB" key stopped and jump out of Radgrid. User require to get mouse back for next cell to open edit mode again.
Any possible way to simulate Tab key move to next cell at batch edit opening ?
function BatchEditOpening(sender, args) {
var row = args.get_row();
var cell = args.get_cell();
// cancel edit based on cell data ***
var content = $telerik.$(cell).text().trim();
if (content == "three") {
args.set_cancel(true);
====== How to tab focus cell opening to next cell ??
====== args.get_cell(); does not have cell index
====== so that batchManager1.openCellForEdit(??? how to call next available cell ?? )
}
}
I have a radgrid with 2 columns at 400px each. I have set the width of the grid to 600px and AllowScroll=true. I also have AllowColumnResize=true, when i resize column 1 to 500px by dragging, it will automatically resize column 2 down to 300px, maintaining the original overall width of a combined 800px for the 2 columns. Is there anyway to maintain the size of column 2 when column 1 is resized such that column 1 is the new resized 500px and column 2 stays at 400px, increasing the overall combined size to 900px? I looked at ReizeGridOnColumnResize=true but that causes my grid width of 600px and allowscroll to be ignored and the width of the grid is displayed as the full 900px causing the rest of my page layout to be stretched.
<telerik:RadGrid ID="RadGrid1" runat="server"
ClientSettings-Scrolling-AllowScroll="true"
OnNeedDataSource="RadGrid_NeedDataSource"
height="200"
Width="600">
<ClientSettings>
<Resizing AllowColumnResize="True" ResizeGridOnColumnResize="false" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="false" >
<Columns>
<telerik:GridTemplateColumn HeaderStyle-Width="400" HeaderText="1">
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-Width="400" HeaderText="2">
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Hi,
When looking at MetroTouch (and other) skin on FF, Edge and Chrome we see a little discrepance in the stepper bar, see attached.
This will be solved when altering css like so:
.RadWizard .rwzBreadCrumb .rwzLink::before {
right: -0.5em;}
original value is:
right: -0.6em;
Marc
protected
void
RadButton1_Click(
object
sender, EventArgs e)
{
RadScheduler1.ExportToPdf();
}
Change value by mousewheel does not work in Edge (Microsoft Edge 44.17763.1.0, Microsoft EdgeHTML 18.17763), Chrome is ok
try here:
https://demos.telerik.com/aspnet-ajax/numerictextbox/overview/defaultcs.aspx
As the title describes I am having an issue exporting some data from a grid to CSV. Here is our use case:
We query data from our database, the page examines the data and then displays errors for each cell where the data is improper for the external system that the data will eventually be fed into. After the user fixes the "first stage" errors another two error checking stages are enabled. Once these stages are also passed, the user can then click on a button that hides all of the original rows and displays the rows we have added to the grid for export. At this point all of the data in the database for these records has been fixed.
Once they click on the Prepare Data for Export button, they will then be able to click on the Export Data button. Both of these buttons are asp buttons, we are not using the built-in export buttons.
So, once the export button is pressed the file is generated and all of our data that we want to be exported is however we have a problem where the first row in the grid is not being exported. In the export file, the first row is blank and the ID for the record does not show up in any other row.
Here is a scrubbed example:
https://www.dropbox.com/s/m562savvovi8fmp/GridExport_Scrubbed.csv?dl=0
Here is the grid definition:
<
telerik:RadGrid
ID
=
"ClaimExportGrid"
runat
=
"server"
AllowAutomaticUpdates
=
"false"
DataSourceID
=
"DDDClaimDS"
OnGridExporting
=
"OnClaimExportGridExporting"
AllowFilteringByColumn
=
"true"
AllowPaging
=
"true"
PageSize
=
"50"
VirtualItemCount
=
"50"
OnExcelExportCellFormatting
=
"OnClaimExportGridExcelExportFormatting"
OnItemCreated
=
"OnClaimExportGridItemCreated"
OnItemDataBound
=
"OnClaimExportGridItemDataBound"
OnUpdateCommand
=
"OnClaimExportGridUpdateCommand"
AutoGenerateColumns
=
"false"
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
/>
<
ExportSettings
ExportOnlyData
=
"true"
FileName
=
"ClinicDDDExport"
HideStructureColumns
=
"True"
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
/>
<
MasterTableView
EditMode
=
"InPlace"
>
<
Columns
>
<
telerik:GridCheckBoxColumn
UniqueName
=
"BlkEdtEnabled"
AllowFiltering
=
"false"
Display
=
"false"
HeaderText
=
"Bulk Edit"
/>
<
telerik:GridCheckBoxColumn
UniqueName
=
"ChgInExptEnabled"
AllowFiltering
=
"false"
Display
=
"false"
HeaderText
=
"Change In Export"
/>
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCommandColumn"
/>
<
telerik:GridBoundColumn
DataField
=
"LOC"
UniqueName
=
"LOC_Export"
AllowFiltering
=
"false"
HeaderText
=
"LOC"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Contract"
UniqueName
=
"Contract_Export"
AllowFiltering
=
"false"
HeaderText
=
"Contract"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Assist"
HeaderText
=
"Assist"
Display
=
"false"
AllowFiltering
=
"false"
UniqueName
=
"Assist_Export"
/>
<
telerik:GridBoundColumn
DataField
=
"Start Date"
HeaderText
=
"Start Date"
AllowFiltering
=
"false"
DataFormatString
=
"{0:MM/dd/yyyy}"
UniqueName
=
"StartDate_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"End Date"
HeaderText
=
"End Date"
AllowFiltering
=
"false"
DataFormatString
=
"{0:MM/dd/yyyy}"
UniqueName
=
"EndDate_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"CPT"
HeaderText
=
"CPT"
AllowFiltering
=
"true"
Display
=
"false"
UniqueName
=
"CPT_Export"
/>
<
telerik:GridBoundColumn
DataField
=
"Nursing"
HeaderText
=
"Nursing"
AllowFiltering
=
"false"
UniqueName
=
"Nursing_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Units Delivered"
HeaderText
=
"Delivered"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"UnitsDelivered_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Units Absent"
HeaderText
=
"Absent"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"UnitsAbsent_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ServiceRate"
HeaderText
=
"ServRate"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"ServiceRate_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLID1"
HeaderText
=
"TPL1ID"
AllowFiltering
=
"false"
UniqueName
=
"TPLID1_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLReceived1"
HeaderText
=
"TPL1Rec"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"TPLReceived1_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLCode1"
UniqueName
=
"TPL1Code_Export"
AllowFiltering
=
"false"
HeaderText
=
"TPL1Code"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLID2"
HeaderText
=
"TPL2ID"
AllowFiltering
=
"false"
UniqueName
=
"TPLID2_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLReceived2"
HeaderText
=
"TPL2Rec"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"TPLReceived2_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLCode2"
UniqueName
=
"TPL2Code_Export"
AllowFiltering
=
"false"
HeaderText
=
"TPL2Code"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLID3"
HeaderText
=
"TPL3ID"
AllowFiltering
=
"false"
UniqueName
=
"TPLID3_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLReceived3"
HeaderText
=
"TPL3Rec"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"TPLReceived3_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLCode3"
UniqueName
=
"TPL3Code_Export"
AllowFiltering
=
"false"
HeaderText
=
"TPL3Code"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"DDDSubmit"
HeaderText
=
"DDDSubmit"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"DDDSubmit_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ProvCtrl"
HeaderText
=
"ProvCtrl"
AllowFiltering
=
"false"
UniqueName
=
"ProvCtrl_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"AHCCCSID"
HeaderText
=
"AHCCCSID"
AllowFiltering
=
"false"
UniqueName
=
"AHCCCSID_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ClaimID"
HeaderText
=
"ClaimID"
AllowFiltering
=
"false"
UniqueName
=
"ClaimID_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"NPI"
HeaderText
=
"NPI"
AllowFiltering
=
"false"
UniqueName
=
"NPI_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"PlaceOfService"
HeaderText
=
"PlaceOfService"
AllowFiltering
=
"false"
UniqueName
=
"POS_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"SupName"
HeaderText
=
"SupervisorName"
AllowFiltering
=
"false"
UniqueName
=
"SupName_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"TherapistName"
HeaderText
=
"RenderTherapistName"
AllowFiltering
=
"false"
UniqueName
=
"TherapistName_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"PatientName"
HeaderText
=
"PatientName"
AllowFiltering
=
"false"
UniqueName
=
"PatientName_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"Tier"
HeaderText
=
"Tier"
AllowFiltering
=
"false"
UniqueName
=
"Tier_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ModifiedOn"
HeaderText
=
"ModifiedOn"
AllowFiltering
=
"false"
UniqueName
=
"ModifiedOn_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ModifiedBy"
HeaderText
=
"ModifiedBy"
AllowFiltering
=
"false"
UniqueName
=
"ModifiedBy_Export"
Display
=
"false"
/>
<
telerik:GridBoundColumn
DataField
=
"ClaimID"
HeaderText
=
"ClaimID"
AllowFiltering
=
"false"
UniqueName
=
"ClaimID"
/>
<
telerik:GridBoundColumn
DataField
=
"PatientID"
HeaderText
=
"PatientID"
AllowFiltering
=
"false"
UniqueName
=
"PatientID"
/>
<
telerik:GridBoundColumn
DataField
=
"Assist"
HeaderText
=
"Assist"
AllowFiltering
=
"false"
UniqueName
=
"Assist"
/>
<
telerik:GridBoundColumn
DataField
=
"Start Date"
HeaderText
=
"Start Date"
AllowFiltering
=
"false"
DataFormatString
=
"{0:MM/dd/yyyy}"
UniqueName
=
"StartDate"
/>
<
telerik:GridBoundColumn
DataField
=
"End Date"
HeaderText
=
"End Date"
AllowFiltering
=
"false"
DataFormatString
=
"{0:MM/dd/yyyy}"
UniqueName
=
"EndDate"
/>
<
telerik:GridBoundColumn
DataField
=
"CPT"
HeaderText
=
"CPT"
AllowFiltering
=
"false"
UniqueName
=
"CPT"
/>
<
telerik:GridBoundColumn
DataField
=
"Units Delivered"
AllowFiltering
=
"false"
HeaderText
=
"Delivered"
DataFormatString
=
"{0:F2}"
UniqueName
=
"UnitsDelivered"
/>
<
telerik:GridBoundColumn
DataField
=
"Units Absent"
AllowFiltering
=
"false"
HeaderText
=
"Absent"
DataFormatString
=
"{0:F2}"
UniqueName
=
"UnitsAbsent"
/>
<
telerik:GridBoundColumn
DataField
=
"ServiceRate"
AllowFiltering
=
"false"
HeaderText
=
"Serv. Rate"
DataFormatString
=
"{0:F2}"
UniqueName
=
"ServiceRate"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLID1"
AllowFiltering
=
"false"
HeaderText
=
"TPL1 ID"
UniqueName
=
"TPLID1"
/>
<
telerik:GridBoundColumn
DataField
=
"TPLReceived1"
HeaderText
=
"TPL1 Recv."
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"TPLReceived1"
/>
<
telerik:GridBoundColumn
DataField
=
"DDDSubmit"
HeaderText
=
"DDD Submit"
AllowFiltering
=
"false"
DataFormatString
=
"{0:F2}"
UniqueName
=
"DDDSubmit"
/>
<
telerik:GridBoundColumn
DataField
=
"RenderingTherapistID"
AllowFiltering
=
"false"
HeaderText
=
"RenderingTherapistID"
UniqueName
=
"RenderingTherapistID"
/>
<
telerik:GridBoundColumn
DataField
=
"EmployeeID"
HeaderText
=
"SupervisorID"
AllowFiltering
=
"false"
UniqueName
=
"EmployeeID"
/>
<
telerik:GridBoundColumn
DataField
=
"SupNAme"
HeaderText
=
"Supervisor Name"
AllowFiltering
=
"false"
UniqueName
=
"SupName"
/>
<
telerik:GridBoundColumn
DataField
=
"AHCCCSID"
HeaderText
=
"AHCCCS ID"
AllowFiltering
=
"false"
UniqueName
=
"AHCCCSID"
/>
<
telerik:GridBoundColumn
DataField
=
"NPI"
HeaderText
=
"NPI"
AllowFiltering
=
"false"
UniqueName
=
"NPI"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
Here are the sections of the code where we are dealing with the grid before export:
OnItemDataBound event:
If ViewState("BExported") Then
If Not bCallOnce Then
EnableExportCols()
bCallOnce = True
End If
If eItmMap.Count > 0 Then
Dim conStr As String = ConfigurationManager.ConnectionStrings("H2T2SQLDBCConnectionString").ConnectionString
Dim newNPI As String = ""
Dim newAhcccsID As String = ""
If eItmMap.ContainsKey(grdDataItm.Item("ClaimID").Text) Then
Using con As New SqlConnection(conStr)
Using cmd As New SqlCommand("Select @AHCSID = AHCCCSID, @NPI = NPI from TherapistCredentials where EmployeeID = @NewSupID", con)
cmd.Parameters.Add("@NewSupID", SqlDbType.Int).Value = eItmMap(grdDataItm.Item("ClaimID").Text).GetSupID()
cmd.Parameters.Add("@AHCSID", SqlDbType.VarChar, 10)
cmd.Parameters.Add("@NPI", SqlDbType.VarChar, 20)
cmd.Parameters("@AHCSID").Direction = ParameterDirection.Output
cmd.Parameters("@NPI").Direction = ParameterDirection.Output
con.Open()
cmd.ExecuteNonQuery()
con.Close()
newNPI = If(IsDBNull(cmd.Parameters("@NPI").Value), "", cmd.Parameters("@NPI").Value)
newAhcccsID = If(IsDBNull(cmd.Parameters("@AHCSID").Value), "", cmd.Parameters("@AHCSID").Value)
grdDataItm.Item("NPI_Export").Text = newNPI
grdDataItm.Item("AHCCCSID_Export").Text = newAhcccsID
End Using
End Using
End If
End If
Else
......
EnableExportCols Function:
Private Sub EnableExportCols()
For Each col As GridColumn In ClaimExportGrid.MasterTableView.Columns
If TypeOf col Is GridBoundColumn Then
Dim bCol As GridBoundColumn = CType(col, GridBoundColumn)
If bCol.UniqueName.Contains("Export") Then
bCol.Visible = True
bCol.Display = True
Else
bCol.Visible = False
bCol.Display = False
End If
End If
Next
End Sub
As you can see in the attached csv file, the first row is missing and the ID CL 733083 is not present in the file. How can we resolve this?
Thanks.
I have an programmatically built Ajaxified RadGrid that is being built when the RadToolTipManager is called and TheRadToolTipManager_AjaxUpdate event is triggered. The tool tip and grid works and shows all the data I am looking for, and I would like to be able to export the data. I am using the built-in export button that the RadGrid has available, but when I click the export button it disappears and no export file is created. I have read the Export from Ajaxified Grid page and understand that the built-in button already performs the post backs, so I am stuck.
Programmatically built RadGrid:
private
void
UpdateToolTip(
string
elementID, UpdatePanel panel)
{
RadGrid toolTipGrid=
new
RadGrid();
toolTipGrid.ID =
"ToolTipGridID"
;
toolTipGrid.AutoGenerateColumns =
false
;
toolTipGrid.EnableViewState =
false
;
toolTipGrid.MasterTableView.ExpandCollapseColumn.Visible =
false
;
GridBoundColumn boundColumn =
new
GridBoundColumn();
boundColumn.DataField =
"Data1"
;
boundColumn.HeaderText =
"Data1"
;
boundColumn.DataType =
typeof
(
string
);
boundColumn.UniqueName =
"Data1"
;
boundColumn.Exportable =
true
;
toolTipGrid.MasterTableView.Columns.Add(boundColumn);
boundColumn =
new
GridBoundColumn();
boundColumn.DataField =
"Data2"
;
boundColumn.HeaderText =
"Data2"
;
boundColumn.DataType =
typeof
(
int
);
boundColumn.UniqueName =
"Data2"
;
boundColumn.Exportable =
true
;
toolTipGrid.MasterTableView.Columns.Add(boundColumn);
// Export stuff
toolTipGrid.MasterTableView.CommandItemSettings.ShowExportToExcelButton =
true
;
toolTipGrid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton =
false
;
toolTipGrid.MasterTableView.CommandItemSettings.ShowRefreshButton =
false
;
toolTipGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Bottom;
toolTipGrid.ItemCommand += toolTipGrid_ItemCommand;
toolTipGrid.AllowPaging =
true
;
toolTipGrid.PageSize = 20;
toolTipGrid.PagerStyle.Mode = GridPagerMode.NextPrev;
toolTipGrid.NeedDataSource += CargoMileageInfo_NeedDataSource;
toolTipGrid.DataSource = DataForToolTip;
toolTipGrid.DataBind();
panel.ContentTemplateContainer.Controls.Add(toolTipGrid);
}
The button triggers the toolTipGrid_ItemCommand
private
void
toolTipGrid_ItemCommand(
object
sender, GridCommandEventArgs e)
{
RadGrid toolTipGrid= (RadGrid)sender;
if
(e.CommandName == RadGrid.ExportToExcelCommandName)
{
toolTipGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;
toolTipGrid.ExportSettings.IgnorePaging =
true
;
toolTipGrid.ExportSettings.ExportOnlyData =
true
;
toolTipGrid.ExportSettings.OpenInNewWindow =
true
;
}
}
Advance DataBind:
private
void
toolTipGrid_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
RadGrid toolTipGrid= (RadGrid)sender;
toolTipGrid.DataSource = DataForToolTip;
}
This may be related, but I have debugged and stepped through my code to see where it breaks when the button is clicked, and I get this error, "JavaScript runtime error: Unable to get property 'Cols' of undefined or null reference occurred."
Hi Team,
We are trying to do copy the images along with Text content from RadEditor to Word File,
We are geting the text content only images are not geting in word file.
please can you help me.
Thanks and Regards,
Narenderreddy
Do you have an example similar to your Server-Side Data Binding example that, instead of creating markers, creates the shapes (similar to the earthquake example) from the Server Side?
I have all my geo locations and condition data stored in SQL and need to dynamically build a layer to show the shapes, sized and colored, based on the condition data queried from SQL.
any direction would be appreciated.