Fortunately am giving the answer of my own question. i spend 3 Days on this question i don't want to spend time any other developer .
I override the function which return the array or Collection that display the orders on Sales->Order page on admin site.
make di.xml file in "app\code\VendorName\ModuleName\etc\di.xml"
and paste the code given below
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" type="VendorName\ModuleName\View\Element\UiComponent\DataProvider\DataProvider"/>
</config>
Now make the DataProvider.php File in such a way :
"VendorName\ModuleName\View\Element\UiComponent\DataProvider\DataProvider.php"
Paste the code given below.
<?php
namespace VendorName\ModuleName\View\Element\UiComponent\DataProvider;
use Magento\Framework\Api\FilterBuilder;
use Magento\Framework\Api\Search\ReportingInterface;
use Magento\Framework\Api\Search\SearchCriteria;
use Magento\Framework\Api\Search\SearchCriteriaBuilder;
use Magento\Framework\Api\Search\SearchResultInterface;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface;
class DataProvider extends \Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider
{
/**
* Data Provider name
*
* @var string
*/
protected $name;
/**
* Data Provider Primary Identifier name
*
* @var string
*/
protected $primaryFieldName;
/**
* Data Provider Request Parameter Identifier name
*
* @var string
*/
protected $requestFieldName;
/**
* @var array
*/
protected $meta = [];
/**
* Provider configuration data
*
* @var array
*/
protected $data = [];
/**
* @var ReportingInterface
*/
protected $reporting;
/**
* @var FilterBuilder
*/
protected $filterBuilder;
/**
* @var SearchCriteriaBuilder
*/
protected $searchCriteriaBuilder;
/**
* @var RequestInterface
*/
protected $request;
/**
* @var SearchCriteria
*/
protected $searchCriteria;
protected $seller_order_arr;
/**
* @param string $name
* @param string $primaryFieldName
* @param string $requestFieldName
* @param ReportingInterface $reporting
* @param SearchCriteriaBuilder $searchCriteriaBuilder
* @param RequestInterface $request
* @param FilterBuilder $filterBuilder
* @param array $meta
* @param array $data
*/
public function __construct(
$name,
$primaryFieldName,
$requestFieldName,
ReportingInterface $reporting,
SearchCriteriaBuilder $searchCriteriaBuilder,
RequestInterface $request,
FilterBuilder $filterBuilder,
array $meta = [],
array $data = []
)
{
$this->request = $request;
$this->filterBuilder = $filterBuilder;
$this->name = $name;
$this->primaryFieldName = $primaryFieldName;
$this->requestFieldName = $requestFieldName;
$this->reporting = $reporting;
$this->searchCriteriaBuilder = $searchCriteriaBuilder;
$this->meta = $meta;
$this->data = $data;
$this->prepareUpdateUrl();
}
protected function searchResultToOutput(SearchResultInterface $searchResult)
{
$arrItems = [];
$arrItems['items'] = [];
foreach ($searchResult->getItems() as $item) {
$itemData = [];
foreach ($item->getCustomAttributes() as $attribute) {
$itemData[$attribute->getAttributeCode()] = $attribute->getValue();
}
$arrItems['items'][] = $itemData;
$arrItems['totalRecords'] = $searchResult->getTotalCount();
}
return $arrItems;
}
public function getTotalOrder($ordersize){
return sizeof($ordersize);
}
public function getSearchCriteria()
{
if (!$this->searchCriteria) {
$this->searchCriteria = $this->searchCriteriaBuilder->create();
$this->searchCriteria->setRequestName($this->name);
}
return $this->searchCriteria;
}
/**
* Get data
*
* @return array
*/
public
function getData()
{
return $this->searchResultToOutput($this->getSearchResult());
}
/**
* Get config data
*
* @return array
*/
/**
* Set data
*
* @param mixed $config
* @return void
*/
/**
* Returns Search result
*
* @return SearchResultInterface
*/
public function getSearchResult()
{
return $this->reporting->search($this->getSearchCriteria());
}
}