Rearrange a column (int) in jquery datatable while search - datatables

I'm trying to rearrange a column (int) during search in the jQuery dataTable but found no way. The following link will clearly depict the issue i have.
http://s3.postimg.org/6hwa5e637/Capture.jpg
You can see that after search the 1st column (Serial #) has numbers 2 and 3. Instead I need 1 and 2 there.
There must be a solution and I'm badly in need of it.
Thank you.

Are you trying to say that you want your rows to be numbered? I am not sure what you mean by "rearranged". Perhaps sharing your DataTables initialization code would shed some light on your problem?
Don't have enough reputation to comment, but will edit this answer post if Ashik clarifies his question and I have an answer.
Edit: Since you're trying to number your rows, look into using the mRender property of a column (in aoColumns). It is a function you can define for custom column rendering where you could place logic for row numbering. I'll leave the logic for that to you, but point you to some relevant material on mRender: http://datatables.net/release-datatables/examples/advanced_init/column_render.html

Related

SAP - how to get dynamic table and content

I have one question which is getting me really tired lately, since I cannot find anything that could help me.
I have one SAP Smart Form, which is called by my ABAP program, but the thing is that once I call, I want to have on the main window some data coming, like:
I have these fields as you'll can see in the image below:
What I wish to do is to read the table wa-data. Ex:
wa-data-day
wa-data-day_des
wa-data-ctimb
Once I read these data, I need to put it to print in the respective fields, example:
day in the column 1, line 1,
day_des the column 2, line 2.
And then respectively, to fill the form.
Does anyone have tips how I can do that by SMARTFORMS transaction?
Thank you so much for any help guys.
I need to sort it out, getting the solution for this, how can I do that? What is the right steps to do?

How can I duplicate a row right below where it is on DataTables?

I found that DataTables now supports colspan and rowspan. but to use it better, I needed to duplicate same data thrice. What I need to make is something as image below, and I can't find whether DataTables supports splitting a row into multiple rows.
The image shows how I modify each set of data. It means, there will be 5 columns for each data, and it will be split into 3 lines.
Even the question was about duplicating, if there's other way to make a row/set of row for each data with same shape as image, than please explain.
Ok, I found very wierd trick.
I just made display:none to original table, and only showed child row table.
Not like original table, child row was free to custom the format.
The answer of other question on the link was useful.
https://stackoverflow.com/a/72745607/10780764

Power Query result doesn't match returned data

This is a cross-post from the PowerBI forum:
I'm new to Power Query (Desktop) having previously only used it within Excel.
I have an SQL query source that returns the following data when viewed in the Power Query Editor:
yet in my report I get the following values for the Cabinet_DocID and Editor_ID:
I'm at a loss to explain what has happened to the values highlighted in red above. Why are they displaying as either 1 or two?
The only difference I can see in the source data between the columns that are correct/incorrect is that the values which were changed are numbers not text.
I feel like I am missing something stupid, but can't figure out what it is.
Any help greatly appreciated.
Thanks,
Alex.
PS. It seems like this response to the same problem might answer my question but I haven't done anything to either of these columns so I'm confused AF right now.
Okay, so it seems the numbers appearing were as a result of the values being numerical.
My initial attempt at changing the format to text lead to frustration because I didn't realise that the report doesn't automatically update the displayed format of any data displayed until you deselect and re-select all the columns.
This seems like a flaw to me, but I guess it's working as designed..?

Query several ranges and add automatically a column to know the source of each row

I am trying to achieve the following in Google Spreadsheets.
First, I want to query several ranges (in different sheets from the same spreadsheet). I tried a formula like this =query(arrayformula({indirect(E2:E10)}),"select * where Col1 <>''") with no success
In E2:E10 I have a list of ranges. Column F contains a name that describes the source of the value in Column E.
My second problem is that I need to add a column to the output of that query that tells me the origin of each row.
If the sources are ranges of 3 columns by country I need to merge those tables and add that country to each row.
All credits to +Ben Liebrand who helped me out here: https://support.google.com/docs/profile/3464
"I just want to start of by saying that the indirect() function does not work in an arrayformula() function as expected. So you will need to take another approach. I can understand what you are trying to do so I added another TAB in your spreadsheet to demonstrate another approach. I know it was initially a specific design you were trying so I made some changes to what you had. Maybe you can take a look at what I have offered and maybe you can tweak your design.
I know what I am offering is just very rough but you will also notice that I removed the end row specifier from your ranges in the range table.
Don't assume my example to be the final result but I was just trying to show that the range you were trying to use with the indirect() function will not work.
So hopefully this will give you a new idea of how you can maybe handle this.
My formula also adds the country to each of the tables in the output. My formula looks like this
=query(ArrayFormula({
if(len(indirect(regexextract(F2,"\w+\!\w+")&":A")),G2,),indirect(F2);
if(len(indirect(regexextract(F3,"\w+\!\w+")&":A")),G3,),indirect(F3);
if(len(indirect(regexextract(F4,"\w+\!\w+")&":A")),G4,),indirect(F4);
if(len(indirect(regexextract(F5,"\w+\!\w+")&":A")),G5,),indirect(F5);
if(len(indirect(regexextract(F6,"\w+\!\w+")&":A")),G6,),indirect(F6);
if(len(indirect(regexextract(F7,"\w+\!\w+")&":A")),G7,),indirect(F7)
})," select * where Col1 <> '' ")
Hope this is of some help to you"
And I hope is useful to the community
GerĂ³nimo

VBA - Excel - Display one section of sheet using different column widths

I couldn't figure out how to word the question, so please comment if you have a better wording.
I am creating a report the has multiple sections, all displayed on one sheet. One of the sections need to be displayed at equal column widths, while the rest of the report has varying column widths. What I would like to do is display this section as some sort of chart/table that will display as if it was part of a continuous report. Should I be using listboxes or is there a better option?
Thanks for any help.
I'm not sure I completely understand your question, but from what I do understand, maybe what you could do is put the part with the fixed column widths on another part of your sheet and then:
Copy it
Go to where you want it in the report and Paste Special > Linked Picture (I)
I think that would give you what you're looking to accomplish, otherwise, please clarify a bit more...