CL_GUI_DOCKING_CONTAINER heading for each grid
HI!,
I am using CL_GUI_DOCKING_CONTAINER to display 3 ALV grids on single screen, i t's working fine, now want to show separate title (Heading ) for each grid, Please someone tell me how to do that..
Hi,
Declare a layout as follows :
data : grid_layout type table of lvc_s_layo with header line.
grid_layout-grid_title = 'Title1'.
and then pass the layout with the required title.
call method ob_grid1->set_table_for_first_display
exporting
is_layout = grid_layout
changing it_outtab = it_msg[]
it_fieldcatalog = it_slis.
This will help for sure.
Regards,
Sonal
Similar Messages
-
Add different header for each page
We are using RTF templates to create XML Letters.
1) Is it possible to have different header for each page?
2) Can we have a data filed column in the header?
Thanks,Ha ha, Thanks, that is exactly what I needed! How perfectly obvious, but somehow easy to miss! Thanks so much.
Eric -
Header for each column of data
I am struggling to get header for each column in attached code. I would like to see this data in excel with header at the top. Also I wonder how to know which column belongs to which plot and which axis.
Solved!
Go to Solution.
Attachments:
saving for excel.vi 130 KBI would keep this in the original thread.
-
List header for alv grid using abap objects
Hai all,
I have displayed alv grid in container control using abap objects i.e. using method set_table_for_first_display.
now i need to display list header for this alv grid.
please help me how to create with a sample coding.
Thanks and regards,
Prabu S.Create a splitter using CL_GUI_EASY_SPLITTER_CONTAINER with a top and bottom half. Put the alv grid in the bottom half. Use cl_dd_document (documented in help.sap.com ) to build the header in the top half. Use events on CL_GUI_ALV_GRID to handle the top-of-list printing.
Or, if available, use CL_SALV_TABLE, and read the documentation on that. When I needed a header for my report, that's what I did. There's plenty of good documentation about if you'll search for it.
matt -
Hi,
i've create an application without login (i choose that when i created the app.). But the template/theme? is shown the apex_public_user and a logout-link in the header or footer (depends from the theme). I'd like to make this invisible and instead add an logo-gif and a text in the header.
How can i realize that?
yonahHello Roel,
i think i have an general problem with understanding apex:
I can edit all the pages with the userinterface from apex (application builder), but for example i don't know the source code when apex is calling an process after header, fetch rows etc. That's why i don't know how to modify to get some specialized things.
In my case: I'll edit header for one page (actually i'll for each but i don't know how to do this), click on edit page, select footer or header and the fields are empty. Where can i find the entry &APEX_USER?
All the processes which runs in the background where can i find these?
yonah -
Problem with header for each column
Hi,
I want change column header-text dynamically in the table control of module pool programming.Please help me.Hi Abhijit,
no need to put '&' in the variable .You just give the name of the variable as lw_text and also dont forget to expand the Def.Length attribute to equal to the length of that variable in the decalration.It is working for me.
put the follwoing code in PAI module.
Data:lw_text(15).
If cond1 = true.
lw_text = 'Description 1'.
elseif cond2 = true.
lw_text = 'Description 2'.
Endif.
Using the above code u can modify dynamically. -
ColdFusion 11, hot fix 3 installed but did not help. There are no binds.
This one has been driving me crazy and I have finally figured out that it is the first column in each grid where there is a select box via "valuesdisplay" that is the issue. Select box results are switching grids!
Example of how it is coded to display:
Grid 1 - gridcolumn should have a dropdown with 1,2,3
Grid 2 - gridcolumn should have a dropdown with a,b,c
Grid 3 - gridcolumn should have a dropdown with x,y,z
However, the results in the dropdowns in the grids are:
Grid 1 - x,y,z (should be 1,2,3)
Grid 2 - 1,2,3 (should be a,b,c)
Grid 3 - a,b,c (should be x,y,z)
This only happens with the first dropdown for each grid. Any other columns with dropdowns do not have any issues and do not swap out to the wrong grid.
Sample of my code from the grids:
Grid 1:
<cfgrid name = "evalgrid"
height="200"
autowidth="no"
font="arial" fontsize="12"
query = "getevalfinal"
SORT="Yes"
selectmode="edit"
format="html"
insert="yes"
delete = "#deletevalue#">
<CFGRIDCOLUMN NAME="numberofschools" HEADER="numberofschools"
HEADERALIGN="LEFT" DATAALIGN="LEFT"
BOLD="Yes" ITALIC="No"
SELECT="Yes" DISPLAY="Yes"
HEADERBOLD="Yes" HEADERITALIC="No"
VALUES = " ,NA,1,2,D"
VALUESdisplay = "Blank,NA,1,2,D" valuesDelimiter=","
width=50>
</cfgrid>
Second Grid:'
<cfgrid name = "SecondGrid"
height="100" width="700"
font="arial" fontsize="12"
query = "getsecurity"
SORT="Yes"
selectmode="edit"
format="html"
insert="yes"
delete = "#deletevalue#"
autowidth="yes"
>
<CFGRIDCOLUMN NAME="userrole" HEADER="userrole"
HEADERALIGN="LEFT" DATAALIGN="LEFT"
BOLD="Yes" ITALIC="No"
SELECT="Yes" DISPLAY="Yes"
HEADERBOLD="YES" HEADERITALIC="No"
VALUES = "#olduserrole#"
VALUESdisplay = "#olduserrole#" valuesDelimiter=","
WIDTH=300
font="arial" fontsize="12">
</cfgrid>
In the above code, userrole values end up being in the wrong grid where numberofschools values should be and vice versa.
Appreciate any help!
B.You may find this article useful: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].
-
Duplicate column headers for each of the rows
Header 1
Header 2
Header 3
row1 data1
row1 data2
row1 data3
Header 1
Header 2
Header 3
row2 data1
row2 data2
row2 data3
Header 1
Header 2
Header 3
row3 data1
row3 data2
row3 data3
Hi folks,
I want to know how to implement the table/grid format likes above described formation.
Actually I want to generate each column header for each row data in one table/grid.
Thanks for your help.I meant to delete this thread, but I do not know how to. Sorry.
-
How to add an image or static text in the header of EACH page of a cross-Tab report
Post Author: rtutus
CA Forum: General
Hi, I use Crustal 11.0.
I have a cross Tab. I display the items on the left column and the months horizontally, the items are grouped by category field. The values are the sum of quantities are displayed for each month. Like this:
Items Jan Feb March .....................Total
Category 1
Item11 val11 Val12 Val13 Total values
Item12 val21 Val22 Val23 Total values
Item13 val31 Val32 Val33 Total values
Category 2
Item21 val11 Val12 Val13 Total values
Item22 val21 Val22 Val23 Total values
Item23 val31 Val32 Val33 Total values
Category 3
Item31 val11 Val12 Val13 Total values
Item32 val21 Val22 Val23 Total values
Item33 val31 Val32 Val33 Total values
The problem, I want to add a page header for each page of the report.
When Crystal reports first displays my cross-tab in the designer, CR displays the cross tab in the Report header section. I d like to add text or image for each page and not only at the begining of my Cross-Tab.
If I just add an image or text at the top of the report designer, which is my report header, I get the image or text only on the begining of the 1st page of my report but never in the other following pages.
If I try to work around the problem and move the cross Tab to a group section instead, and then put the Image in the group header, I get what I want, but the problem is that:
The columns header: Jan, February....December are displayed for each group of my report and not only in the beginning of the report. I get something like this:
Items Jan Feb March .....................Total
Category 1
Item11 val11 Val12 Val13 Total values
Item12 val21 Val22 Val23 Total values
Item13 val31 Val32 Val33 Total values
Items Jan Feb March .....................Total
Category 2
Item21 val11 Val12 Val13 Total values
Item22 val21 Val22 Val23 Total values
Item23 val31 Val32 Val33 Total values
Items Jan Feb March .....................Total
Category 3
Item31 val11 Val12 Val13 Total values
Item32 val21 Val22 Val23 Total values
Item33 val31 Val32 Val33 Total values
You see the months get duplicated. Any way, my real need is to add an image or text in the header of EACH page of a cross-Tab report.
Thanks a lot for your help.Hi Divya,
you could do for example in the wdDoInit() of the view
wdContext.currentContextElement().setPicture("picture.gif");
Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials. I have learned tremendously from them.
Hope this helped
Harald -
How to set the header for second page
Hello all,
I'm trying to set different header for first page and page number should starts from second page.
Below is the sample code to set the header for each and every page.
DECLARE
hApplication OLE2.OBJ_TYPE;
hWindow OLE2.OBJ_TYPE;
hPane OLE2.OBJ_TYPE;
hView OLE2.OBJ_TYPE;
hDocuments OLE2.OBJ_TYPE;
hDocument OLE2.OBJ_TYPE;
hSelection OLE2.OBJ_TYPE;
hParagraphFormat OLE2.OBJ_TYPE;
hRange OLE2.OBJ_TYPE;
hFields OLE2.OBJ_TYPE;
hFont OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
wdAlignParagraphLeft CONSTANT number(3) := 0;
wdAlignParagraphCenter CONSTANT number(3) := 1;
wdAlignParagraphRight CONSTANT number(3) := 2;
wdSeekCurrentPageHeader CONSTANT number(3) := 9;
wdSeekCurrentPageFooter CONSTANT number(3) := 10;
wdSeekMainDocument CONSTANT number(3) := 0;
wdFieldPage CONSTANT number(3) := 33;
wdFieldNumPages CONSTANT number(3) := 26;
wdPageBreak CONSTANT number(3) := 7;
wdStory CONSTANT number(3) := 6;
myTab CONSTANT varchar2(1) := chr(9);
myBlue CONSTANT number(8) := 16711680; --FF0000
myGreen CONSTANT number(8) := 65280; --00FF00
myRed CONSTANT number(8) := 255; --0000FF
myDkGreen CONSTANT number(8) := 32768; --008000
myBlack CONSTANT number(8) := 0; --000000
myText varchar2(2000);
BEGIN
hApplication:=OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
-------- Create Header and Footer --------
hWindow := OLE2.GET_OBJ_PROPERTY(hApplication, 'ActiveWindow');
hPane := OLE2.GET_OBJ_PROPERTY(hWindow, 'ActivePane' );
hView := OLE2.GET_OBJ_PROPERTY(hPane, 'View' );
---- Header Section ---
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageHeader);
hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Times New Roman');
OLE2.SET_PROPERTY(hFont, 'Size', 10);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', MyBlue );
hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
OLE2.RELEASE_OBJ(hParagraphFormat);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'This is a');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.INVOKE(hSelection, 'TypeParagraph');
OLE2.SET_PROPERTY(hFont, 'Size', 16);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', MyDkGreen );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Test Header');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
---- Footer Section ----
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageFooter);
hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
OLE2.RELEASE_OBJ(hParagraphFormat);
hFields := OLE2.GET_OBJ_PROPERTY(hSelection, 'Fields');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Page ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG_OBJ(args, hRange);
OLE2.ADD_ARG(args, wdFieldPage);
OLE2.INVOKE(hFields, 'Add', args );
OLE2.DESTROY_ARGLIST(args);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, ' of ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG_OBJ(args, hRange);
OLE2.ADD_ARG(args, wdFieldNumPages);
OLE2.INVOKE(hFields, 'Add', args );
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(hRange);
OLE2.RELEASE_OBJ(hFields);
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekMainDocument);
OLE2.RELEASE_OBJ(hView);
OLE2.RELEASE_OBJ(hPane);
OLE2.RELEASE_OBJ(hWindow);
-------- Insert Text --------
hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Arial');
OLE2.SET_PROPERTY(hFont, 'Size', 12);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
OLE2.INVOKE(hSelection, 'TypeParagraph');
myText := myTab || 'This text is on the ';
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, myText);
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', myRed);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'first ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'page.');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, wdPageBreak);
OLE2.INVOKE(hSelection, 'InsertBreak', args);
OLE2.DESTROY_ARGLIST(args);
----page 2
myText := myTab || 'This text is on the ';
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, myText );
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlue);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'second ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'page.');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
---- go to the top of the first page
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, wdStory);
OLE2.INVOKE(hSelection, 'HomeKey', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(hFont);
OLE2.RELEASE_OBJ(hSelection);
OLE2.RELEASE_OBJ(hDocument);
OLE2.RELEASE_OBJ(hDocuments);
OLE2.RELEASE_OBJ(hApplication);
END;
Please help me out
Thanks,
BhavanaClick on --
Edit link for Page> Click "Edit Default" link on Banner >
Under the "Banner Links"
provide value something like this:
Label = Help
URL = /pls/portal30/docs/myhelp.html
Icon = U can upload any icon here.
For Application Components = See the Second Last tab on "Edit Component".
Thanx,
Chetan. -
Problem in setting header for a panelgrid in backing bean
Hi , this is urgent... pls...
Actually my problem is to set header for a panelgrid. I am generating panelgrid component in the backing bean itself , there i need to set header for that panelgrid.
Here is some sample code which i have written pls let me know whether any problem in this code or let me know whether there is any method possible other than this.
Code:
Application application=FacesContext.getCurrentInstance().getApplication();
keyFeaturesGrid = (HtmlPanelGrid) application.createComponent (HtmlPanelGrid.COMPONENT_TYPE);
keyFeaturesGrid.setColumns(4);
keyFeaturesGrid.setColumnClasses("subColumn");
FacetTag facetTag=new FacetTag();
facetTag.setName("header");
HtmlOutputText facetText=new HtmlOutputText();
facetText.setValue("Key Features");
facetTag.setValue("value",facetText);
keyFeaturesGrid.getChildren().add(facetTag);
i am calling this method in constructor.. if i place that facetTag code part in my method... i am getting an error while instantiating the constructor...
waiting for solution...
Thanks in advance...Hai...
I got it...
Here i am posting the solution which i got...
no need to think this much ... it is very simple... let me share the solution here...
Instead of creating FacetTag object u can do this like this...
HrmlPanelGrid panelGrid=new HtmlPanelGrid();
HtmlOutputText headerText=new HtmlOutputText();
headerText.setValue("Header For The Grid");
panelGrid.getFacets().put("header",headerText);
u r always welcome to send any suggestions...
and also one doubt... how to use JSF core tag verbatim in backing bean -
Multiple column heading for sql that returns single column
Hi All,
I have just started using APEX and my apex version is 3.2.0.00.27.
We have a report that displays the output from a query similar to the below one. We are using borderless template and removed the "before each row" and "after each row" values to allow the output displayed in table format.
Now we wanted to include heading for each column displayed in table. We wanted to include headings from a derived value, Example for column1 , heading need to display the sysdate and column2 heading should be sysdate-1 and so on. But the column attribute tab is having only one column My_rep. Not sure how to se pl/sql type column heading in this case. Could someone please help me to achieve this?
Please let me know if I have missed to provide any other details. Thanks in advance.
select '<tr>
<td>' || column1 || '</td>' ||
<td>' || column2 || '</td>' ||
<td>' || column3 || '</td>' ||
<td>' || column4 || '</td>' ||
|| '</tr>' My_rep
from mytable22335813-cfb0-46c4-9bef-b61a46f0de67 wrote:
Please update your forum profile with a real handle instead of "22335813-cfb0-46c4-9bef-b61a46f0de67"
I have just started using APEX and my apex version is 3.2.0.00.27.
Upgrading from this unsupported version to the current 4.2 release is recommended.
When you post a question, always include the following information in addition to the full APEX version number:
Full database version, edition and host OS
Web server architecture (EPG, OHS or APEX listener), server platform, and host OS
Browser(s)/version(s) used
UI/Theme
Templates
Region type (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. To get a detailed answer then it's appropriate for the questioner to take on a significant part of the effort by reproducing the problem on apex.oracle.com before asking for assistance with specific issues, which can then be seen at first hand in a real APEX environment.
we wanted to get a report in Apex with the below format. and we wanted to change background color of each cell depends on the combination of code||status
Heading sysdate sysdate-1 sysdate-2 ...(sysdate-30
====== ====== ======== =======
name code||status code||status
name code||status
we are using the below query to get this table format. But heading is the issue we are facing now
select '<tr>
<td>' || name || '</td>' ||
'<td style=background-color:' || case when sysdate0='0C' then 'Green' when sysdate0='0I' then 'Red' when (substr(sysdate0,1,1)!='0' and substr(sysdate0,1,1)='I') then 'Orange' else 'Yellow' end || '>  ' || sysdate0 || '  </td>' ||
|| '</tr>' repcolumn
from
(select
a.name,
max(decode(trunc(a.ardate),trunc(sysdate), a.code||a.STATUS , '' )) sysdate0,
max(decode(trunc(a.ardate),trunc(sysdate-30), a.code||a.STATUS , '' )) sysdate30
from
mytab a
where
a.ardate>=sysdate-30
group by a.name)
See Re: Matrix report for a custom report template-based solution to a similar problem, with dynamically generated column headings. -
How to display Header for table in Script
Dear All,
In script i am displaying the data in tabular format, by using the
function module write_form_lines. For this i have called multiple
windows for each column. I am able to display the data,however
don't know how to name this column, i.e the header for each column.
(Sr_No,,Vendor Name,,Account Number,,Reference Code,,Amount ).
Any help is appreciated.
Thanks & Regards,
ManjuHi Manju,
Create a widow to display the header details(hard code the name of the columns). You have to use main window for displaying the table data.Loop the internal table in driver program, inside the loop call the function write_form for printing the table contents.
Thanks,
Prabhakaran -
Hi there,
I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
database using the fillby query.
It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
each click of the fillby button.
also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered.
so actually 2 questions here:
1. how to populate a new row for each click of the fillby button
2. how to delete records from data grid view after an item has been entered
Thanks
VishwasHello,
The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
Some examples
Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
The following article with code shows this but does not address adapters.
Conceptually speaking the code in the second code block shows how to get the new key
Public Class Form1
Private Sub StudentsBindingNavigatorSaveItem_Click(
sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
Me.Validate()
Me.StudentsBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
End Sub
End Class
Get new key taken from
this article.
Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
Dim Success As Boolean = True
Try
Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
cmd.CommandText = InsertStatement
cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
cn.Open()
cmd.ExecuteNonQuery()
cmd.CommandText = "Select @@Identity"
Identfier = CInt(cmd.ExecuteScalar)
End Using
End Using
Catch ex As Exception
Success = False
End Try
Return Success
End Function
In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
Additional resources
http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
It is necessary to create one header data for each file to be sent to CDFS.
hi GUYS
my sce anrio is FILE-XI-PROXY
REQUIREMENT IS
SOURCE FILE TARGET FILE WILL BE
H1 H1 H1 H1
I1 I1 I2 I3
I2 F1 F1 F1
I3
F1
It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
Thanks
NAGaa
Maybe you are looking for
-
Unable to Enterprise Service Repository and Intergration Directory in SAP PI 7.1
Hello Experts, I am unable to open Enterprise Service Repository and Integration Directory in SAP PI. The error displayed while opening the tools is "Can not find Message File". I have tried installing Java versions from 1.5 to 1.7 .Also al
-
How to print document in reverse color, B
HP Photosmart Premium Fax All-in-One Printer - C410a Operating System: Windows 7 64bit I want to convert a .PDF file from Black-&-White to White-&-Black. A 303 page manual I need to print has black pages and white ink (ouch!). Thanks
-
Disable Toolbar in custom TextEditor Control
Dear Gurus , I made a custom Texteditor control in my own screen. The problem is that i can't disable the toolbat above the control . Please see my code .... CREATE OBJECT G_EDITOR_3 EXPORTING PARENT = G_EDITOR_CONTAINER_3 WORDWRAP_
-
Lightroom 1.2 mac cannot automatically find catalogue
I recently updated my Mac copy of Lightroom to 1.2, and it has developed an annoying problem: Upon opening, the program no longer can find the catalogue, even if it appears to be in the correct location. I can force the computer to open the database.
-
Drag and drop to bookmarks toolbar in ff 4?
In FF3 i could drag a url from the location bar onto the bookmarks toolbar to have it create a bookmark, but in FF4 I can no longer do this. Is there some hidden option to turn this back on or is it permanently disabled?